[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#44039: hurd: nice changes priority of parent shell

From: Marcus Brinkmann
Subject: Bug#44039: hurd: nice changes priority of parent shell
Date: Sun, 3 Dec 2000 13:54:00 +0100
User-agent: Mutt/1.1.4i

On Mon, Sep 06, 1999 at 04:25:42AM +0200, Marcus Brinkmann wrote:
> On Sun, Sep 05, 1999 at 04:42:34AM -0400, Roland McGrath wrote:
> > Let me know what effect this libc patch has on that:
> > 
> >     * hurd/hurdprio.c (_hurd_priority_which_map): If WHO is zero default
> >     it to getpid () for PRIO_PROCESS, geteuid () for PRIO_USER.
> It's better now. "nice command" does only change the priority of the child
> process when run as root.
> There is another problem now that nice/renice returns a bogus error message
> if you try to lower the priority below 0. The error message is bogus because
> the priority is indeed set, as the below transcript proves.

The transcript doesn't show the full truth. The priority of the task is set,
but not of the individual threads. The reason is the following check in
thread_priority (gnumach/kern/task.c):

     *  Check for violation of max priority
    if (priority < thread->max_priority) {
        ret = KERN_FAILURE;

We need to adjust the max_priority. It might be possible to change the
max_priority to the lowest value at task creation time, not in the kernel,
but in the Hurd servers / GLibC, whereever tasks are created.

Or maybe we can call thread_max_priority in libc/sysdeps/mach/hurd.c, or
something like that. There is also threads_set_own_priority, which might be


`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]