Re: is reparent_to_init a good thing to do?

Andrew Morton (akpm@zip.com.au)
Tue, 09 Oct 2001 09:13:50 -0700


BALBIR SINGH wrote:
>
> I was looking at the driver under drivers/net/8139too.c, a kernel
> thread rtl8139_thread is created, it calls daemonize() and soon
> afterwards calls reparent_to_init(). Looking at reparent_to_init(),
> it looks like all kernel threads should do this. But, I feel I am missing
> something, since not everybody does this.
>
> Is this a good thing to do? or are there special cases when we need this.
>

I think yes, more kernel threads need to use this function. Most
particularly, threads which are parented by a userspace application
and which can terminate. For example, the nfsd threads.

Right now, it's probably the case that nfsd threads will turn
into zombies when they terminate, *if* their parent is still
running. But of course, most kernel threads are parented
by very short-lived userspace applications, so nobody has
ever noticed.
-
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/