die "can't fork: $!" unless defined($kidpid = fork()); if ($kidpid) { # parent sleeps 60 seconds and then kills child sleep 60; kill("TERM" => $kidpid); # send SIGTERM to child } else { # child does wget ... } print "$kidpid exitting\n"; exit;