We assume the valid range is [-NZERO, NZERO-1].
@@ -32,7 +32,7 @@ main(int argc, char **argv)
val += getpriority(PRIO_PROCESS, 0);
if (errno != 0)
weprintf("getpriority:");
val = MAX(PRIO_MIN, MIN(val, PRIO_MAX));
val = MAX(-NZERO, MIN(val, NZERO - 1));
if (setpriority(PRIO_PROCESS, 0, val) != 0)
weprintf("setpriority:");
The note is not visible to the blocked user.