]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
getpriority.2: Make discussion of RLIMIT_NICE more prominent
authorMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 1 Jul 2016 22:45:20 +0000 (00:45 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 1 Jul 2016 22:45:20 +0000 (00:45 +0200)
The discussion of RLIMIT_NICE was hidden under the EPERM error,
where it was difficult to find. Place some relevant text in
DESCRIPTION.

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/getpriority.2

index 619956f5c336b148bb4809d957f53a980f745761..88ea1dfee70a0915813b711615aed624b4ba2938 100644 (file)
@@ -106,7 +106,15 @@ The
 .BR setpriority ()
 call sets the priorities of all of the specified processes
 to the specified value.
-Only the superuser may lower priorities.
+
+Traditionally, only a privileged process could lower the nice value
+(i.e., set a higher priority).
+However, since Linux 2.6.12, an unprivileged process can decrease
+the nice value of a target process that has a suitable
+.BR RLIMIT_NICE
+soft limit; see
+.BR getrlimit (2)
+for details.
 .SH RETURN VALUE
 Since
 .BR getpriority ()
@@ -147,12 +155,6 @@ The caller attempted to set a lower nice value
 have the required privilege (on Linux: did not have the
 .B CAP_SYS_NICE
 capability).
-Since Linux 2.6.12, this error occurs only if the caller attempts
-to set a process priority outside the range of the
-.B RLIMIT_NICE
-soft resource limit of the target process; see
-.BR getrlimit (2)
-for details.
 .TP
 .B EPERM
 A process was located, but its effective user ID did not match