develooper Front page | perl.perl5.porters | Postings from April 2003

Re: [PATCH 5.8.1 @19053] Net::Ping test

Thread Previous
From:
Rob Brown
Date:
April 25, 2003 22:33
Subject:
Re: [PATCH 5.8.1 @19053] Net::Ping test
Message ID:
Pine.LNX.4.44.0304252326260.16641-100000@rox.roobik.com
On 1 Apr 2003, Slaven Rezic wrote:

> Ilya Zakharevich <ilya@Math.Berkeley.EDU> writes:
> 
> > On Tue, Apr 01, 2003 at 12:16:32AM +0200, Slaven Rezic wrote:
> > > > > Please look at Message-Id:
> > > > > <200303281526.h2SFQCx8031405@vran.herceg.de> for an alternative patch
> > > > > for the same problem. Does this work for you?
> > 
> > > > The test succeeds, but there is a long (15 sec?) delay before ok 5.
> > 
> > > 11 seconds. The timeout is defined in line 31 in 190_alarm.t.
> > 
> > But *should* it block on my system?  It did not before your patch.
> > 
> 
> Before the patch, the croak("tcp connect error - $!") caused the
> eval{} to be exited prematurely.

My intention was to have it spin for 11 seconds
and make sure alarm() kicked it out of the
infinite loop.  This would ensure Net::Ping
didn't dink with the ALRM timer in any way.
Thus alarm() works correctly if it "blocks" for
11 seconds.  Now if it hangs for much more than
that, like 15 seconds, than something is wrong.

--
Rob


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About