lkml.org 
[lkml]   [2001]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [new PATCH] Re: 8139too: defunct threads
From
Date
 Andrew Morton <andrewm@uow.edu.au> writes:

[...]

> None of these will work. The problems with globally setting
> exit_signal to SIGCHLD are that
>
> a) If the parent does waitpid(pid, status, __WCLONE), the
> waitpid will fail. request_module() does this. I don't
> know _why_ it does this. Maybe it's bogus. There is no
> explanation.

waitpid doesn't work on cloned children unless you put in __WCLONE or
__WALL, so this was necessary to catch the child at all. If you set to
use SIGCHLD this will no longer be needed (if I understand correctly).

[...]

> So it seems that we must reparent the thread to init, and
> make sure that it delivers SIGCHLD to init when it exits.

Sounds good. Why isn't SIGCHLD a stronger default anyway.

[...]

> + /* Set the exit signal to SIGCHLD so we signal init on exit */
> + if (this_task->exit_signal ! 0) {

Tyop.

> + printk(KERN_ERR "task `%s' exit_signal %d in daemonize()\n",
> + this_task->comm, this_task->exit_signal);
> + }
> + this_task->exit_signal = SIGCHLD;
> +
> + write_unlock_irq(&tasklist_lock);
> }
>
> void __init init_idle(void)
>

--

http://www.penguinpowered.com/~vii
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [W:0.846 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site