summaryrefslogtreecommitdiffstats
path: root/Process.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2021-04-18 18:10:04 +0200
committerBenBE <BenBE@geshi.org>2021-05-23 09:22:21 +0200
commita61a2e6d470b3a5d075a5ba7d8d4cd37ef3f78b5 (patch)
treeb359bec3f5e3a6defdc7483772f5b96c51f0f666 /Process.c
parentbcb18ef82269c68d54a160290e5f8b2e939674ec (diff)
Call makeCommandStr on all platforms
Diffstat (limited to 'Process.c')
-rw-r--r--Process.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Process.c b/Process.c
index 4bcb9dc6..e38ea21c 100644
--- a/Process.c
+++ b/Process.c
@@ -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 (

© 2014-2024 Faster IT GmbH | imprint | privacy policy