[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Possible alarm() problem in 5.10b1r2




I found what might be a problem with alarm() and $SIG{'ALRM'} in
5.10b1r2.  In short, whenever I try to define $SIG{'ALRM'} with -w on,
MacPerl complains "# No such signal: SIGALRM.".  I notice that sig_name
is undefined in Config.pm, although I don't know whether that's the
problem or not.

I ran across the problem tonight trying to run a script using
libwww-perl-5; since alarm() no longer complains about being undefined,
I allowed LWP to use them.  Eventually MacPerl gave me something like
"Caught a signal #14...terminating", even though a signal handler was
defined in the LWP::UserAgent routine being used (basically all the
handler does is die), and the request was being done inside an eval.
(Am I correct in assuming that, when the timeout caused the alarm to go
off, eval should have trapped the die and and execution should have
continued?). I can deal with the problem easily enough by turning off
the use_alarm flag, but since the alarms should take care of problems
with nameservers etc. and generally cause things to run more smoothly
I'd like to leave them on.
---
--------
Paul J. Schinder
NASA Goddard Space Flight Center,
Code 693, Greenbelt, MD 20771 USA
schinder@pjstoaster.pg.md.us