I have such a dispatcher shell script.while read linedo    java TestProg $line &done < $tasklistOn the zombie process Wikipedia page, it says if a parent fails to call wait, the zombie will be left in the process table, causing a resource leakin the script above I didn't use the wait function (I wrote many dispatcher shell script this way). I'm wondering if I need use wait like this so that I can prevent from zombie processes:while read linedo    java TestProg $line &done < $tasklistwait
Does this dispatcher produce zombie process?
linux;process;ps;signals;zombie process
I have 2 answers:If the parent dies/ends then the processes are inherited by init. init will do it for you. So for short run processes you don't have to worry. The advice should be call wait or exit.I think bash calls wait for you and puts the exit code somewhere. wait only gets the exit codes, then reaps the process. A zombi uses little resource, all is freed, except a slot in the process table: the process id etc.A zombie is dead: all of its resources are freed, except its slot in the process table. The reason that its process table slot is not freed is so that the parent can (amongst other things) get its return-code and signal a child that has just died without hitting another process that is reusing the process-identity (pid).