At 04:34 PM 02/09/00 +0200, Stas Bekman wrote:
>> eval {
>>     local $SIG{__DIE__};
>>     local $SIG{ALRM} = CORE::sub { die "Timeout" };
>
>Anonymous sub within package CORE? I've never seen such a code... 

Oh, that's some old code that I just still use.  I assumed it's harmless.
The problem was with versions of CGI.pm prior to 2.44 that defined a
function called 'sub', and so I use of CORE::sub to avoid warnings.  I just
haven't upgraded my code for the change in CGI.pm.

>Is it possible that:
>  CORE::sub { die "Timeout" };
>is the same as :
>  sub { CORE::die "Timeout" };
>
>which then explains the whole thing? As CORE::die gets the unoverriden
>die() back. (die() is overriden by Apache, so your server won't quit
>every time something wents wrong with your code...)

Oh, that's interesting.  I'm not sure I'm convinced that CORE::sub {die} is
the same as sub { CORE::die }.  Even if it was, wouldn't the eval{} still
trap it?  If die() wasn't overridden in Apache, would eval { die } kill the
server?

>Did you run it under debugger?

No.  I'm not clear on how to reproduce the error.  Can you think of some
code that would demonstrate this?



Bill Moseley
mailto:[EMAIL PROTECTED]

Reply via email to