Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

getpriority(2)

nice(3)  —  Subroutines

OSF

NAME

nice − Changes scheduling priority of a process

LIBRARY

Standard C Library (libc.a),
Berkeley Compatibility Library (libbsd.a)

SYNOPSIS

int nice(
int increment );

PARAMETERS

incrementSpecifies a value that is added to the current process priority.  Negative values can be specified, although values exceeding either the high or low limit are truncated. 

DESCRIPTION

The nice() function adds an increment to the nice value of the calling process.  The nice value is a nonnegative number;  by incrementing the nice value, a process is given lower CPU priority. 

NOTES

Process priorities in are defined in the range of 0 to 39 in AT&T System V systems, and in the range -20 to 20 in BSD systems.  For that reason, two versions of the nice() function are supported by OSF/1.  The default version, in libc, behaves like the AT&T System V version, with the increment parameter treated as the modifier of a value in the range of 0 to 39. 

If the behavior of the BSD version is desired, compile with the Berkeley Compatibility Library (libbsd.a) and the increment parameter is treated as the modifier of a value in the range -20 to 20. 

AES Support Level:
Trial use

RETURN VALUES

Upon successful completion, the nice() function returns the new nice value minus the value of NZERO.  Otherwise, -1 is returned and errno is set to indicate the error. 

ERRORS

If the libc version of nice() fails, errno may be set to the following value:

[EPERM]The calling process does not have appropriate privilege. 

If the libbsd version of nice() fails, errno may be set to the same values as the setpriority() function. 

RELATED INFORMATION

Functions: exec(2), getpriority(2)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026