Author eryksun
Recipients eryksun, izbyshev, steve.dower, vstinner
Date 2020-12-04.22:35:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1607121314.41.0.595806743841.issue42569@roundup.psfhosted.org>
In-reply-to
Content
> To implement PEP 446: create non-inheritable file descriptors.

Side note. That aspect is still wonky in Windows, for which set_inheritable() cannot be implemented reliably since there's no way to change whether an existing CRT file descriptor is inheritable. The current implementation just puts the combination of CRT fd and OS handle in a bad state (discussed in more detail in bpo-32865, an issue about fixing os.pipe, but related). In Windows, the fopen() and _wfopen() calls here should use the non-standard "N" flag [1] to open a non-inheritable file descriptor and skip calling set_inheritable().

---

[1] https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/fopen-wfopen?view=msvc-160
History
Date User Action Args
2020-12-04 22:35:14eryksunsetrecipients: + eryksun, vstinner, steve.dower, izbyshev
2020-12-04 22:35:14eryksunsetmessageid: <1607121314.41.0.595806743841.issue42569@roundup.psfhosted.org>
2020-12-04 22:35:14eryksunlinkissue42569 messages
2020-12-04 22:35:14eryksuncreate