Which will kill the cgi script's process (with a SIGALRM) 3 minutes after execution of that line of code.alarm(180); # stop script after 3 minutes
$SIG{ALRM} = \&sighandler; sub sighandler() { print "WARNING: Script timed out or was killed\n"; exit (0); }
In reply to Re: Perl infinite loops!
by kilinrax
in thread Perl infinite loops!
by silicon39
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |