Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix the backport for pre-argument-clinic life.
  • Loading branch information
gpshead committed May 23, 2023
commit 0ecbcba92a0e4efa7b075bf01b0bf898fc42aee0
3 changes: 2 additions & 1 deletion Modules/_posixsubprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -852,7 +852,7 @@ subprocess_fork_exec(PyObject *module, PyObject *args)
int saved_errno = 0;
int allow_vfork;
int *c_fds_to_keep = NULL;
Py_ssize_t fds_to_keep_len = PyTuple_GET_SIZE(py_fds_to_keep);
Py_ssize_t fds_to_keep_len = 0;

if (!PyArg_ParseTuple(
args, "OOpO!OOiiiiiiiiii" _Py_PARSE_PID "OOOiOp:fork_exec",
Expand Down Expand Up @@ -881,6 +881,7 @@ subprocess_fork_exec(PyObject *module, PyObject *args)
PyErr_SetString(PyExc_ValueError, "bad value(s) in fds_to_keep");
return NULL;
}
fds_to_keep_len = PyTuple_GET_SIZE(py_fds_to_keep);

PyInterpreterState *interp = PyInterpreterState_Get();
const PyConfig *config = _PyInterpreterState_GetConfig(interp);
Expand Down