SIGN IN SIGN UP

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

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.
V
Victor Stinner committed
52c8efa87d028e57895d6a44f22caeb99a589711
Parent: db41717
Committed by GitHub <noreply@github.com> on 3/3/2026, 12:57:08 PM