gh-104522: Fix OSError raised when run a subprocess#114195
Conversation
Only set filename to cwd if it was caused by failed chdir(cwd). _fork_exec() now returns "noexec:chdir" for failed chdir(cwd). Co-authored-by: Robert O'Shea <PurityLake@users.noreply.github.com>
gpshead
left a comment
There was a problem hiding this comment.
nice user experience improvement bugfix!
|
Thanks @serhiy-storchaka for the PR, and @gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
|
Sorry, @serhiy-storchaka and @gpshead, I could not cleanly backport this to |
|
GH-114219 is a backport of this pull request to the 3.12 branch. |
|
|
GH-114243 is a backport of this pull request to the 3.11 branch. |
Only set filename to cwd if it was caused by failed chdir(cwd).
_fork_exec() now returns "noexec:chdir" for failed chdir(cwd).
Based on idea from #104851. It is more reliable, because does not guess, but know if the error was caused by
chdir(cwd). It also contains tests.