"nice" command is returning value as 33. Please help me understand why nice is returning the value as 33. In some systems it works just fine giving return value as 0 but on a system it gives me return value as 33.
nice -n -10 <doing some process here>
nice bash -c 'exit 13' ; echo $?
and you get 13. So your niced command got an
exit code of 33. We can't tell you how does that happen, because you don't tell what command are you nicing. BTW, some shells might have a nice builtin so you might use explicitly
/usr/bin/nice instead of
Note *: even when
nice fails (e.g.
nice -n -12 id without being root), it says something to
stderr but exit 0