New submission from cagney <[email protected]>:
When O_CLOEXEC is defined the file is opened with that flag (YA! - this means
that the operation is atomic and, by default, the FD will be closed across
os.posix_spawn()).
However the code then goes on an executes:
#ifndef MS_WINDOWS
if (_Py_set_inheritable(fd, 0, atomic_flag_works) < 0) {
close(fd);
return -1;
}
#endif
should this also be #ifndef O_CLOEXEC?
----------
messages: 340050
nosy: cagney
priority: normal
severity: normal
status: open
title: why call _Py_set_inheritable(0) from os.open() when O_CLOEXEC?
versions: Python 3.8
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue36615>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com