[issue6610] Subprocess descriptor debacle
Yaniv Aknin
report at bugs.python.org
Sat May 15 00:16:37 CEST 2010
Yaniv Aknin <yaniv.aknin at gmail.com> added the comment:
I think if the test is conducted without closing stderr, it will only check that stdin/stdout are handled correctly (you could assume that if one handled stdin/stdout correctly, they did the same with stderr).
However, since I've used a context manager (_NoStandardFds) to handle the closing/restoration of the standard fds, I think the benefit (fuller test coverage) outweighs the cost (potentially harder debugging if there's a problem with the test); if I'm not mistaken, the context manager should restore your fds before the default exception handler writes to stdout (at least in the parent and the child prior to exec()).
n.b.: I've also created a Rietveld issue for this patch: http://codereview.appspot.com/1227041/show
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6610>
_______________________________________
More information about the Python-bugs-list
mailing list