Amiga Unix — 68040 · 68060

Manual pages › System calls (2)

nice(2)

change priority of a time-sharing process

From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.

Also by this name: nice(1), General commands · nice-original(1), General commands · nice(3B), BSD C library

NAME

nice - change priority of a time-sharing process

SYNOPSIS

#include <unistd.h>

int nice(int incr);

DESCRIPTION

nice allows a process in the time-sharing scheduling class to change its priority. The priocntl system call is a more general interface to scheduler functions.

nice adds the value of incr to the nice value of the calling process. A process's nice value is a non-negative number for which a more positive value results in lower CPU priority.

A maximum nice value of 39 and a minimum nice value of 0 are imposed by the system. (The default nice value is 20.) Requests for values above or below these limits result in the nice value being set to the corresponding limit.

EPERM nice fails and does not change the nice value if incr is negative or greater than 39 and the effective user ID of the calling process is not super-user.

EINVAL nice fails if called by a process in a scheduling class other than time-sharing.

SEE ALSO

exec(2), priocntl(2).
nice(1) in the User's Reference Manual.

DIAGNOSTICS

Upon successful completion, nice returns the new nice value minus 20. Otherwise, a value of -1 is returned and errno is set to indicate the error.