STINNER Victor <vstin...@redhat.com> added the comment:

The Linux kernel has a bad habit of ignoring unknown flags. If your libc is 
recent and contains O_CLOEXEC but your Linux kernel is old and doesn't know 
O_CLOEXEC, the flag will be simply ignored. It can happen when a Linux 
distribution builds a package with a recent kernel / libc, but you run an older 
kernel / libc. More info in the PEP 446:

https://www.python.org/dev/peps/pep-0446/#atomic-creation-of-non-inheritable-file-descriptors

> if (_Py_set_inheritable(fd, 0, atomic_flag_works) < 0) {

Look for the atomic_flag_works: if it's 1, the function does nothing.

I don't think that this issue is a bug, so I suggest to close it. The bug 
tracker is not the right place to ask questions ;-)

----------
nosy: +vstinner

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

Reply via email to