[issue24862] subprocess.Popen behaves incorrect when moved in process tree

Gregory P. Smith report at bugs.python.org
Wed Sep 9 01:46:35 CEST 2015


Gregory P. Smith added the comment:

My gut feeling is to say "don't do that" when it comes to passing subprocess instances between processes (ie: pickling and unpickling them) and expecting them to work as if nothing had changed...  You already acknowledge that this is a strange thing for an application to do and that you have a workaround in your application.

BUT: It does looks like we are doing something a bit weird here with the waitpid errno.ECHILD exception.  However letting this bubble up to the application may, at this point, cause new bugs in code that isn't expecting it so I'm not sure we should change that in any circumstances. :/

FWIW there is also a comment at the end of the related issue1731717 (for Popen.wait() rather than .poll()) with a suggestion to ponder (though not directly related to this issue, if it is still relevant).

----------

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


More information about the Python-bugs-list mailing list