Skip to content

gh-145335: Fix os functions when passing fd -1 as path#145439

Draft
vstinner wants to merge 3 commits intopython:mainfrom
vstinner:ebadf
Draft

gh-145335: Fix os functions when passing fd -1 as path#145439
vstinner wants to merge 3 commits intopython:mainfrom
vstinner:ebadf

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Mar 2, 2026

os.listdir(-1) and os.scandir(-1) now fail with OSError(errno.EBADF) rather than listing the current directory.

os.listxattr(-1) now fails with OSError(errno.EBADF) rather than listing extended attributes of the current directory.

os.listdir(-1) and os.scandir(-1) now fail with OSError(errno.EBADF)
rather than listing the current directory.

os.listxattr(-1) now fails with OSError(errno.EBADF) rather than
listing extended attributes of the current directory.
@vstinner vstinner added 🔨 test-with-buildbots Test PR w/ buildbots; report in status section and removed 🔨 test-with-buildbots Test PR w/ buildbots; report in status section labels Mar 2, 2026
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @vstinner for commit a894262 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F145439%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Mar 2, 2026
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.

2 participants