getpriority.2: Expand discussion of getpriority() return value

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-11-28 06:56:18 +01:00
parent a6bdf7ee8d
commit 268c281777
1 changed files with 7 additions and 1 deletions

View File

@ -118,7 +118,13 @@ soft limit; see
.BR getrlimit (2)
for details.
.SH RETURN VALUE
Since
On success,
.BR getpriority ()
returns the calling thread's nice value, which may be a negative number.
On error, it returns \-1 and sets
.I errno
to indicate the cause of the error.
Since a successful call to
.BR getpriority ()
can legitimately return the value \-1, it is necessary
to clear the external variable