8000 [3.11] gh-104372: Cleanup _posixsubprocess make_inheritable for async signal safety gh-104518 by gpshead · Pull Request #104785 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.11] gh-104372: Cleanup _posixsubprocess make_inheritable for async signal safety gh-104518 #104785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 24, 2023
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
0