mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
closes bpo-37420: Handle errors during iteration in os.sched_setaffinity. (GH-14414)
This commit is contained in:
parent
97d15b1ee0
commit
45a30af109
3 changed files with 6 additions and 0 deletions
|
|
@ -6413,6 +6413,9 @@ os_sched_setaffinity_impl(PyObject *module, pid_t pid, PyObject *mask)
|
|||
}
|
||||
CPU_SET_S(cpu, setsize, cpu_set);
|
||||
}
|
||||
if (PyErr_Occurred()) {
|
||||
goto error;
|
||||
}
|
||||
Py_CLEAR(iterator);
|
||||
|
||||
if (sched_setaffinity(pid, setsize, cpu_set)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue