fpSetPriority function
Set process priority.
Declaration
function fpSetPriority(Which: cint; Who: cint; What: cint): cintDescription
fpSetPriority sets the priority with which a process is running.
Which process(es) is determined by the
Which and
Who variables.
Which can be one of the predefined constants:
- Prio_Process
-
Whois interpreted as process ID - Prio_PGrp
-
Whois interpreted as process group ID - Prio_User
-
Whois interpreted as user ID
Prio is 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 FpGetErrno function.
- sys_esrch
- No process found using
whichandwho. - sys_einval
-
Whichwas not one ofPrio_Process,Prio_GrporPrio_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
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
