From 52694f09793654f5f612077285bdb5cb3ea42f88 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Mon, 5 Dec 2016 08:59:31 +0100 Subject: [PATCH] nice.2: Add mention of RLIMIT_NICE Signed-off-by: Michael Kerrisk --- man2/nice.2 | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/man2/nice.2 b/man2/nice.2 index 790aefd97f..93ae89b6d9 100644 --- a/man2/nice.2 +++ b/man2/nice.2 @@ -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) -- 2.39.2