in reply to Perl infinite loops!
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); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl infinite loops!
by marvell (Pilgrim) on Dec 06, 2000 at 21:02 UTC | |
|
Re: Re: Perl infinite loops!
by silicon39 (Initiate) on Dec 06, 2000 at 22:17 UTC | |
by kilinrax (Deacon) on Dec 06, 2000 at 23:10 UTC |