Марк Коренберг <socketp...@gmail.com> added the comment:

O_CLOEXEC is not linux-only. Windows has the same flag. In file-opening 
functions there is lpSecurityAttributes argument. And there is bInheritHandle 
member of corresponding structure.

http://msdn.microsoft.com/en-us/library/aa379560(v=VS.85).aspx :
bInheritHandle
A Boolean value that specifies whether the returned handle is inherited when a 
new process is created. If this member is TRUE, the new process inherits the 
handle.

So, why not to implement 'e' letter in open()? it is true crossplatform. On 
platforms where inheritance does not work, flag should be ignored.

P.S. Moreover, I think that all file-descriptor-crete functions (open, socket, 
pipe, dup, ...) should set CLOEXEC atomically

----------
status: closed -> open

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

Reply via email to