[issue25942] subprocess.call SIGKILLs too liberally

Mike Pomraning report at bugs.python.org
Mon Dec 28 23:37:17 EST 2015


Mike Pomraning added the comment:

If I understand correctly, the _try_wait mechanics (or 3.5's syscall behavior) already handle EINTR the way we way:  ignore it and try wait()ing again.

So, this patch would kill only on a timeout, and never on another error like Ctrl-C, a UserDefinedTimeoutException from a signal handler, etc.

That's probably the lesser of two evils, the other being a SIGKILL against an arbitrary child process.  Better to document that a non-timeout-parameter interruption to subprocess.call will separate the parent from its child, than to hard kill arbitrary programs when a polite SIGINT was intended.

----------

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


More information about the Python-bugs-list mailing list