Subject: no error val returned by 'nice' failure?

From: L A Walsh <[email-masked]>
Date: Sat, 24 Mar 2018 12:37:10 -0700

I executed a command:

nice --19 sleep 5

and hoped to get back a status as to whether or not I was
allowed to use a negative priority, since on Windows,
anyone in the Admin group can set a priority, with
the above command running sleep at 'High' priority, but
on linux:

>  nice --19 sleep 1
nice --19 sleep 1
nice: cannot set niceness: Permission denied
>  echo $?
0

nice has an error setting the priority, but doesn't
set any status in the return code.

Shouldn't nice's exit value be something like
EPERM if it couldn't set the priority -- whether or
not it executed the command...

Otherwise, how do you tell if the resetting of the
priority worked or failed?