Terminal: don't use login as terminal process; set ppid

This commit is contained in:
李通洲
2024-01-19 10:46:19 +08:00
parent eee8fb78d2
commit 06af39835a
2 changed files with 6 additions and 1 deletions
+4 -1
View File
@@ -1,8 +1,11 @@
# 2.6.1
Features:
* Improve xonsh shell detection (Shell)
Bugfixes:
* Fix segfault in CPU module when running in aarch64 machine without `lscpu` installed (CPU, Linux)
* Improve xonsh shell detection (Shell, Linux)
* Don't use `login` as terminal process (Terminal, Linux)
* Silence warnings when building in 32bit machines.
# 2.6.0
@@ -225,6 +225,7 @@ static pid_t getTerminalInfo(FFTerminalResult* result, pid_t pid)
ffStrEquals(name, "elvish") ||
ffStrEquals(name, "oil.ovm") ||
ffStrEquals(name, "xonsh") || // works in Linux but not in macOS because kernel returns `Python` in this case
ffStrEquals(name, "login") ||
ffStrEndsWith(name, ".sh")
)
{
@@ -242,6 +243,7 @@ static pid_t getTerminalInfo(FFTerminalResult* result, pid_t pid)
#endif
result->pid = (uint32_t) pid;
result->ppid = (uint32_t) ppid;
ffStrbufSetS(&result->processName, name);
getProcessInformation(pid, &result->processName, &result->exe, &result->exeName);
break;