[issue5870] subprocess.DEVNULL
Ross Lagerwall
report at bugs.python.org
Sun Jan 2 15:50:34 CET 2011
Ross Lagerwall <rosslagerwall at gmail.com> added the comment:
I think if you look closely at the patch, the fd does not stay open the whole time. It is opened if necessary in _get_handles() with e.g.:
elif stdin == DEVNULL:
p2cread = self._get_devnull()
and then closed in _execute_child() with:
if hasattr(self, '_devnull'):
os.close(self._devnull)
which is executed from __init__(). So I don't think it stays open for eternity :-)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5870>
_______________________________________
More information about the Python-bugs-list
mailing list