*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> nice (3)              



NAME    [Toc]    [Back]

     nice - change process scheduling priority

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     nice(int incr);

DESCRIPTION    [Toc]    [Back]

     This interface is obsoleted by setpriority(2).

     The nice() function adds the value specified in incr to  the
     priority of the invoking process.

     incr is an integer such that the resulting scheduling priority is within
     the range -20 to 20.  Priority values outside this range are
truncated to
     the  appropriate  limit.   The  default priority is 0; lower
priorities cause
     more favorable scheduling.  Only  the  superuser  may  lower

     Children  inherit the priority of their parent processes via

RETURN VALUES    [Toc]    [Back]

     On success, nice() returns the new priority.  On  error,  it
returns -1.

     Since  nice()  can  legitimately  return the value -1, it is
necessary to
     clear the external variable errno prior to  the  call,  then
check it afterward
 to determine if a -1 is an error or a legitimate value.

ERRORS    [Toc]    [Back]

     nice() has the same failure conditions as setpriority(2).

SEE ALSO    [Toc]    [Back]

     nice(1), fork(2), setpriority(2), renice(8)

HISTORY    [Toc]    [Back]

     A nice() syscall appeared in Version 6 AT&T UNIX.

OpenBSD      3.6                           June      4,      1993
[ Back ]
 Similar pages
Name OS Title
nice Tru64 Change the scheduling priority of a process
getpriority Tru64 Get or set process scheduling priority
setpriority Tru64 Get or set process scheduling priority
npri IRIX modify the scheduling priority of a process
nice Linux change process priority
nice HP-UX change priority of a process
nice IRIX change priority of a time-sharing process
priocntlset Tru64 change scheduling property of a process or set of processes
sched_setscheduler Tru64 Sets the scheduling policy and scheduling parameters of the specified process (P1003.1b)
getpriority Linux get/set program scheduling priority
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service