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

Antoine Pitrou report at bugs.python.org
Mon May 9 23:05:15 CEST 2011


Antoine Pitrou <pitrou at free.fr> added the comment:

> Actually, I don't think the wait() is a good idea. If you want to
> block and infinitely wait on the process to close, you should do so
> explicitly.

Ok.

> It's probably better that we try to use terminate() or kill() and raise if that fails.

Uh, I think it's worse. Using a context manager shouldn't do something
potentially destructive like killing a process.

----------

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


More information about the Python-bugs-list mailing list