[Overview][Constants][Types][Procedures and functions] Reference for unit 'BaseUnix' (#rtl)

fpSetPriority

Set process priority

Declaration

Source position: bunxh.inc line 102

function fpSetPriority(

  Which: cInt;

  Who: cInt;

  What: cInt

):cInt;

Description

fpSetPrioritysets the priority with which a process is running. Which process(es) is determined by the Whichand Whovariables. Whichcan be one of the pre-defined constants:

Prio_Process
Whois interpreted as process ID
Prio_PGrp
Whois interpreted as process group ID
Prio_User
Whois interpreted as user ID

Priois a value in the range -20 to 20.

For an example, see FpNice.

The function returns zero on success, -1 on failure

Errors

Extended error information is returned by the FpGetErrnofunction.

sys_esrch
No process found using whichand who.
sys_einval
Whichwas not one of Prio_Process, Prio_Grpor Prio_User.
sys_eperm
A process was found, but neither its effective or real user ID match the effective user ID of the caller.
sys_eacces
A non-superuser tried to a priority increase.

See also

FpGetPriority

  

Return process priority

FpNice

  

Set process priority