[issue8052] subprocess close_fds behavior should only close open fds

Ross Lagerwall report at bugs.python.org
Tue Jan 4 21:06:17 CET 2011


Ross Lagerwall <rosslagerwall at gmail.com> added the comment:

Does this mean that it's better to call the close() syscall 1000 or 1000 0000 times rather than listing the open fds & closing say a handful?

On Linux, the listdir function results in an open() syscall, 2 or so getdents() calls and a close() call - could this not be done inbetween the fork & exec, even if the actual python function isn't called directly?

----------
nosy: +rosslagerwall

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8052>
_______________________________________


More information about the Python-bugs-list mailing list