my @pids; for loop { $pid = fork(); if ($pid) { # if parent push(@pids, $pid); } else { # if child ... exit; } } # only parent reaches this point kill 9, @pids; # perform mass filicide