peps: ce61588d244c (original) (raw)
Mercurial > peps
changeset 4984:ce61588d244c
PEP 446: add new os.get/set_blocking() functions
Victor Stinner victor.stinner@gmail.com | |
---|---|
date | Sun, 07 Jul 2013 15:05:58 +0200 |
parents | a7faa4aa505e |
children | e91b098137c5 |
files | pep-0446.txt |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-)[+] [-] pep-0446.txt 13 |
line wrap: on
line diff
--- a/pep-0446.txt +++ b/pep-0446.txt @@ -127,21 +127,30 @@ The atomicity is not guaranteed. If the 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 ------------- Thesubprocess.Popen
class must clear the close-on-exec flag of file -descriptors of thepass_fds
parameter. +descriptors of thepass_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,