if ($process->Wait (60*1000)){ # execution of the process is successfully. $process->Kill(0); } else { # process has hung up for some reason handle_process_problem (); notify_sysop(); $process->Kill(255) }