[Python-Dev] (New) PEP 446: Make newly created file descriptors non-inheritable

Richard Oudkerk shibturn at gmail.com
Tue Aug 6 02:48:18 CEST 2013

On 06/08/2013 1:23am, Victor Stinner wrote:
> Each operating system handles the inheritance of file descriptors
> differently. Windows creates non-inheritable file descriptors by
> default, whereas UNIX creates inheritable file descriptors by default.

The Windows API creates non-inheritable *handles* by default.  But the C 
runtime creates inheritable fds by default.

Also the socket library creates sockets with inheritable handles by 
default.  Apparently there isn't a reliable way to make sockets 
non-inheritable because anti-virus/firewall software can interfere:



More information about the Python-Dev mailing list