PEP 446: Windows creates non-inheritable *handles* (not fds)

This commit is contained in:
Victor Stinner 2013-08-07 01:41:46 +02:00
parent caa1de40f7
commit e3d0699cde
1 changed files with 5 additions and 4 deletions

View File

@ -32,10 +32,11 @@ Inheritance of File Descriptors
-------------------------------
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.
Python prefers the POSIX API over the native Windows API to have a
single code base, and so it creates inheritable file descriptors.
differently. Windows creates non-inheritable handles by default, whereas
UNIX and the POSIX API of Windows create inheritable file descriptors by
default. Python prefers the POSIX API over the native Windows API to
have a single code base and to use the same type for file descriptors,
and so it creates inheritable file descriptors.
There is one exception: ``os.pipe()`` creates non-inheritable pipes on
Windows, whereas it creates inheritable pipes on UNIX. The reason is an