[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [ID 19991229.003] perl 5.005_03 core dumps -- singal



On Tue, Jan 11, 2000 at 01:59:10PM -0800, Larry Wall wrote:
> : Really?  You mean that on
> : 
> :   $SIG{USR1} = sub {$i++; return};
> : 
> : Perl will insert code to check for $i?  And what will it do after the
> : check?  ;-)
> 
> No, it inserts code to check for sig_count[SIGUSR1], which will then
> cause some meaningful code to run, rather than just an increment.

Apparently, I got carried away by the mantra "do as little as you can
in a signal handler".  Given "absolutely safe" signals, one could
indeed do all the work inside, instead of setting a flag to do some
processing later, if needed.

But since safe signals are not possible (see XSUBs), and require a
significant rewrite of the most important "do a lot" Perl opcodes (at
any checkpoint we should be ready for a longjump), this is still
rather moot.

Ilya


Follow-Ups from:
Dan Sugalski <dan@sidhe.org>
References to:
Ilya Zakharevich <ilya@math.ohio-state.edu>
Larry Wall <larry@wall.org>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]