[Python-checkins] cpython: Yet another fix for #12763: test_posix failure on OpenIndiana
jesus.cea
python-checkins at python.org
Sat Sep 10 01:40:59 CEST 2011
http://hg.python.org/cpython/rev/9ef10328180b
changeset: 72328:9ef10328180b
user: Jesus Cea <jcea at jcea.es>
date: Sat Sep 10 01:40:52 2011 +0200
summary:
Yet another fix for #12763: test_posix failure on OpenIndiana
files:
Modules/posixmodule.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -4741,7 +4741,13 @@
if (!PyArg_ParseTuple(args, _Py_PARSE_PID "iO&:sched_setscheduler",
&pid, &policy, &convert_sched_param, ¶m))
return NULL;
- if (sched_setscheduler(pid, policy, ¶m))
+
+ /*
+ ** 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, ¶m) == -1)
return posix_error();
Py_RETURN_NONE;
}
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list