[sudo-users] "nice sudo foo": "foo" does not inherits niceness

Russell Van Tassell russell+sudo-users at loosenut.com
Mon Aug 18 11:57:00 EDT 2008


Might want to include your O/S... sems to work just fine on 

On Mon, Aug 18, 2008 at 05:19:12PM +0200, thomas wrote:
> $ (nice sudo sleep 5 &);  ps -al | egrep '(^F|sleep)'
> F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
> 4 S     0 15823     1  0  80   0 -   754 -      pts/5    00:00:00 sleep
> 
> Why doesn't "sleep" have a niceness of 10?
>
> [...]
>
> $ sudo -V
> Sudo version 1.6.9p17

You might want to share your O/S version, too, as not all are built or
act equal... what happens if you eliminate sudo from the chain and just
test the shell(s) by themselves?

This works as-expected on OpenBSD and Solaris 2.5.1 through at least
Solaris 10 (though manpage say "defaults to 10" it's clear from tests
outside of sudo that manpages aren't always accurate).

-- 
Russell M. Van Tassell
russell at loosenut.com

"Every man dies. Not every man really lives."
                                         -- William Wallace (Braveheart)



More information about the sudo-users mailing list