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

thomas thomas.bsd at gmail.com
Mon Aug 18 12:36:47 EDT 2008


2008/8/18 Russell Van Tassell <russell+sudo-users at loosenut.com>:
> On Mon, Aug 18, 2008 at 08:57:00AM -0700, Russell Van Tassell wrote:
>> 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
>>
>> [What's the behavior of "nice" outside of sudo?]

$ (nice sleep 5 &);  ps -al | egrep '(^F|sleep)'
F S   UID   PID  PPID  C PRI  NI ADDR SZ WCHAN  TTY          TIME CMD
0 R  1000 11073     1  0  90  10 -    57 -      pts/9    00:00:00 sleep

=> It works (with 10 as default value).

I also tried with "nice -n a_value" but it doesn't help.

Here I am on a Debian/Lenny box, not a *BSD one. Could another linux
user try the above command (with sudo) to see if he's experiencing the
same problem? Thanks a lot.

++
Thomas



More information about the sudo-users mailing list