Keep It Simple, Stupid | |
PerlMonks |
Re: Signal handling problemby sandfly (Beadle) |
on Oct 02, 2003 at 20:57 UTC ( [id://296083]=note: print w/replies, xml ) | Need Help?? |
I can't see exactly what the problem is. Is it possible the SIGCHLD is not breaking you out of the sleep?
It must boil down to one of three things: 1. Your child process isn't dying 2. The child process dies, but the parent isn't reaping it. 3. The child process dies, the parent reaps it, but %child_pids is not clear I suggest you find out which, using ps, or similar. Most likely it's 2 or 3. Put print statements into the reaping sub; also, change the parent's sleep to sleep 1, and print the %child_pids hash every time round the while loop.
In Section
Seekers of Perl Wisdom
|
|