Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-114847: Raise FileNotFoundError when getcwd() returns '(unreachable)' #117481

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Apr 2, 2024

On Linux >= 2.6.36 with glibc < 2.27, getcwd() can return a relative pathname starting with '(unreachable)'. We detect this and fail with ENOENT, matching new glibc behaviour.

See https://sourceware.org/bugzilla/show_bug.cgi?id=18203

…achable)'

On Linux >= 2.6.36 with glibc < 2.27, `getcwd()` can return a relative
pathname starting with '(unreachable)'. We detect this and fail with
ENOENT, matching new glibc behaviour.
Modules/posixmodule.c Show resolved Hide resolved
Co-authored-by: Petr Viktorin <encukou@gmail.com>
@barneygale
Copy link
Contributor Author

Thanks for the review!

@barneygale barneygale merged commit 345194d into python:main Apr 3, 2024
36 checks passed
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
…achable)' (python#117481)

On Linux >= 2.6.36 with glibc < 2.27, `getcwd()` can return a relative
pathname starting with '(unreachable)'. We detect this and fail with
ENOENT, matching new glibc behaviour.

Co-authored-by: Petr Viktorin <encukou@gmail.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.

None yet

2 participants