]> granicus.if.org Git - python/commit
closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)
authorAlexey Izbyshev <izbyshev@users.noreply.github.com>
Tue, 20 Feb 2018 07:25:46 +0000 (10:25 +0300)
committerBenjamin Peterson <benjamin@python.org>
Tue, 20 Feb 2018 07:25:46 +0000 (23:25 -0800)
commitb3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd
tree7025b2b4dbc38210b441ceb9b991c1ca6ade3a4d
parent6240917b773b52f8883387b9e3a5f327a4372068
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.
Misc/NEWS.d/next/Library/2018-02-19-17-46-31.bpo-32859.kAT-Xp.rst [new file with mode: 0644]
Modules/posixmodule.c