[issue17634] Win32: shutil.copy leaks file handles to child processes
R. David Murray
report at bugs.python.org
Thu Apr 4 21:04:04 CEST 2013
R. David Murray added the comment:
Unless I'm misunderstanding something, this has already been fixed in python3, where subprocess closes any open files (other than stdin/stdout/stderr) by default. In Python2.7 (and possibly earlier, I haven't checked) you can get the same effect by specifying close_fds=True in the Popen call.
I don't see any reason why shutil should take any special action in this case, this is a general problem with open file descriptors and subprocess.
----------
nosy: +r.david.murray
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17634>
_______________________________________
More information about the Python-bugs-list
mailing list