]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-104522: Fix OSError raised when run a subprocess (GH-114195) (#114219)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 18 Jan 2024 01:19:11 +0000 (02:19 +0100)
committerGitHub <noreply@github.com>
Thu, 18 Jan 2024 01:19:11 +0000 (01:19 +0000)
commitf8fc8534c4abd384160b3b03a253bb0a30e6ba68
treea9c30890e7b6c2bfcebd932863700a002b12e7a0
parent2c9cf64a3fa2b476c66eb80970e02933b7d33d05
[3.12] gh-104522: Fix OSError raised when run a subprocess (GH-114195) (#114219)

gh-104522: Fix OSError raised when run a subprocess (GH-114195)

Only set filename to cwd if it was caused by failed chdir(cwd).

_fork_exec() now returns "noexec:chdir" for failed chdir(cwd).

(cherry picked from commit e2c097ebdee447ded1109f99a235e65aa3533bf8)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Robert O'Shea <PurityLake@users.noreply.github.com>
Lib/subprocess.py
Lib/test/test_subprocess.py
Misc/NEWS.d/next/Library/2024-01-17-18-53-51.gh-issue-104522.3NyDf4.rst [new file with mode: 0644]
Modules/_posixsubprocess.c