[issue17634] Win32: shutil.copy leaks file handles to child processes

STINNER Victor report at bugs.python.org
Fri Apr 5 13:59:25 CEST 2013


STINNER Victor added the comment:

See also the PEP 433 which proposes to disable file descriptor
inherance by default.

2013/4/5 Richard Oudkerk <report at bugs.python.org>:
>
> Richard Oudkerk added the comment:
>
> This problem also affects processes started by multiprocessing (although it is fixed in http://hg.python.org/sandbox/sbt#spawn).
>
> As far as I am concerned O_NOINHERIT should really have been applied by default in Python 3.  You only get inheritable fds on Windows if you use the msvcrt's spawn*() functions.  But in Python 3 os.spawn*() is implemented on top of subprocess so the fds are never inherited (even if the underlying handles are).
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue17634>
> _______________________________________

----------

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


More information about the Python-bugs-list mailing list