$pid = fork; # Fork error if ( !defined($pid) ) { print "ERROR: fork()\n"; exit; } elsif ( $pid == 0 ) { exec('C:\WINNT\system32\calc.exe'); exit; } else { # Parent process # Monitors the child process for maximum timeout # on timeout kill 9,$pid; exit; }