]> granicus.if.org Git - python/commit
closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 21 Feb 2018 05:21:12 +0000 (21:21 -0800)
committerBenjamin Peterson <benjamin@python.org>
Wed, 21 Feb 2018 05:21:12 +0000 (21:21 -0800)
commit16de2a9b8697cf90840eb217fb079f9c4c73e588
tree9d2be73c1c562edb97d3494849ff795b030289d7
parent76c3f5eeb07aeb037da1ed6761dd9bd95e2c1d8d
closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)

os.dup2() tests for dup3() system call availability at runtime,
but doesn't remember the result across calls, repeating
the test on each call with inheritable=False.

Since the caller of os.dup2() is expected to hold the GIL,
fix this by making the variable holding the test result static.
(cherry picked from commit b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
Misc/NEWS.d/next/Library/2018-02-19-17-46-31.bpo-32859.kAT-Xp.rst [new file with mode: 0644]
Modules/posixmodule.c