PEP 446: cleanup recent additions

This commit is contained in:
Victor Stinner 2013-08-07 01:49:59 +02:00
parent 62767d3960
commit 79d319c3b6
1 changed files with 8 additions and 7 deletions

View File

@ -285,17 +285,18 @@ Legend:
Performances of Closing All File Descriptors Performances of Closing All File Descriptors
-------------------------------------------- --------------------------------------------
On UNIX, the subprocess module closes almost all file descriptors in the On UNIX, the ``subprocess`` module closes almost all file descriptors in
child process. This operation require MAXFD system calls where MAXFD is the child process. This operation require MAXFD system calls, where
the maximum number of file descriptors, even if there are few open file MAXFD is the maximum number of file descriptors, even if there are only
descriptors. This maximum can be get using: ``sysconf("SC_OPEN_MAX")``. 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 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 `issue #11284: slow close file descriptors
<http://bugs.python.org/issue11284#msg132668>`_). <http://bugs.python.org/issue11284#msg132668>`_.
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/<PID>/fd/``, and so performances depends on the number of open ``/proc/<PID>/fd/``, and so performances depends on the number of open
file descriptors, not on MAXFD. file descriptors, not on MAXFD.