diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-08-27 22:53:59 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-08-27 22:53:59 (GMT) |
commit | daf455554bc21b6b5df0a016ab5fa639d36cc595 (patch) | |
tree | 216f52f9f6d9aed0406b2ce2574e5a02aa93e327 /Doc/whatsnew | |
parent | 46e1ce214b5711e8dae63a1b5a0a7aafb371baf0 (diff) | |
download | cpython-daf455554bc21b6b5df0a016ab5fa639d36cc595.zip cpython-daf455554bc21b6b5df0a016ab5fa639d36cc595.tar.gz cpython-daf455554bc21b6b5df0a016ab5fa639d36cc595.tar.bz2 |
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().
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/3.4.rst | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst index d56b422..41b161c 100644 --- a/Doc/whatsnew/3.4.rst +++ b/Doc/whatsnew/3.4.rst @@ -96,6 +96,7 @@ New built-in features: * :ref:`PEP 442: Safe object finalization <pep-442>`. * :ref:`PEP 445: Configurable memory allocators <pep-445>`. +* :ref:`PEP 446: Make newly created file descriptors non-inheritable <pep-446>`. Implementation improvements: @@ -118,6 +119,19 @@ Security improvements: Please read on for a comprehensive list of user-facing changes. +.. _pep-446: + +PEP 446: Make newly created file descriptors non-inheritable +============================================================ + +The :pep:`446` makes newly created file descriptors `non-inheritable +<fd_inheritance>`_. New functions and methods: + +* :func:`os.get_inheritable`, :func:`os.set_inheritable` +* :func:`os.get_handle_inheritable`, :func:`os.set_handle_inheritable` +* :meth:`socket.socket.get_inheritable`, :meth:`socket.socket.set_inheritable` + + .. _pep-445: PEP 445: Add new APIs to customize Python memory allocators @@ -267,6 +281,16 @@ Also, except when using the old *fork* start method, child processes will no longer inherit unneeded handles/file descriptors from their parents. +os +-- + +New functions to get and set the `inheritable flag <fd_inheritance>`_ of a file +descriptors or a Windows handle: + +* :func:`os.get_inheritable`, :func:`os.set_inheritable` +* :func:`os.get_handle_inheritable`, :func:`os.set_handle_inheritable` + + poplib ------ @@ -288,6 +312,15 @@ try/except statement by code that only cares whether or not an error occurred. (:issue:`2118`). +socket +------ + +Socket objects have new methods to get or set their `inheritable flag +<fd_inheritance>`_: + +* :meth:`socket.socket.get_inheritable`, :meth:`socket.socket.set_inheritable` + + ssl --- |