diff options
author | Benny Baumann <BenBE@geshi.org> | 2021-04-18 18:10:04 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-05-23 09:22:21 +0200 |
commit | a61a2e6d470b3a5d075a5ba7d8d4cd37ef3f78b5 (patch) | |
tree | b359bec3f5e3a6defdc7483772f5b96c51f0f666 /Process.c | |
parent | bcb18ef82269c68d54a160290e5f8b2e939674ec (diff) |
Call makeCommandStr on all platforms
Diffstat (limited to 'Process.c')
-rw-r--r-- | Process.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -388,6 +388,17 @@ void Process_makeCommandStr(Process *this) { bool searchCommInCmdline = settings->findCommInCmdline; bool stripExeFromCmdline = settings->stripExeFromCmdline; + /* Nothing to do to (Re)Generate the Command string, if the process is: + * - a kernel thread, or + * - a zombie from before being under htop's watch, or + * - a user thread and showThreadNames is not set */ + if (Process_isKernelThread(this)) + return; + if (this->state == 'Z' && !this->mergedCommand.str) + return; + if (Process_isUserlandThread(this) && settings->showThreadNames) + return; + /* this->mergedCommand.str needs updating only if its state or contents changed. * Its content is based on the fields cmdline, comm, and exe. */ if ( |