-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exe() on OSX may incorrectly raise ZombieProcess #1044
Comments
OK, this is very weird. To reproduce:
It will print:
The |
This is a bigger problem than I thought which requires a consistent refactoring. There are different C functions using poor undocumented OSX APIs such as The |
* small refactoring * #1044: define a separate ctx manager which handles zombie processes * add create_zombie_proc utility function * disable test on windows * #1044: cmdline() was incorrectly raising AD instead of ZombieProcess * #1044: environ() was incorrectly raising AD instead of ZombieProcess * #1044: memory_maps() was incorrectly raising AD instead of ZombieProcess * #1044: threads() was incorrectly raising AD instead of ZombieProcess * enhance test * fix threads()
On Python 3:
Note: the underlying C call,
proc_pidpath
, which is authentic crap, incorrectly raises ESRCH. It is so crappy that it does it only sometime.wrap_exceptions()
decorator catches ESRCH, sees a PID is still alive so it assumes it's a zombie. As suchwrap_exceptions()
should be more clever at detecting zombies (do something different thanpid_exists(pid)
). With that said, I suppose the best we can do is to raiseAccessDenied
, which sucks but I see no alternatives.The text was updated successfully, but these errors were encountered: