[Overview][Constants][Types][Procedures and functions][Index] |
Set process priority
Source position: bunxh.inc line 100
function fpNice( |
N: cint |
):cint; |
Nice adds -N to the priority of the running process. The lower the priority numerically, the less the process is favored. Only the superuser can specify a negative N, i.e. increase the rate at which the process is run.
If the function is succesful, zero is returned. On error, a nonzero value is returned.
Extended error information is returned by the FpGetErrno function.
|
Return process priority |
|
|
Set process priority |
Program Example15; { Program to demonstrate the Nice and Get/SetPriority functions. } Uses BaseUnix,Unix; begin writeln ('Setting priority to 5'); fpsetpriority (prio_process,fpgetpid,5); writeln ('New priority = ',fpgetpriority (prio_process,fpgetpid)); writeln ('Doing nice 10'); fpnice (10); writeln ('New Priority = ',fpgetpriority (prio_process,fpgetpid)); end.
lazarus-ccr.sourceforge.net |