Charles-François Natali added the comment:

> Windows provides O_NOINHERIT (_O_NOINHERIT) flag which has a similar purpose.
>
>> ... and even then, many Unices don't support it.
>
> Yes, but I bet that more and more OSes will support it :-) For example, it 
> looks like O_CLOEXEC is part of the POSIX standard 2008:

Hum, OK, but many operating systems don't support it to this day.
So if we expose it and the underlying operating system doesn't support
it, do you want to fallback to fcntl (which wouldb't be atomic
anymore, but let's pretend the GIL protection is enough).

Also, I'm not sure exactly if this flag is useful enough to be
exposed: there are many flags that can be passed when opening a file:
O_DIRECT, O_SYNC, O_NONBLOCK, O_DSYNC...
Amusingly, Java exposes some of them (but not O_CLOEXEC):
http://docs.oracle.com/javase/7/docs/api/java/nio/file/StandardOpenOption.html

----------

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

Reply via email to