From: Michael Kerrisk Date: Mon, 28 Nov 2016 05:56:18 +0000 (+0100) Subject: getpriority.2: Expand discussion of getpriority() return value X-Git-Tag: man-pages-4.09~168 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=268c281777066e940ad032ea000dd1aa82bdeb13;p=thirdparty%2Fman-pages.git getpriority.2: Expand discussion of getpriority() return value Signed-off-by: Michael Kerrisk --- diff --git a/man2/getpriority.2 b/man2/getpriority.2 index 8f9754ffd0..4a1ff91a9d 100644 --- a/man2/getpriority.2 +++ b/man2/getpriority.2 @@ -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