You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> import psutil
>>> 0 in psutil.get_pids()
False
>>> psutil.pid_exists(0)
True
>>>
This is similar to issue 23 of 4 years ago.
This happens because internally we use os.kill() and according to "man 2 kill":
> If pid equals 0, then sig is sent to every process
> in the process group of the calling process.
...which is definitively not what we want.
In case of PID 0 we should just "return 0 in get_pids()".
From g.rodola on December 17, 2013 14:55:37
Original issue: http://code.google.com/p/psutil/issues/detail?id=457
The text was updated successfully, but these errors were encountered: