my $pid = fork(); if ($pid) { # in the parent wait for a keypress via your favourite method here if an abort occurs.. kill 15, $pid; # sigspec to taste exit; # parent is done # you'll probably want POSIX WNOHANG here, otherwise waitpid will block waitpid, $pid # child exited normally } elsif (defined $pid) { # in the child system("run_groovy_command"); exit; # tell daddy i'm done } else { die "Cannot fork: try spoon\n"; }