[Gllug] Re: Timeouts in perl

- Tethys tethys at gmail.com
Mon Nov 6 14:26:27 UTC 2006


On 11/6/06, Richard Jones <rich at annexia.org> wrote:

> > It doesn't matter whether I use my own timeout routine or Time::Out as
> > suggested by a couple of people. So, what is WWW::Mechanize doing to
> > screw up my exception handling, and what can I do to get around it?
>
> I suspect that it's blocking alarm signals.  I did a quick grep
> through WWW::Mechanize -> LWP -> LWP::Protocol::http -> Net::HTTP and
> could see a place where it actual did interfere with the current
> signal handlers, but it should be easy enough for you to check this by
> running your program under strace and seeing whether signals are
> blocked.

No, the signal is definitely being delivered. If I roll my own timeout
code rather than using Time::Out, I can put a printf in the signal
handler and see that it's being called. What isn't happening is the
exception being triggered by the die call being propagated up to the
parent function, where it would be caught by an eval.

Tet
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list