Charles-François Natali <[email protected]> added the comment:

The real issue is that the libc defines O_CLOEXEC, but kernels prior to 2.6.23 
don't support it: instead of returning EINVAL, the socket syscall silently 
ignores the flag (don't know why I made the comment about this flag being 
defined to 0...).
IMHO this is really a distribution packaging bug (kernel/libc mismatch), and a 
quite serious one.
I don't think we should be fixing this in Python, but that we should merely 
skip this test on kernels older than 2.6.23.
People should complain to their distributions vendors instead (I tested this on 
RHEL4, RHEL6 and Debian Squeeze without problem).

I personally don't like the idea of a best-effort O_CLOEXEC implementation: 
providing a O_CLOEXEC flag which is not atomic feels really wrong to me.

----------

_______________________________________
Python tracker <[email protected]>
<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