Closed
Description
From g.rodola on December 27, 2010 17:08:15
As discussed here: https://code.google.com/p/psutil/issues/detail?id=140#c4
...we're currently providing a PID 0 on Linux, which actually does not exist:
>>> 0 in psutil.get_pid_list()
True
>>> psutil.Process(0)
<psutil.Process (pid=0, name='sched') at 140504839398032>
>>>
At the beginning of development we hard-coded this behavior in _pslinux.py for
conformity with other platform implementations but on a second thought I'm not
sure it's been a good idea. It's not a big deal in pratical terms but a user
willing to get the number of currently running processes would get an erroneous value.
My vote is to get rid of all 0 pid code in the next version.
Jay, what do you think?
Original issue: http://code.google.com/p/psutil/issues/detail?id=144