Eryk Sun <eryk...@gmail.com> added the comment:

> 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

----------
nosy: +eryksun

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42569>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to