Issue #18571: Implementation of the PEP 446: file descriptors and file handles

are now created non-inheritable; add functions os.get/set_inheritable(),
os.get/set_handle_inheritable() and socket.socket.get/set_inheritable().
This commit is contained in:
Victor Stinner 2013-08-28 00:53:59 +02:00
parent 46e1ce214b
commit daf455554b
51 changed files with 1448 additions and 317 deletions

View file

@ -37,8 +37,13 @@ The module defines the following:
increases this value, :c:func:`devpoll` may return an
incomplete list of active file descriptors.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`.
.. versionadded:: 3.3
.. versionchanged:: 3.4
The new file descriptor is now non-inheritable.
.. function:: epoll(sizehint=-1, flags=0)
(Only supported on Linux 2.5.44 and newer.) Return an edge polling object,
@ -49,11 +54,14 @@ The module defines the following:
:ref:`epoll-objects` below for the methods supported by epolling objects.
They also support the :keyword:`with` statement.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`.
.. versionchanged:: 3.3
Added the *flags* parameter.
.. versionchanged:: 3.4
Support for the :keyword:`with` statement was added.
The new file descriptor is now non-inheritable.
.. function:: poll()
@ -69,6 +77,11 @@ The module defines the following:
(Only supported on BSD.) Returns a kernel queue object; see section
:ref:`kqueue-objects` below for the methods supported by kqueue objects.
The new file descriptor is :ref:`non-inheritable <fd_inheritance>`.
.. versionchanged:: 3.4
The new file descriptor is now non-inheritable.
.. function:: kevent(ident, filter=KQ_FILTER_READ, flags=KQ_EV_ADD, fflags=0, data=0, udata=0)