]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
GH-114847: Raise FileNotFoundError when getcwd() returns '(unreachable)' (#117481)
authorBarney Gale <barney.gale@gmail.com>
Wed, 3 Apr 2024 15:39:40 +0000 (16:39 +0100)
committerGitHub <noreply@github.com>
Wed, 3 Apr 2024 15:39:40 +0000 (16:39 +0100)
commit345194de8cb3ceaa40d19353d30ba6e23b6e6edb
tree916f0777eb98cc840c15296e9a577099eb3b9f50
parent03f7aaf953f00bf2953c21a057d8e6e88db659c8
GH-114847: Raise FileNotFoundError when getcwd() returns '(unreachable)' (#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>
Misc/NEWS.d/next/Library/2024-04-02-20-30-12.gh-issue-114848.YX4pEc.rst [new file with mode: 0644]
Modules/posixmodule.c