1nice(3UCB)         SunOS/BSD Compatibility Library Functions        nice(3UCB)
2
3
4

NAME

6       nice - change priority of a process
7

SYNOPSIS

9       /usr/ucb/cc [ flag ... ] file ...
10       #include<unistd.h>
11
12       int nice(incr)
13       int incr;
14
15

DESCRIPTION

17       The  scheduling  priority of the process is augmented by incr. Positive
18       priorities get less service than normal. Priority 10 is recommended  to
19       users who wish to execute long-running programs without undue impact on
20       system performance.
21
22
23       Negative increments are illegal, except when specified  by  the  privi‐
24       leged  user.  The priority is limited to the range −20 (most urgent) to
25       20 (least). Requests for values above or below these limits  result  in
26       the scheduling priority being set to the corresponding limit.
27
28
29       The  priority of a process is passed to a child process by fork(2). For
30       a privileged process to return  to  normal  priority  from  an  unknown
31       state, nice() should be called successively with arguments −40 (goes to
32       priority −20 because of truncation), 20 (to get to 0), then 0 (to main‐
33       tain compatibility with previous versions of this call).
34

RETURN VALUES

36       Upon  successful completion, nice() returns 0. Otherwise, a value of −1
37       is returned and errno is set to indicate the error.
38

ERRORS

40       The priority is not changed if:
41
42       EPERM    The value of incr specified was negative,  and  the  effective
43                user ID is not the privileged user.
44
45

SEE ALSO

47       nice(1), renice(1), fork(2), priocntl(2), getpriority(3C)
48

NOTES

50       Use of these interfaces should be restricted to only applications writ‐
51       ten on BSD platforms.  Use of these interfaces with any of  the  system
52       libraries or in multi-threaded applications is unsupported.
53
54
55
56SunOS 5.11                        30 Oct 2007                       nice(3UCB)
Impressum