[issue17131] subprocess.Popen.terminate can raise exception on Posix

Gregory P. Smith report at bugs.python.org
Fri Jul 18 23:28:38 CEST 2014


Gregory P. Smith added the comment:

issue14252 appears to have been a fix for the windows side only.

On Posix the best that could be done here is to catch OSError within Popen.terminate() and Popen.kill() and ignore the problem if there was an error.

We do not have a way to know if the child process exists any longer or even to know if the process with the PID this call is sending the signal to is this Popen instances' child process or if the PID has already been recycled by the OS and used by another unfortunate process.

the bigger question is... should we.  this seems like an API change rather than a bugfix so I'm more inclined to do this in 2.5 only in case someone was relying on the exception to tell them that the process had already died.

----------

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


More information about the Python-bugs-list mailing list