Artificial intelligent assistant

Does this dispatcher produce zombie process? I have such a dispatcher shell script. while read line do java TestProg $line & done < $tasklist On 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 leak in 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 line do java TestProg $line & done < $tasklist wait

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).

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 6f5e1222d5d87e83992bf2da242afabc