[issue31447] proc communicate not exiting on python subprocess timeout using PIPES

Leonardo Francalanci report at bugs.python.org
Mon Sep 18 09:16:55 EDT 2017


Leonardo Francalanci added the comment:

That works!
But when I said "also with close_fds=True", I meant that I tried WITHOUT overriding stdin, stdout, and stderr AND setting close_fds=True, but it didn't work. What worked was not overriding stdin/out/err and adding

os.set_inheritable(0, False)
os.set_inheritable(1, False)
os.set_inheritable(2, False)

before the call (no need to set close_fds)

----------

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


More information about the Python-bugs-list mailing list