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

  man pages->Tru64 Unix man pages -> nice (3)              
Title
Content
Arch
Section
 

nice(3)

Contents


NAME    [Toc]    [Back]

       nice - Change the scheduling priority of a process

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       int nice(
               int increment );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

       Berkeley Compatibility Library (libbsd)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       nice(): XSH4.2

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Specifies  a  value  that  is added to the current process
       priority. You can specify a negative value.

DESCRIPTION    [Toc]    [Back]

       The nice() function adds the value specified in the increment
  parameter  to the nice value of the calling process.
       The nice value is a  nonnegative  number;  a  higher  nice
       value gives the process a lower CPU priority.

       When  you  are using the Standard C Library version of the
       nice() function, the maximum nice value for a  process  is
       39  (2 * {NZERO} -1) and the minimum is 0 (zero). Requests
       for values outside these limits result in the  nice  value
       being set to the corresponding limit.

       [XPG4-UNIX]  If execution of the Standard C Library nice()
       function fails, the system does not  alter  the  specified
       priority.

       Any  process can lower its priority (numerically raise its
       nice value). A process must have superuser  privileges  to
       raise its priority (numerically lower its nice value).

       [Tru64 UNIX]  For backward compatibility, a version of the
       nice() function is supported that allows  nice  values  in
       the range of -20 to 20. Requests for values above or below
       these limits result in the nice value  being  set  to  the
       corresponding  limit.  To use the backward-compatible version
 of nice(), compile with  the  Berkeley  Compatibility
       Library (libbsd.a).








RETURN VALUES    [Toc]    [Back]

       Upon  successful  completion,  the nice() function returns
       the new nice value  minus  20  ({NZERO}).  Otherwise,  the
       function  returns -1 and sets errno to indicate the error.

ERRORS    [Toc]    [Back]

       The Standard C Library version of nice() sets errno to the
       specified values for the following conditions: The calling
       process does not have appropriate privilege.

       [Tru64 UNIX]  The libbsd.a version of nice() sets errno to
       the  same values as the setpriority() function. For information
 about possible return values for the  setpriority()
       function, see setpriority(2).

SEE ALSO    [Toc]    [Back]

      
      
       Functions: exec(2), getpriority(2), setpriority(2)

       Standards: standards(5)



                                                          nice(3)
[ Back ]
 Similar pages
Name OS Title
nice OpenBSD change process scheduling priority
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