[Python-checkins] peps: PEP 446: add new os.get/set_blocking() functions

victor.stinner python-checkins at python.org
Sun Jul 7 15:06:11 CEST 2013


http://hg.python.org/peps/rev/ce61588d244c
changeset:   4984:ce61588d244c
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Sun Jul 07 15:05:58 2013 +0200
summary:
  PEP 446: add new os.get/set_blocking() functions

files:
  pep-0446.txt |  13 +++++++++++--
  1 files changed, 11 insertions(+), 2 deletions(-)


diff --git a/pep-0446.txt b/pep-0446.txt
--- a/pep-0446.txt
+++ b/pep-0446.txt
@@ -127,21 +127,30 @@
 setting close-on-exec and blocking flags at the creation of the file
 descriptor or socket, the flags are set using additional system calls.
 
+
 New Functions
 -------------
 
 Add new functions the get and set the close-on-exec flag of a file
-descriptor:
+descriptor, available on all platforms:
 
 * ``os.get_cloexec(fd:int) -> bool``
 * ``os.set_cloexec(fd:int, cloexec: bool)``
 
+Add new functions the get and set the blocking flag of a file
+descriptor, only available on UNIX:
+
+* ``os.get_blocking(fd:int) -> bool``
+* ``os.set_blocking(fd:int, blocking: bool)``
+
 
 Other Changes
 -------------
 
 The ``subprocess.Popen`` class must clear the close-on-exec flag of file
-descriptors of the ``pass_fds`` parameter.
+descriptors of the ``pass_fds`` parameter. The flag is cleared in the
+child process before executing the program, the change does not change
+the flag in the parent process.
 
 The close-on-exec flag must also be set on private file descriptors and
 sockets in the Python standard library. For example, on UNIX,

-- 
Repository URL: http://hg.python.org/peps


More information about the Python-checkins mailing list