if (!defined( my $child_pid = fork())) { die "Cannot Fork: $!" } elsif ($child_pid) { print ""; exit(0); } else { close(STDOUT); close(STDERR); close(STDIN); exec("$my_command"); exit(0); }