From 6e741896c130d3fda2ebaad5f79848154ed41e9d Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 27 Aug 2013 23:27:59 +0200 Subject: [PATCH] PEP 446: the PEP does not propose to change the default value of close_fds So remove mention of performances --- pep-0446.txt | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/pep-0446.txt b/pep-0446.txt index 058abffd8..b0693dbde 100644 --- a/pep-0446.txt +++ b/pep-0446.txt @@ -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 ======================