GNU bug report logs - #30928
nice: add option to abort on failure to change priority

Previous Next

Package: coreutils;

Reported by: L A Walsh <coreutils <at> tlinx.org>

Date: Sat, 24 Mar 2018 19:50:02 UTC

Severity: wishlist

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: L A Walsh <coreutils <at> tlinx.org>
To: bug-coreutils <at> gnu.org
Subject: no error val returned by 'nice' failure?
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?






This bug report was last modified 6 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.