]> granicus.if.org Git - python/commit
Avoid fcntl() if possible in set_inheritable()
authorVictor Stinner <victor.stinner@gmail.com>
Sun, 17 Apr 2016 14:51:52 +0000 (16:51 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Sun, 17 Apr 2016 14:51:52 +0000 (16:51 +0200)
commita858bbde03638e3145894029dbc40d3d777be24f
tree31a6a4da0c0e64ee88a8ce0f26a1ee8ae2fb06cd
parentb6a9c9761ca988e1ab69defd45433fac0b2ff89c
Avoid fcntl() if possible in set_inheritable()

Issue #26770: set_inheritable() avoids calling fcntl() twice if the FD_CLOEXEC
is already set/cleared. This change only impacts platforms using the fcntl()
implementation of set_inheritable() (not Linux nor Windows).
Python/fileutils.c