*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: nice | Section: 3 | Source: Digital UNIX | File: nice.3.gz
nice(3) Library Functions Manual nice(3) NAME nice - Changes the scheduling priority of a process LIBRARY Standard C Library (libc.a, libc.so) Berkeley Compatibility Library (libbsd.a) SYNOPSIS #include <unistd.h> int nice( int increment); STANDARDS Interfaces documented on this reference page conform to industry stan- dards as follows: nice(): XPG4, XPG4-UNIX Refer to the standards(5) reference page for more information about in- dustry standards and associated tags. PARAMETERS Specifies a value that is added to the current process priority. You can specify a negative value. DESCRIPTION The nice() function adds the value specified in the increment parameter to the nice value of the calling process. The nice value is a nonnega- tive number; a higher nice value gives the process a lower CPU prior- ity. When you are using the Standard C Library version of the nice() func- tion, the maximum nice value for a process is 39 (2 * {NZERO} -1) and the minimum is 0 (zero). Requests for values outside these limits re- sult in the nice value being set to the corresponding limit. [XPG4-UNIX] If execution of the Standard C Library nice() function fails, the system does not alter the specified priority. Any process can lower its priority (numerically raise its nice value). A process must have superuser privileges to raise its priority (numeri- cally lower its nice value). [Digital] For backward compatibility, a version of the nice() function is supported that allows nice values in the range of -20 to 20. Re- quests for values above or below these limits result in the nice value being set to the corresponding limit. To use the backward-compatible version of nice(), compile with the Berkeley Compatibility Library (libbsd.a). RETURN VALUES Upon successful completion, the nice() function returns the new nice value minus 20 ({NZERO}). Otherwise, the function returns -1 and sets errno to indicate the error. ERRORS The Standard C Library version of nice() sets errno to the specified values for the following conditions: The calling process does not have appropriate privilege. [Digital] The libbsd.a version of nice() sets errno to the same values as the setpriority() function. For information about possible return values for the setpriority() function, see setpriority(2). RELATED INFORMATION Functions: exec(2), getpriority(2), setpriority(2) Standards: standards(5) delim off nice(3)

Navigation Options