in reply to Re: Ending Properly
in thread Ending Properly

Actually a defunct process does have a parent, but the parent has not collected the exit code from the child process. If the parent goes away, the child will be reparented to init, which will collect the exit code and allow the zombie to die.

Replies are listed 'Best First'.
Re: Re: Re: Ending Properly
by Anonymous Monk on Feb 18, 2003 at 01:26 UTC
    Ok. How do I make the parent go away? I'm not using fork or anything like that. All my scripts are designed to run straight from top to bottom. Thanks for your help.
      You really need to give us a better idea of what you are doing. In this case, since you don't appear to be forking off children, I'd suggest giving us some idea of the environment setup, how you are starting up your script, any strange things you might be doing such as backgrounding (as mentioned above). Also, are you using any modules that might be forking under the hood? You're doing the equivalent of asking us to fix your car without telling us the make, model, or circumstances surrounding the breakdown.

      jasonk is correct (my bad): the zombie has a parent that's not waiting for it. Killing the parent and letting init clean it up is not the right thing to do. You need to find out why you have this situation. Even if you're just running scripts straight through, there may be a hidden fork call in a package you're using; or there may be another script invoking yours that's doing something that affects this.

      Can you give us any details on how your scripts are started, what package(s) they're using, and what general processing they're doing?