Skip to content

bpo-32859: Don't retry dup3() if it is not available at runtime#5708

Merged
benjaminp merged 2 commits into
python:masterfrom
izbyshev:bpo-32859
Feb 20, 2018
Merged

bpo-32859: Don't retry dup3() if it is not available at runtime#5708
benjaminp merged 2 commits into
python:masterfrom
izbyshev:bpo-32859

Conversation

@izbyshev

@izbyshev izbyshev commented Feb 16, 2018

Copy link
Copy Markdown
Contributor

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.

https://bugs.python.org/issue32859

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.
@benjaminp benjaminp merged commit b3caf38 into python:master Feb 20, 2018
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @izbyshev for the PR, and @benjaminp for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7.
🐍🍒⛏🤖

@bedevere-bot

Copy link
Copy Markdown

GH-5768 is a backport of this pull request to the 3.7 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 20, 2018
pythonGH-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 b3caf38)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
@bedevere-bot

Copy link
Copy Markdown

GH-5769 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 20, 2018
pythonGH-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 b3caf38)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
benjaminp pushed a commit that referenced this pull request Feb 20, 2018
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 b3caf38)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
@izbyshev izbyshev deleted the bpo-32859 branch February 20, 2018 12:53
benjaminp pushed a commit that referenced this pull request Feb 21, 2018
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 b3caf38)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants