in reply to Problem timing out XML::LibXML parsing

I'm not completely sure, but isn't there something about signals in Perl having been changed so that they are only returned when you are somewhere safe in Perl. Deferred_Signals_(Safe_Signals)

There's a environment variable (PERL_SIGNALS) you can set to unsafe that disables this behavior. That might allow you to test if alarm is being affected by this feature.

G. Wade

Replies are listed 'Best First'.
Re^2: Problem timing out XML::LibXML parsing
by hobbs (Monk) on Feb 04, 2009 at 00:54 UTC
    The other thing that you can do, which is also documented in perlipc, is to use POSIX::sigaction() to set your handler, which has the advantage of only invoking the "unsafe" behavior for that particular SIGALRM and not for any signal your app might catch, ever. You decide whether that sounds worth your time or not :)