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

  man pages->HP-UX 11i man pages -> nice (2)              


 nice(2)                                                             nice(2)

 NAME    [Toc]    [Back]
      nice - change priority of a process

 SYNOPSIS    [Toc]    [Back]
      #include <unistd.h>

      int nice(int priority_change);

 DESCRIPTION    [Toc]    [Back]
      nice() adds the value of priority_change to the nice value of the
      calling process.  A process's nice value is a positive 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.  Requests for values above or below these limits result
      in the nice value being set to the corresponding limit.

      If the calling process contains more than one thread or lightweight
      process (i.e., the process is multi-threaded) this function shall
      apply to all threads or lightweight processes in the calling process.

 RETURN VALUE    [Toc]    [Back]
      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.

      Note that nice() assumes a user process priority value of 20.  If a
      user having appropriate privileges has changed the user process
      priority value to something less than 20, certain values for
      priority_change can cause nice() to return -1, which is
      indistinguishable from an error return.

 ERRORS    [Toc]    [Back]
      [EPERM]        nice() fails and does not change the nice value if
                     priority_change is negative or greater than 40, and the
                     effective user ID of the calling process is not a user
                     having appropriate privileges.

 SEE ALSO    [Toc]    [Back]
      nice(1), renice(1M), exec(2).

      nice(): AES, SVID2, SVID3, XPG2, XPG3, XPG4

 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003
[ Back ]
 Similar pages
Name OS Title
nice Linux change process priority
nice Tru64 Change the scheduling priority of a process
nice OpenBSD change process scheduling priority
nice IRIX change priority of a time-sharing process
rtprio HP-UX change or read real-time priority
getpriority HP-UX get or set process priority
setpriority HP-UX get or set process priority
setpriority Tru64 Get or set process scheduling priority
getpriority Tru64 Get or set process scheduling priority
renice Tru64 Alters the priority of a running process
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service