TKSpitty has asked for the
wisdom of the Perl Monks concerning the following question:
In a certain script I am starting a process in the background using fork and I catch the pid. The process I started also starts new child processes itself. When I try to kill this process (I use kill 2, then kill 9), it changes into a <defunct> process and the weird thing is, when I check whether it's alive with kill 0, it returns true... I don't know much about process management in Perl. Can anyone tell me how I can avoid getting a defunct process when I kill a forked process?
Any help is appreciated,