Re: 8139too: defunct threads

From: Andrew Morton (andrewm@uow.edu.au)
Date: Thu Apr 12 2001 - 15:18:07 EST


Alan Cox wrote:
>
> > <slaps head> swapper doesn't know how to reap children, and
> > AFAIK there's no way for a kernel thread to fully clean itself
> > up. This is always done by the parent.
>
> Make daemonize() move threads with parent 0 to parent 1

Reparenting would require diving inside this lot:

        /*
         * pointers to (original) parent process, youngest child, younger sibling,
         * older sibling, respectively. (p->father can be replaced with
         * p->p_pptr->pid)
         */
        struct task_struct *p_opptr, *p_pptr, *p_cptr, *p_ysptr, *p_osptr;
        struct list_head thread_group;

plus maybe rewriting pgrps, sessions, gids, etc. Challenging.

Plus it would mean that the kernel requires, for its
correct operation, that process "1" is a child reaper.
Is this a good thing?
-
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/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:19 EST