diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-15 21:20:39 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-08-15 21:20:39 (GMT) |
commit | 721738fbee8d75dab5a5d3c4f3dbd7c72d76925e (patch) | |
tree | c0e693ed7f2e6c44d48555f3cc4d8775ac8e14bb /Modules/_posixsubprocess.c | |
parent | 9351117139363f3e600c541bc88139702a055db8 (diff) | |
parent | 6f430e496339aea3e688165340456b555d5e1035 (diff) | |
download | cpython-721738fbee8d75dab5a5d3c4f3dbd7c72d76925e.zip cpython-721738fbee8d75dab5a5d3c4f3dbd7c72d76925e.tar.gz cpython-721738fbee8d75dab5a5d3c4f3dbd7c72d76925e.tar.bz2 |
Issue #15604: Update uses of PyObject_IsTrue() to check for and handle errors correctly.
Patch by Serhiy Storchaka.
Diffstat (limited to 'Modules/_posixsubprocess.c')
-rw-r--r-- | Modules/_posixsubprocess.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c index 4a14788..ed2dd58 100644 --- a/Modules/_posixsubprocess.c +++ b/Modules/_posixsubprocess.c @@ -503,7 +503,7 @@ static PyObject * subprocess_fork_exec(PyObject* self, PyObject *args) { PyObject *gc_module = NULL; - PyObject *executable_list, *py_close_fds, *py_fds_to_keep; + PyObject *executable_list, *py_fds_to_keep; PyObject *env_list, *preexec_fn; PyObject *process_args, *converted_args = NULL, *fast_args = NULL; PyObject *preexec_fn_args_tuple = NULL; @@ -518,15 +518,14 @@ subprocess_fork_exec(PyObject* self, PyObject *args) Py_ssize_t arg_num; if (!PyArg_ParseTuple( - args, "OOOOOOiiiiiiiiiiO:fork_exec", - &process_args, &executable_list, &py_close_fds, &py_fds_to_keep, + args, "OOpOOOiiiiiiiiiiO:fork_exec", + &process_args, &executable_list, &close_fds, &py_fds_to_keep, &cwd_obj, &env_list, &p2cread, &p2cwrite, &c2pread, &c2pwrite, &errread, &errwrite, &errpipe_read, &errpipe_write, &restore_signals, &call_setsid, &preexec_fn)) return NULL; - close_fds = PyObject_IsTrue(py_close_fds); if (close_fds && errpipe_write < 3) { /* precondition */ PyErr_SetString(PyExc_ValueError, "errpipe_write must be >= 3"); return NULL; |