[issue25960] Popen.wait() hangs with SIGINT when os.waitpid() does not

Gregory P. Smith report at bugs.python.org
Sun Dec 27 14:16:04 EST 2015


Gregory P. Smith added the comment:

fundamentally: this shouldn't work anyways.

You are calling wait() from a signal handler.
That is a blocking operation.
You cannot do that from a signal handler.

os.waitpid(p.pid, 1) is os.waitpid(p.pid, os.WNOHANG) which is a non-blocking operation so it works.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25960>
_______________________________________


More information about the Python-bugs-list mailing list