pstree: Ignore processes that disappear before reading cmdline
Old location for psmisc
Brought to you by:
csmall
The worst case here is that the user has specific a PID on the
command-line, read_proc() fails to read cmdline for an irrelevant,
transient process and fails.
It is better to simply ignore processes that have disappeared. That
way pstree can provide useful output in more cases.
An alternative is to read cmdline only for processes that the user is
interested in. However, this probably increases the chances of an
interesting process exiting before the cmdline is read.
Hi Martin,
Thankyou for the report and the patch. After looking through it, I agree that if the process has gone, it probably was transient and we should just move on. Your patch is applied to the git repository, thanks!