[issue12044] subprocess.Popen.__exit__ doesn't wait for process end

Gregory P. Smith report at bugs.python.org
Wed May 11 10:57:51 CEST 2011


Gregory P. Smith <greg at krypto.org> added the comment:

I didn't initially like the idea of __exit__ blocking on another
process... but the zombie issue is real does make me think we should
reconsider this and have it wait().

It is a backwards incompatible change if anyone has started using the
Popen context manager to launch a long running subprocess that they
did not want to wait for.  That should be exceedingly rare.

I say change the behavior to wait() in 3.3, 3.2.1 and 2.7.2.  Keep the
note in the documentation and turn it into something that stands out
better like a note or a warning suggesting that people always call
wait() after the Popen context manager exits if they need to be
compatible with 2.7.1 or earlier.

----------

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


More information about the Python-bugs-list mailing list