set the priority of a process
#include <sys/sched.h> int setprio( pid_t pid, int prio );
The setprio() function changes the priority of process pid to priority prio. If pid is zero, the priority of the calling process is set.
The prio parameter must lie between 1 (lowest) and 29 (highest for superuser) or 19 (highest for non-superuser).
By default, the process priority and scheduling algorithm are inherited from or explicitly set by the process that created it. Once running, the process may change its priority by using this function.
The previous priority. If an error occurs, -1 is returned and errno is set.
|Signal handler||Yes, but modifies errno|
errno, getprio(), qnx_scheduler(), sched_getparam(), sched_getscheduler(), sched_setscheduler(), sched_yield()