new copyright; att/bsd/shared
[unix-history] / usr / src / lib / libc / gen / nice.3
CommitLineData
f42730df
KM
1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
79e6b3c8 5.\" @(#)nice.3 6.2 (Berkeley) %G%
f42730df 6.\"
707ea59c 7.TH NICE 3C ""
f42730df
KM
8.UC 4
9.SH NAME
10nice \- set program priority
11.SH SYNOPSIS
12.B nice(incr)
13.SH DESCRIPTION
1eea0041
KM
14.ft B
15This interface is obsoleted by setpriority(2).
16.ft R
17.PP
f42730df
KM
18The scheduling
19priority of the process is augmented by
20.IR incr .
21Positive priorities get less
22service than normal.
23Priority 10 is recommended to users
24who wish to execute long-running programs
25without flak from the administration.
26.PP
27Negative increments are ignored except on behalf of
28the super-user.
29The priority is limited to the range
30\-20 (most urgent) to 20 (least).
31.PP
32The priority of a process is
33passed to a child process by
34.IR fork (2).
35For a privileged process to return to normal priority
36from an unknown state,
37.I nice
38should be called successively with arguments
39\-40 (goes to priority \-20 because of truncation),
4020 (to get to 0),
41then 0 (to maintain compatibility with previous versions
42of this call).
43.SH "SEE ALSO"
1eea0041 44nice(1), setpriority(2), fork(2), renice(8)