]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
nice.2: Add mention of RLIMIT_NICE
authorMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 5 Dec 2016 07:59:31 +0000 (08:59 +0100)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Mon, 5 Dec 2016 11:13:33 +0000 (12:13 +0100)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/nice.2

index 790aefd97f2e13ee9a3e27d0292adcbdb1c0ed31..93ae89b6d9c5c9ad4fcf2f65b9f6c05cec80efd6 100644 (file)
@@ -51,11 +51,18 @@ adds
 .I inc
 to the nice value for the calling thread.
 (A higher nice value means a low priority.)
-Only the super\%user may specify a negative increment,
-or priority increase.
 
 The range of the nice value is +19 (low priority) to \-20 (high priority).
 Attempts to set a nice value outside the range are clamped to the range.
+
+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
 On success, the new nice value is returned (but see NOTES below).
 On error, \-1 is returned, and
@@ -120,6 +127,7 @@ returns \-1.
 .BR renice (1),
 .BR fork (2),
 .BR getpriority (2),
+.BR getrlimit (2),
 .BR setpriority (2),
 .BR capabilities (7),
 .BR sched (7)