diff --git a/pep-0446.txt b/pep-0446.txt index 237e25299..467441aa2 100644 --- a/pep-0446.txt +++ b/pep-0446.txt @@ -285,17 +285,18 @@ Legend: Performances of Closing All File Descriptors -------------------------------------------- -On UNIX, the subprocess module closes almost all file descriptors in the -child process. This operation require MAXFD system calls where MAXFD is -the maximum number of file descriptors, even if there are few open file -descriptors. This maximum can be get using: ``sysconf("SC_OPEN_MAX")``. +On UNIX, the ``subprocess`` module closes almost all file descriptors in +the child process. This operation require MAXFD system calls, where +MAXFD is the maximum number of file descriptors, even if there are only +few open file descriptors. This maximum can be read using: +``sysconf("SC_OPEN_MAX")``. The operation can be slow if MAXFD is large. For example, on a FreeBSD -buildbot with ``MAXFD=655,000``, the operation took 0.3 second: see +buildbot with ``MAXFD=655,000``, the operation took 300 ms: see `issue #11284: slow close file descriptors -`_). +`_. -On Linux, Python gets the list of all open file descriptors from +On Linux, Python 3.3 gets the list of all open file descriptors from ``/proc//fd/``, and so performances depends on the number of open file descriptors, not on MAXFD.