diff --git a/pep-0446.txt b/pep-0446.txt index 774c3c0da..0d64fd5d4 100644 --- a/pep-0446.txt +++ b/pep-0446.txt @@ -490,8 +490,8 @@ non-inheritable. The atomicity is not guaranteed because a fallback is required when atomic flags are not available. -New Functions -------------- +New Functions And Methods +------------------------- New functions available on all platforms: @@ -507,9 +507,12 @@ New functions only available on Windows: * ``os.set_handle_inheritable(handle: int, inheritable: bool)``: clear or set the inheritable flag of the specified handle. -The ``fileno()`` method of a socket returns a file descriptor on UNIX, -whereas it returns a handle on Windows. So a different function must be -used depending on the platform to manage the inheritable of a socket. +New methods: + +* ``socket.socket.get_inheritable()``: return ``True`` if the + socket can be inherited by child processes, ``False`` otherwise. +* ``socket.socket.set_inheritable(inheritable: bool)``: clear + or set the inheritable flag of the specified socket. Other Changes