Help for this page
$term = 0; $SIG{TERM} = sub { $term = 1; }; ... # check the child again after 1 second sleep(1); }
# waitpid($pid,WNOHANG) returns 0 if the child process # exists and has not terminated ... } }