Skip to content

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

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

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.
@barneygale barneygale marked this pull request as ready for review April 2, 2024 20:30
Co-authored-by: Petr Viktorin <[email protected]>
@barneygale
Copy link
Contributor Author

Thanks for the review!

@barneygale barneygale merged commit 345194d into python:main Apr 3, 2024
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 <[email protected]>
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