Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.