[New-bugs-announce] [issue26770] _Py_set_inheritable(): do nothing if the FD_CLOEXEC close is already set/cleared
STINNER Victor
report at bugs.python.org
Fri Apr 15 09:21:00 EDT 2016
New submission from STINNER Victor:
Attached patch is avoids a syscall in os.set_inheritable() if the FD_CLOEXEC flag is already set/cleared.
The change only impacts platforms using fcntl() in _Py_set_inheritable(). Windows has a different implementation, and Linux uses ioctl() for example.
The same "optimization" is used in socket.socket.setblocking(): see the issue #19827.
----------
files: set_inheritable_fcntl.patch
keywords: patch
messages: 263493
nosy: haypo
priority: normal
severity: normal
status: open
title: _Py_set_inheritable(): do nothing if the FD_CLOEXEC close is already set/cleared
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file42472/set_inheritable_fcntl.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26770>
_______________________________________
More information about the New-bugs-announce
mailing list