Skip to content

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

Merged
barneygale merged 3 commits into
python:mainfrom
barneygale:gh-114847-getcwd-unreachable
Apr 3, 2024
Merged

barneygale merged 3 commits into
python:mainfrom
barneygale:gh-114847-getcwd-unreachable

Conversation

@barneygale

@barneygale barneygale commented Apr 2, 2024 •

Copy link
Copy Markdown
Contributor

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
Comment thread Modules/posixmodule.c Resolved
Co-authored-by: Petr Viktorin <encukou@gmail.com>
@barneygale

Copy link
Copy Markdown
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 <encukou@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants