[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 Mon, Jan 10, 2000 at 01:28:16PM -0800, Larry Wall wrote:
> Ilya Zakharevich writes:
> : Larry Wall writes:
> : > 
> : > Ilya Zakharevich writes:
> : > : I wonder why not we add something like
> : > : 
> : > :   $SIG{CHLD} = [inc => \$counter, set => [\$foo, 13], pid => \$pid];
> : > : 
> : > : and avoid all the problems with a Perl function call altogether...
> : > 
> : > Bletch, in a vague sort of way.
> : 
> : But comparing to what we have now it would be a paradise.  ;-)
> 
> I was bletching the interface, not the implementation.  I agree that
> the implementation of the current interface could use improvement.
And I was saying that a change of the interface can make the
improvements to become improvements, not changes with some positive
and some negative effects.
> This has all been discussed before.  We need to delay sub invocations
> until we know we're in a safe state, such as the beginning of a
> statement, or at the interator of any looping constructs, including
> regular expressions.
No, we do not *need* to delay sub invocations.  Delaying the
invocation is one of the possible workarounds to the current
disaster.  It has many negative effects, like being a NOP in the case
of a long-running opcode.
And if you want the delayed semantic, you may do 
$SIG{CHLD} = [delayed => sub {...} ];
And you can do
$SIG{CHLD} = [delayed => sub {...}, repeated => [2, sub {...}] ];
which might mean that if another signal appears when one is delayed
(meaning: AHA, something dangerous happens: signal was not served,
probably a long-running opcode, we need some recovery action), another
sub (or maybe another %SIG-compatible specification, as at the start)
should be run.
> Of course, within regular expressions we'd have
> to take extra care to be re-entrant, but the swash routines already do
> that now--see Perl_save_re_context().
Which is an obvious bletch.
Ilya
- Follow-Ups from:
 - 
Larry Wall <larry@wall.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]