Re: kernel_thread vs zombie's

Arjan van de Ven (arjan@fenrus.demon.nl)
Fri, 21 May 1999 21:47:04 +0200 (CEST)


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/