I suggest the following small fix with the following reasoning:
the conditionals with amtRead in function LinuxProcessList_readCmdlineFile are meant to protect the execution of the for loop (and what follows it), which is not supposed to be run with amtRead == 0 (if I understand correctly),
the command for zombie processes is then set in function LinuxProcessList_recurseProcTree at line 883 after the "offending" call to LinuxProcessList_readCmdlineFile at line 856.
To me this is a quick fix and the setting of command name of processes seems a little bit clumsy (i.e. readCmdlineFile is not just reading, but actually setting the command name of a process and classifying it as a kernel thread), however, I lack the insight as well as experience to write it better. Maybe setting the command name of a zombie process should also be moved to readCmdlineFile and the function renamed. Please, let me know what you think about it.
I suggest the following small fix with the following reasoning:
amtRead
in functionLinuxProcessList_readCmdlineFile
are meant to protect the execution of the for loop (and what follows it), which is not supposed to be run withamtRead == 0
(if I understand correctly),LinuxProcessList_recurseProcTree
at line 883 after the "offending" call toLinuxProcessList_readCmdlineFile
at line 856.To me this is a quick fix and the setting of command name of processes seems a little bit clumsy (i.e.
readCmdlineFile
is not just reading, but actually setting the command name of a process and classifying it as a kernel thread), however, I lack the insight as well as experience to write it better. Maybe setting the command name of a zombie process should also be moved toreadCmdlineFile
and the function renamed. Please, let me know what you think about it.This closes issue #930.