STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Using spawn_python() to check that os.O_CLOEXEC flag is correctly set seems 
overkill. Why not just testing fcntl.fcntl(f.fileno(), fcntl.F_GETFL) & 
FD_CLOEXEC)? I don't think that there are OSes with O_CLOEXEC but without 
fcntl(F_GETFL).

> Note that I'm not sure that adding this flag to built-in open()
> is necessarily a good idea

I agree.

open() documentation may explain the os.fdopen(os.open()) "trick" to use 
low-level options like O_SYNC or O_CLOEXEC.

----------

_______________________________________
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