Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ nice(2) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec: execl, execv, execle, execve, execlp, execvp

nice

nice

Purpose

     Changes the priority of a process.

Syntax

     int nice (incr)
     int incr;

Description

     The nice system call adds the value of the incr parameter
     to the  nice value of  the calling process.   A process's
     nice  value is  a  positive number  that determines  that
     process's  CPU priority.   A higher  number results  in a
     lower CPU priority.

     A maximum nice value of 39  and a minimum nice value of 0
     are imposed by the system.  If incr causes the nice value
     to fall outside this range, then nice sets the nice value
     to the corresponding limit.

Return Value

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

Diagnostics

     The  nice system  call fails  and the  nice value  is not
     changed if:

     EPERM      The   incr  parameter   is  negative   or  the
                resulting nice value would be greater than 40,
                and  the  effective  user ID  of  the  calling
                process is not superuser.

Related Information

     In  this book:   "exec:   execl,  execv, execle,  execve,
     execlp, execvp."

     The nice command in  AIX Operating System Commands Refer-
     ence.

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