lkml.org 
[lkml]   [1999]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel_thread vs zombie's
On Fri, 21 May 1999, B. James Phillippe wrote:

> > When I create a thread (in a kernel-module) with
> > kernel_thread(FUNC,NULL,0), it remains a zombie when the function FUNC
> > returns. (Kernel version 2.2.6)
>
> Hi. I had the same problem when trying to create a thread while
> in_interrupt(). This is not a safe operation. Make sure you are calling
> kernel_thread() during process-context.

Well, I was calling it from within an other kernel_thread, so this should
be safe. After some digging in the kmod-code I found that they used the
syscall "waitpid" to do this, and after some directed trial-and-error I
was able to get "waitpid" to recognise and clean-up the children.

Kernel-mode httpd just couldn't work long without this :-)

Greetings,
Arjan van de Ven


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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