Kaydet (Commit) 9c822272 authored tarafından Jesus Cea's avatar Jesus Cea

Yet another fix for #12763: test_posix failure on OpenIndiana

üst ceb5d169
......@@ -4741,7 +4741,13 @@ posix_sched_setscheduler(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, _Py_PARSE_PID "iO&:sched_setscheduler",
&pid, &policy, &convert_sched_param, &param))
return NULL;
if (sched_setscheduler(pid, policy, &param))
/*
** sched_setscheduler() returns 0 in Linux, but
** the previous scheduling policy.
** On error, -1 is returned in all Operative Systems.
*/
if (sched_setscheduler(pid, policy, &param) == -1)
return posix_error();
Py_RETURN_NONE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment