[New-bugs-announce] [issue36615] why call _Py_set_inheritable(0) from os.open() when O_CLOEXEC?
cagney
report at bugs.python.org
Fri Apr 12 10:46:33 EDT 2019
New submission from cagney <andrew.cagney at gmail.com>:
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 <report at bugs.python.org>
<https://bugs.python.org/issue36615>
_______________________________________
More information about the New-bugs-announce
mailing list