$SIG{CHLD} = \&reaper; while (1) { $self->check_start(); $self->check_run(); # Sleep 1/10 second select(undef, undef, undef, 0.1); } sub reaper { my $pid; do { $pid = waitpid(-1, &WNOHANG); } while ($pid > 0); $SIG{CHLD} = \&reaper; }