[Python-checkins] peps: PEP 446: the PEP does not propose to change the default value of close_fds

victor.stinner python-checkins at python.org
Tue Aug 27 23:28:29 CEST 2013


http://hg.python.org/peps/rev/9cb6a8cea52e
changeset:   5078:9cb6a8cea52e
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Tue Aug 27 23:27:59 2013 +0200
summary:
  PEP 446: the PEP does not propose to change the default value of close_fds

So remove mention of performances

files:
  pep-0446.txt |  16 +---------------
  1 files changed, 1 insertions(+), 15 deletions(-)


diff --git a/pep-0446.txt b/pep-0446.txt
--- a/pep-0446.txt
+++ b/pep-0446.txt
@@ -16,7 +16,7 @@
 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 @@
 ``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
 ======================

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list