lkml.org 
[lkml]   [2001]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: is reparent_to_init a good thing to do?
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/

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