NICE(S) XENIX System V NICE(S)
Name
nice - Changes priority of a process.
Syntax
int nice (incr)
int incr;
Description
nice adds the value of incr to the nice value of the calling
process. A process' nice value is a positive number for
which a higher value results in lower CPU priority.
A maximum nice value of 39 and a minimum nice value of 0 are
imposed by the system. Requests for values above or below
these limits result in the nice value being set to the
corresponding limit.
nice will not change the nice value if incr is negative or
greater than 40, and if the effective user ID of the calling
process is not super-user. [EPERM]
Return Value
Upon successful completion, nice returns the new nice value
minus 20. Note that nice is unusual in the way return codes
are handled. It differs from most other system calls in two
ways: the value -1 is a valid return code (in the case where
the new nice value is 19), and the system call either works
or ignores the request; there is never an error.
See Also
exec(S), nice(C)
Page 1 (printed 8/7/87)