$SIG{CHILD} = 'IGNORE'; foreach my $job (@big_list_of_jobs) { my $pid = fork() unless( $pid ) { my $child_cleanup_func = sub { # Examine the child's output, update log files etc. }; $SIG{CHILD} = $child_cleanup_func; exec $child_cmd, @args; print "Child did not start\n"; } else { # parent # Forget about the child (launcher process from the fork above) # move on to the next job. } }