Why do processes go Zombie?

From: Matthew Dharm (mdharm-kernel@one-eyed-alien.net)
Date: Sun Jul 23 2000 - 19:45:33 EST


I'm writing a kernel driver which, as part of it's operation, spawns off a
control thread to manage the device. When the module is rmmoded, the
thread gets a special message to exit.

When that happens, the thread often successfully exits and terminates.
However, sometimes one or more of the control threads winds up in the 'Z'
state.

What might be causing my thread to wind up in the Z state? To exit, I
basically just return from the function. I know the function has exited
because the last thing it does is to raise a semaphore to indicate that
it's done, and that semaphore is getting raised.

So what causes this, and what can I do to avoid my threads from being stuck
in the 'Z' state?

Matt Dharm

P.S. This is for the usb-storage driver, if anyone is interested in looking
at the code.

-- 
Matthew Dharm                              Home: mdharm@one-eyed-alien.net 
Senior Engineer, QCP Inc.                            Work: mdharm@qcpi.com

E: You run this ship with Windows?! YOU IDIOT! L: Give me a break, it came bundled with the computer! -- ESR and Lan Solaris User Friendly, 12/8/1998

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



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:21 EST