develooper Front page | perl.perl5.porters | Postings from October 1999

Re: deprecating SIGDIE

Thread Previous | Thread Next
Nick Ing-Simmons
October 1, 1999 02:27
Re: deprecating SIGDIE
Message ID:
Graham Barr <> writes:
>On Thu, Sep 30, 1999 at 07:32:09AM -0600, Tom Christiansen wrote:
>> The code patch to restore $SIG{__DIE__} to its intended behaviour
>> is trivial:
>> -    if (PL_diehook) {
>> +    /*
>> +     * Added test so that a die hook only triggers
>> +     * if the exception is uncaught.  tchrist 30/Sept/99
>> +     */
>> +    if (PL_diehook && !was_in_eval) {
>I am not sure this is the right fix. This would effectivly
>make it SIG{__EXIT_ON_DIE__}. 

I think the fix is fine. It just pretends there was no handler.

>IMO, eval should just do the local($SIG{__DIE__})

Tom's patch does that by re-using the 'was_in_eval' flag to fake 
a local $SIG{__DIE__} = undef; but more cheaply.

My only concern how 'was_in_eval' interracts with stack swapping stuff,
but as it is already used in tail of the function it cannot be too 
far off.

Nick Ing-Simmons <>
Via, but not speaking for: Texas Instruments Ltd.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About