Kernel_thread() zombies...help?

Stanislav Krasilovskiy (prgrssor@cs.bu.edu)
Fri, 1 Oct 1999 14:43:44 -0400 (EDT)


Hi fellow kernel dissectors,

I have a small coding dilemma, and I was wondering if you could help me
see why something is not happening the I way I want it to.

I invoke a system call from a child user-space process (meaning that this
process itself has been fork()'d), and that system call uses a call to
kernel_thread() in arch/.../process.c to set up another (kernel-space)
process. What I want to happen is I want this kernel-space process to die
completely (without sticking around as a zombie) as soon as the procedure
whose pointer was passed to kernel-thread exits; but I don't want to do
anything similar to waitpid in the user process. How can I go about doing
that?

I have tried adding signal(SIGCHLD, SIG_IGN) in the user process before it
invokes the system call as suggested by the Unix FAQ, but that doesn't
seem to work. Perhaps there are some flags to kernel_thread that will
make the process die and clean up after itself?~

Please help me out. I am doing research on building high-performance
features into the kernel but because of this problem I run out of
processes much faster than I should.

Thanks in advance.

+------------------------+----------------------------------------+
| Stan Albright Rost | http://mdsp.bu.edu/prgrssor_html |
| AKA | "Iron sharpens iron. |
| "The Progressor" | So one man sharpens another." |
+------------------------+-------------= Prov. 27:17 =-----------+

-
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/