aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2016-07-02 00:45:20 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2016-07-02 00:45:20 +0200
commitf69c2584a9f9df4b4cd11286276ae8e348efa648 (patch)
treebd2a5c0784ebf66cfbeeb8312a056ed6682ec424
parentb8bc577b896e4db7ce0f8f1bdb6f9eb776b79f1a (diff)
downloadman-pages-f69c2584a9f9df4b4cd11286276ae8e348efa648.tar.gz
getpriority.2: Make discussion of RLIMIT_NICE more prominent
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>
-rw-r--r--man2/getpriority.216
1 files changed, 9 insertions, 7 deletions
diff --git a/man2/getpriority.2 b/man2/getpriority.2
index 619956f5c3..88ea1dfee7 100644
--- a/man2/getpriority.2
+++ b/man2/getpriority.2
@@ -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