show names of zombie processes properly

This commit is contained in:
Hisham Muhammad 2011-03-17 04:26:28 +00:00
parent 36ef1a93be
commit 8bdec7155e
1 changed files with 4 additions and 1 deletions

View File

@ -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);