Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I came cross an annoying problem lately. I have a set of scripts which will manage and start a certain number of parallel processes on about 10 Linux servers running Redhat. A file is used to keep all status of the processes. Depends on situations, new processes will be started if old processes end and the maximum number of processes is not reached yet.

It worked pretty well actually. But lately, at least the last two times, the calling script become defunct state even though the child process is properly ended. And what really weird for me is, that those zombie scripts will turn back to normal some time later (I dont know exactly how long, couple of minutes I guess). this slows down the processing time of complete set of tasks.

What can I do, any hints? Thanks!

share|improve this question

If you send any process to background, then use "wait" command to wait them exit before you exit parent process. Otherwise parent becomes a zombie.

If you still need to exit your parent process but keep child processes running then detach them from parent with "setsid" command.

share|improve this answer
thanks. The parent process is actually still running. – Orunner Mar 22 '12 at 10:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .