Subject: bug#30928: no error val returned by 'nice' failure?

From: Bernhard Voelker <[email-masked]>
Date: Sun, 25 Mar 2018 00:06:47 +0100

On 03/24/2018 10:09 PM, Paul Eggert wrote:
> L A Walsh wrote:
>> how do you tell if the resetting of the
>> priority worked or failed?
> 
> I guess you're supposed to look at stderr, which is what you did.
> 
> This is the way 'nice' has behaved for quite some time, and it's what POSIX 
> specifies. We'd need a real good reason to change it, given that changing it 
> would no doubt break stuff.

Anyway, it wouldn't harm to document this behavior in the Texinfo
manual... the sentence from the POSIX spec sounds quote good:

  http://pubs.opengroup.org/onlinepubs/9699919799/utilities/nice.html

  If the user lacks appropriate privileges to affect the nice value
  in the requested manner, the nice utility shall not affect the
  nice value; in this case, a warning message may be written to
  standard error, but this shall not prevent the invocation of
  /utility/ or affect the exit status.

Have a nice day,
Berny