diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-03-17 04:26:28 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-03-17 04:26:28 +0000 |
commit | 8bdec7155ef1756deef78120fd75469229226f2a (patch) | |
tree | 9904e2b2a85f1907625cfdbb7f027ade3d6c5e6e /ProcessList.c | |
parent | 36ef1a93be59addbb1d2ecf57083f74a3d2f9fe4 (diff) |
show names of zombie processes properly
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ProcessList.c b/ProcessList.c index c2343576..d76938a6 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -625,7 +625,10 @@ static bool ProcessList_processEntries(ProcessList* this, const char* dirname, P ProcessList_add(this, process); } - if (Process_isThread(process)) { + if (process->state == 'Z') { + free(process->comm); + process->comm = String_copy(command); + } else if (Process_isThread(process)) { if (this->showThreadNames || Process_isKernelThread(process) || process->state == 'Z') { free(process->comm); process->comm = String_copy(command); |