Enables the getting of a process I/O priority.
short getiopri (ProcessID);
pid_t ProcessID;
The getiopri subroutine returns the I/O scheduling priority of a process. If the target process ID does not match the process ID of the caller, the caller must either be running as root, or have an effective and real user ID that matches the target process.
Item | Description |
---|---|
ProcessID | Specifies the process ID. If this value is -1, the current process scheduling priority is returned. |
Upon successful completion, the getiopri subroutine returns the I/O scheduling priority of a thread in the process. A returned value of IOPRIORITY_UNSET indicates that the I/O priority was not set. Otherwise, a value of -1 is returned and the errno global variable is set to indicate the error.
Item | Description |
---|---|
EPERM | The calling process is not root. It does not have the same process ID as the target process, and does not have the same real effective user ID as the target process. |
ESRCH | No process can be found corresponding to the specified ProcessID. |