Skip to content

Conversation

@johnslavik
Copy link
Contributor

@johnslavik johnslavik commented Dec 10, 2025

return NULL has quite the same effect right now -- exit doesn't have anything to clean up at this point of execution.

Nevertheless, I think it's better to reduce the possibility of something slipping through in the future.
Especially since all the surrounding preconditions do use goto exit.

CC @ZeroIntensity extension-modules, skip issue, skip news

@StanFromIreland StanFromIreland added skip issue skip news extension-modules C modules in the Modules dir type-refactor Code refactoring (with no changes in behavior) labels Dec 10, 2025
@StanFromIreland
Copy link
Member

You need to update the branch to fix CI.

@vstinner vstinner merged commit 8cfa351 into python:main Dec 11, 2025
44 checks passed
@vstinner vstinner added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Dec 11, 2025
@miss-islington-app
Copy link

Thanks @johnslavik for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @johnslavik for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 11, 2025
Consistently use `goto exit;` in `py_posix_spawn()`.
(cherry picked from commit 8cfa351)

Co-authored-by: Bartosz Sławecki <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Dec 11, 2025
Consistently use `goto exit;` in `py_posix_spawn()`.
(cherry picked from commit 8cfa351)

Co-authored-by: Bartosz Sławecki <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Dec 11, 2025

GH-142581 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Dec 11, 2025
@bedevere-app
Copy link

bedevere-app bot commented Dec 11, 2025

GH-142582 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Dec 11, 2025
@vstinner
Copy link
Member

Merged, thanks for the fix!

vstinner pushed a commit that referenced this pull request Dec 11, 2025
Fix os.posix_spawn() error handling (GH-142532)

Consistently use `goto exit;` in `py_posix_spawn()`.
(cherry picked from commit 8cfa351)

Co-authored-by: Bartosz Sławecki <[email protected]>
fatelei pushed a commit to fatelei/cpython that referenced this pull request Dec 12, 2025
Consistently use `goto exit;` in `py_posix_spawn()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension-modules C modules in the Modules dir skip issue skip news type-refactor Code refactoring (with no changes in behavior)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants