nice(2) SDK R4.11 nice(2)
NAME
nice - change priority of a process
SYNOPSIS
#include <unistd.h>
int nice (incr)
int incr;
where:
incr A positive or negative value that is to be added to the
calling process's priority
DESCRIPTION
The value of incr is added to the priority of the calling process. A
more positive priority value results in a lower level of service from
the CPU.
If the new priority would be greater than 19, the process's priority
is set to 19. If the new priority would be less than -20, the
process's priority is set to -20.
ACCESS CONTROL
The calling process must have appropriate privilege for nice to
accept a value for incr that is less than 0 or greater than 39. If
this condition is not met, incr will be treated as 0, and errno will
be set to EPERM.
For systems supporting the DG/UX Capability Option, appropriate
privilege is defined as having one or more specific capabilities
enabled in the effective capability set of the calling process. See
capdefaults(5) for the default capability for this system call.
On systems without the DG/UX Capability Option, appropriate privilege
means that the process has an effective UID of root. See the
appropriateprivilege(5) man page for more information.
RETURN VALUE
Nice always returns the calling process's priority upon completion of
the system call. If an error occurred on the call, the process's
priority will be unchanged and errno will be set to indicate the
error. errno should be set to zero before the call and checked
afterwards, regardless of the return value.
DIAGNOSTICS
EPERM The value of incr is negative or greater than 39 and the
effective-user-id of the calling process is not 0.
SEE ALSO
exec(2), appropriateprivilege(5).
capdefaults(5).
Licensed material--property of copyright holder(s)