open (PING, ">>dummy"); unless ($pid = fork) { unless (fork) { print PING exec "ping $host"; die "no exec"; exit 0; } exit 0; } waitpid($pid,0); close(PING);