At 12:19 PM 02/06/02 -0800, Gisle Aas wrote:
>Bill Moseley <[EMAIL PROTECTED]> writes:
>
>> I assume the timeout passed to IO::Socket::INET is passed on as a timeout
>> on the select() system call, which I also assume is portable for Windows.
>> So, am I safe using a $ua->timeout, AND wrapping the request in eval {}
>> with an alarm($timeout) call (which I will do only if not running $^O =~
>> /Win32/)?
>
>You are not safe if you are using alarm. Perl might core dump
>randomly if you play with signals. I believe safe signal handling has
>made it into bleadperl.
Sorry to be so thick today.
To be clear, you mean it's not safe to use *both* $ua->timeout AND eval {
alarm($timeout); ... } together? If so, then how about using $ua->timeout
on Windows and an eval {} block otherwise?
Or would you think it's unsafe to use alarm() at all when making a request?
Or just alarm() in general?
--
Bill Moseley
mailto:[EMAIL PROTECTED]