FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-42780: fix set_inheritable() for O_PATH file descriptors on Linux by cptpcrd · Pull Request #24172 · python/cpython · GitHub

Repository navigation

bpo-42780: fix set_inheritable() for O_PATH file descriptors on Linux - #24172

Merged
vstinner merged 3 commits into
python:masterfrom
cptpcrd:set-inheritable
Jan 20, 2021
Merged

vstinner merged 3 commits into
python:masterfrom
cptpcrd:set-inheritable

Conversation

cptpcrd commented Jan 8, 2021 •
edited
Loading

Copy link
Copy Markdown
Contributor

ioctl() doesn't work on O_PATH file descriptors on Linux, which breaks os.set_inheritable() since it uses ioctl(FIOCLEX)/ioctl(FIONCLEX) on Linux. This patch fixes that.

https://bugs.python.org/issue42780

Comment thread Lib/test/test_os.py

Copy link
Copy Markdown
Contributor

Thanks @cptpcrd for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 20, 2021
…pythonGH-24172)

(cherry picked from commit 7dc71c4)

Co-authored-by: cptpcrd <31829097+cptpcrd@users.noreply.github.com>

Copy link
Copy Markdown

GH-24269 is a backport of this pull request to the 3.9 branch.

Copy link
Copy Markdown
Contributor

Thanks @cptpcrd for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 20, 2021
…pythonGH-24172)

(cherry picked from commit 7dc71c4)

Co-authored-by: cptpcrd <31829097+cptpcrd@users.noreply.github.com>

Copy link
Copy Markdown

GH-24270 is a backport of this pull request to the 3.8 branch.

Copy link
Copy Markdown
Member

@cptpcrd: Oh, the automated backport failed: test.support.os_helper doesn't exist in Python 3.8 and 3.9. Can you please try to backport the change? Use git cherry-pick -x 7dc71c425cf6aa6a4070a418dce5d95ca435c79f. You just have to remove ".os_helper" in the test.

cptpcrd added a commit to cptpcrd/cpython that referenced this pull request Jan 20, 2021
cptpcrd added a commit to cptpcrd/cpython that referenced this pull request Jan 20, 2021

cptpcrd commented Jan 20, 2021

Copy link
Copy Markdown
Contributor Author

@cptpcrd: Oh, the automated backport failed: test.support.os_helper doesn't exist in Python 3.8 and 3.9. Can you please try to backport the change? Use git cherry-pick -x 7dc71c425cf6aa6a4070a418dce5d95ca435c79f. You just have to remove ".os_helper" in the test.

It seems that function was available under support.make_bad_fd() (no os_helper). I've cherry-picked the commit (with the fix) into set-inheritable-3.8 and set-inheritable-3.9 on my fork. Should I PR these to 3.8 and 3.9 (respectively)?

Copy link
Copy Markdown
Member

Yes, please create one PR per branch.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL