https://github.com/python/cpython/commit/53ca3b7b5ce6308f78d53040098290f5b1d3e40f
commit: 53ca3b7b5ce6308f78d53040098290f5b1d3e40f
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: vstinner <[email protected]>
date: 2025-12-17T15:43:51Z
summary:

[3.13] Fix os.posix_spawn() error handling (GH-142532) (#142581)

Fix os.posix_spawn() error handling (GH-142532)

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

Co-authored-by: Bartosz SÅ‚awecki <[email protected]>

files:
M Modules/posixmodule.c

diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 2370ac19c1dd42..e50a14dcb7b1f4 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -7352,7 +7352,7 @@ py_posix_spawn(int use_posix_spawnp, PyObject *module, 
path_t *path, PyObject *a
     if (argc < 1) {
         PyErr_Format(PyExc_ValueError,
                      "%s: argv must not be empty", func_name);
-        return NULL;
+        goto exit;
     }
 
     if (!PyMapping_Check(env) && env != Py_None) {

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to