Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

nice(1)

ps(1)

NICE(2)                              SysV                              NICE(2)



NAME
     nice - change priority of a process

SYNOPSIS
     int nice (incr)
     int incr;

DESCRIPTION
     nice adds the value of incr to the nice value of the calling process.  A
     process' "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.

     nice will, in an XPG3 or AES environment, will fail with [EPERM] if the
     caller does not have an effective uid of ROOT and the supplied argument
     is either < 0 or > 39 (2*NZERO - 1).

ERRORS
     [EPERM]   nice will fail and 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.

SEE ALSO
     exec(2).
     nice(1), ps(1) in the SysV Command Reference.

DIAGNOSTICS
     Upon successful completion, nice returns the new nice value minus 20.
     Otherwise, a value of -1 is returned and errno is set as indicated under
     "Errors."

BUGS
     The mapping of nice values into the underlying Domain/OS priority
     mechanisms is not one-to-one.  While this doesn't affect processes'
     relative priorities, it may result in variations between the nice values
     as set by nice(1) and those reported by ps(1).

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