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

2018-09-05 Thread Martin Panter
Martin Panter 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

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

2018-09-05 Thread pmoravec
pmoravec added the comment: > The "poll" method does not wait for the child to exit. Normally you use the > "wait" method in this situation. I suspect this is a bug in the application, > not in Python. Thanks for clarification. Could you please confirm what code change in that script is

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

2018-09-03 Thread Martin Panter
Martin Panter added the comment: The "grep" process may be closing its end of the pipe before it exits. Or if Grep leaves the pipe open when it exits, the OS may close the pipe before it makes the child exit status available. Either way, I suspect "p.stdout.read()" returns an empty string

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

2018-09-03 Thread Marcel Plch
Change by Marcel Plch : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2018-09-03 Thread STINNER Victor
Change by STINNER Victor : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2018-09-03 Thread Marcel Plch
Marcel Plch added the comment: original downstream issue - https://bugzilla.redhat.com/show_bug.cgi?id=1623070 -- title: pipe read sometimmes returns EOF but returncode is still None -> pipe read sometimes returns EOF but returncode is still None