diff --git a/pep-0446.txt b/pep-0446.txt index 6fd9509b2..ea1336573 100644 --- a/pep-0446.txt +++ b/pep-0446.txt @@ -127,21 +127,30 @@ The atomicity is not guaranteed. If the platform does not support 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,