- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
sub child_handler {
#wait end of the child process
my $waitedpid = wait;
delete $my_childs{$waitedpid};
$SIG{CHLD} = \&child_handler;
LOG ("ripped $waitedpid" . ($? ? " with exit $?" : '')) if ($main::DEBUG>0);
}
$SIG{CHLD} = \&child_handler;