Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
nice(2)			      System Calls Manual		       nice(2)

NAME
       nice - change priority of a process

SYNOPSIS
DESCRIPTION
       adds  the  value	 of  priority_change  to the nice value	of the calling
       process.	 A process's 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
       Upon  successful	completion, returns the	new nice value minus 20.  Oth-
       erwise, a value of -1 is	returned and is	set to indicate	the error.

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

ERRORS
       [EPERM]	      fails  and  does	not  change  the  nice value if	prior-
		      ity_change is negative or	greater	than 40, and  the  ef-
		      fective  user  ID	 of  the calling process is not	a user
		      having appropriate privileges.

SEE ALSO
       nice(1),	renice(1M), exec(2).

STANDARDS CONFORMANCE
								       nice(2)

NAME | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | SEE ALSO | STANDARDS CONFORMANCE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=nice&sektion=2&manpath=HP-UX+11.22>

home | help