Why do I have to kill?

Chris Jack chris_jack at msn.com
Tue Oct 16 10:36:55 BST 2007

>On Mon, 15 Oct 2007 16:19:24 +0100, "David Byng" David.Byng at bbc.co.uk wrote
> waitpid() in parent for child to exit
> http://search.cpan.org/~nwclark/perl-5.8.8/pod/perlfunc.pod#waitpid 
Maybe I was a little too terse with the code I posted. The parent does a waitpid on the child process id. The child process drops down to the exit(0), but the child process doesn't die and the parent hangs around forever. I need to do a:
 kill 15, $$;
on the child to get it to die - which I can do but it's ugly, but I guess I'm obliged to in the absence of any external inspiration. When I do the kill in the child, the waitpid returns in the parent and all continues OK.
I don't know how to use the perl debugger to see what's happening in the child - and there are no obvious END blocks that might be doing anything and there is way too much other code to start putting debug statements into - even if I did believe they were likely to help.
The next generation of MSN Hotmail has arrived - Windows Live Hotmail

More information about the london.pm mailing list