Path: utzoo!attcan!uunet!lll-winken!ames!haven!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.unix.questions Subject: Zombies/`exiting' processes (was HELP RE: "" processes) Message-ID: <15480@mimsy.UUCP> Date: 16 Jan 89 15:39:03 GMT References: <1496@aucs.UUCP> Distribution: na Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 28 In article <1496@aucs.UUCP> 850181p@aucs.UUCP (STEVEN E. PARKER) writes: > I can't seem to kill a process that is stuck in the >status. I tried sure kills etc. nothing seems to work. You cannot kill zombies, for they are already dead. `What is a zombie?' I hear you ask. `Why should a dead process stay around?' Dead processes stick around principally for two reasons. The lesser of these is that they provide a sort of `context' for closing open file descriptors, and shutting down other resources (memory, swap space, and so forth). This generally happens immediately, and the process remains only for its major purpose: To hold on to its exit status. Each process has associated with it a `Parent Process ID'. The parent PID is the PID of the process that created it via fork(), or, if that particular process has since vanished, 1 (the PID of /etc/init). The init program is always waiting, so that if a parent exits, then its child exits, init collects the child's status and promptly ignores it. So, to get rid of a zombie, you must wait for it. If you have already done so, or if the process's PPID is 1, the process is almost certainly stuck in a driver close routine, and if it remains that way forever, the driver has a bug. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris