my $pid; if ($pid = fork) { &twirling_baton(); waitpid($pid,0) } else { system("$program < $temp_file"); defined($pid) or die "fork: $!\n"; exit; }