| United States-English |
|
|
|
![]() |
HP-UX Reference (Volume 5 of 9): Section 2: System Calls > ggetpriority(2) |
|
NAMEgetpriority, setpriority — get or set process priority SYNOPSIS#include <sys/resource.h> int getpriority(int which, int who); int setpriority(int which, int who, int priority); DESCRIPTIONgetpriority() returns the priority of the indicated processes. setpriority() sets the priority of the indicated processes to priority. The processes are indicated by which and who, where which can have one of the following values:
If more than one process is indicated, the value returned by getpriority() is the lowest valued priority of all the indicated processes, and setpriority() sets the priority of all indicated processes. priority is a value from -20 to 20, where lower values indicate better priorities. The default priority for a process is 0. If the calling process contains more than one thread or lightweight process (i.e., the process is multi-threaded) these functions shall apply to all threads or lightweight processes in the calling process. The priority specified (or retrieved) is the same for all threads or lightweight processes in a process. Negative priorities require appropriate privileges. RETURN VALUEgetpriority() returns the following values:
setpriority() returns the following values:
ERRORSIf getpriority() or setpriority() fails, errno is set to one of the following values:
|
|||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||