PEP 446: the PEP does not propose to change the default value of close_fds

So remove mention of performances
This commit is contained in:
Victor Stinner 2013-08-27 23:27:59 +02:00
parent fd0784f0d5
commit 6e741896c1
1 changed files with 1 additions and 15 deletions

View File

@ -16,7 +16,7 @@ Abstract
Leaking file descriptors in child processes causes various annoying
issues and is a known major security vulnerability. Using the
``subprocess`` module with the *close_fds* parameter set to ``True`` is
not possible in all cases, and has poor performances on some platforms.
not possible in all cases.
This PEP proposes to make all file descriptors created by Python
non-inheritable by default to reduce the risk of these issues. This PEP
@ -536,20 +536,6 @@ the standard streams: ``stdin`` (``0``), ``stdout`` (``1``) and
``stdout`` (``2``). Standard streams are expected to be inherited by
child processes.
Since Python should only create non-inheritable file descriptors, it is
safe to use subprocess with the *close_fds* parameter set to ``False``.
Not closing explicitly file descriptors is faster, especially on
platform with a large maximum number of file descriptors.
The default value of the *close_fds* parameter of the ``subprocess``
module is unchanged, file descriptors and handles are still closed
explicitly on UNIX. Third party modules, especially extensions
implemented in C, can still create inheritable file descriptors and
handles. But with this PEP, it becomes safe to set *close_fds* to
``False`` when all file descriptors and handles are created
non-inheritable, which is faster on UNIX when the maximum number of file
descriptors is large.
Backward Compatibility
======================