Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Fw: Perl maximu...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 10931 of 12161
Post > Topic >>

Fw: Perl maximum execution time

by esia168@[EMAIL PROTECTED] (Anthony Brooke) Apr 14, 2008 at 06:45 AM

Thanks for the reply, but sometimes I don't know where is the code that
cau=
se the infinite loop. Is there such as thing as perl configuration file,
to=
 set the execution time for any code, any where in the program just like
ph=
p.ini file. Thanks.=0A=0A----- Original Message ----=0AFrom: Chas. Owens
<c=
has.owens@[EMAIL PROTECTED]
>=0ATo: Keenlearner <yingun@[EMAIL PROTECTED]
>=0ACc:
beginners@[EMAIL PROTECTED]
 Friday, April 11, 2008 16:05:07=0ASubject: Re: Perl
maximum=
 execution time=0A=0AOn Thu, Apr 10, 2008 at 9:25 PM, Keenlearner
<yingun@[EMAIL PROTECTED]
> wrote:=0A> Hello, I have had been programming in PHP for a
while,=
 new to perl. I=0A>  got a perl code bug where it will go to infinite
loop.=
 So is there a=0A>  maximum execution time that I could set in perl just
li=
ke in PHP ?=0A>  Thanks=0Asnip=0A=0AYou can set an signal to go off after
X=
 seconds with the alarm* function:=0A=0A#!/usr/bin/perl=0A=0Ause
strict;=0A=
use warnings;=0A=0Amy $timeout =3D 5*60; #timeout after five
minutes=0A=0Ae=
val {=0A    local $SIG{ALRM} =3D sub { die "timeout\n" };=0A    alarm
$time=
out;=0A        #stuff you want to run in under five minutes=0A};=0Adie
unle=
ss $@[EMAIL PROTECTED]
 eq "timeout\n" if $@[EMAIL PROTECTED]
 =0AChas. Owens=0Awonkden.net=0AThe most im****tant skill a
prog=
rammer can have is the ability to read.=0A=0A-- =0ATo unsubscribe, e-mail:
=
beginners-unsubscribe@[EMAIL PROTECTED]
 additional commands, e-mail:
beginners=
-help@[EMAIL PROTECTED]
 instant
me=
ssages to your online friends
http://uk.messenger.yahoo.com=0A=0A=0A=0A=0AS=
end instant messages to your online friends http://uk.messenger.yahoo.com
 




 3 Posts in Topic:
Fw: Perl maximum execution time
esia168@[EMAIL PROTECTED]  2008-04-14 06:45:23 
Re: Fw: Perl maximum execution time
Jenda@[EMAIL PROTECTED]   2008-04-14 16:31:35 
Re: Fw: Perl maximum execution time
chas.owens@[EMAIL PROTECT  2008-04-14 10:50:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 0:14:31 CST 2008.