[issue34566] pipe read sometimes returns EOF but returncode is still None

Martin Panter report at bugs.python.org
Thu Sep 6 00:33:02 EDT 2018


Martin Panter <vadmium+py at gmail.com> added the comment:

You probably only need to call "wait" once. That blocks the thread until it gets a result, so it is more CPU-efficient than calling "poll" in a busy loop.

Since you open a separate pipe for "stderr" in script.py, but don't do anything with it, there could be a deadlock with the child writing to the stderr pipe versus the parent reading from "stdout" or waiting for the exit status.

I guess your script is an approximation of the "sos" application. I don't have time to understand everything it is trying to do, but I added some comments at <https://github.com/sosreport/sos/commit/2fcf5f0#r30410300>.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34566>
_______________________________________


More information about the Python-bugs-list mailing list