From d61ff56aa88ef34e7044e3d95f221a522a95f102 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 19 Nov 2007 04:24:28 +0000 Subject: [PATCH] Add BUGS text noting that the return value from Linux sched_setschuler() does not conform to POSIX. --- man2/sched_setscheduler.2 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/man2/sched_setscheduler.2 b/man2/sched_setscheduler.2 index 02922a0f2..a30cd5e7b 100644 --- a/man2/sched_setscheduler.2 +++ b/man2/sched_setscheduler.2 @@ -320,7 +320,7 @@ The calling process does not have appropriate privileges. .B ESRCH The process whose ID is \fIpid\fP could not be found. .SH "CONFORMING TO" -POSIX.1-2001. +POSIX.1-2001 (but see BUGS below). The \fBSCHED_BATCH\fP policy is Linux specific. .SH NOTES POSIX.1 does not detail the permissions that an unprivileged @@ -383,6 +383,14 @@ The FIFO and RR scheduling policies that can be selected using .BR sched_setscheduler () are then used to run a process with true real-time priority and a minimum worst-case scheduling latency. +.SH BUGS +POSIX says that on success, +.BR sched_setscheduler () +should return the previous scheduling policy. +Linux +.BR sched_setscheduler () +does not conform to this requirement, +since it always returns 0 on success. .SH "SEE ALSO" .BR getpriority (2), .BR mlock (2),