PEP 446: cleanup recent additions
This commit is contained in:
parent
62767d3960
commit
79d319c3b6
15
pep-0446.txt
15
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
|
||||
<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
|
||||
file descriptors, not on MAXFD.
|
||||
|
||||
|
|
Loading…
Reference in New Issue