in reply to Alarms broken when using LWP

See the documentation for LWP::UserAgent.

By default the library uses alarm() to implement timeouts, dying if the timeout occurs.

Your alarms are interfering with LWP's. From your code, it seems the purpose of your alarm is to force a timeout for your connection. You should use LWP::UserAgent's timeout method for this.

You could search on LWP timeout for more information.

Replies are listed 'Best First'.
Re: Re: Alarms broken when using LWP
by merlyn (Sage) on Mar 29, 2001 at 21:28 UTC
    That's an old version of LWP. Modern versions (in the past two years, if I recall correctly) use select timeouts, not alarm timeouts.

    Solution: upgrade to something released in the past two years!

    -- Randal L. Schwartz, Perl hacker