fpSetPriority¶
Set process priority.
Declaration¶
Source position: bunxh.inc line 117
function fpSetPriority(Which: cint; Who: cint; What: cint) : cint;
Description¶
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
- Who is interpreted as process ID
- Prio_PGrp
- Who is interpreted as process group ID
- Prio_User
- Who is 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 which and who.
- sys_einval
- Which was not one of Prio_Process, Prio_Grp or 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¶
| Name | Description |
|---|---|
| FpGetPriority | Return process priority. |
| FpNice | Set process priority. |