develooper Front page | perl.perl5.porters | Postings from January 2001

Re: safe signals (was Re: perl IS an event loop (was Re:Speaking of signals...))

Thread Next
From:
Dan Sugalski
Date:
January 6, 2001 10:24
Subject:
Re: safe signals (was Re: perl IS an event loop (was Re:Speaking of signals...))
Message ID:
5.0.2.1.0.20010106132400.0214ce40@24.8.96.48
At 06:14 PM 1/6/01 +0000, Nicholas Clark wrote:
>On Sat, Jan 06, 2001 at 01:06:51PM -0500, Dan Sugalski wrote:
> > At 04:01 PM 1/6/01 +0000, Simon Cozens wrote:
>
> > >Gosh, really? I thought it was so significant that it didn't go in core.
> > >If it was that small, why *didn't* it go in core?
> >
> > Because a guaranteed 3-5% slowdown in the interpreter, regardless of
> > whether you use signals or not (and the vast majority of perl code that
> > runs doesn't) *is* significant. The cost just wasn't worth the benefit.
>
>Hmm. No-one produced a patch with 2 loops, 1 for normal use, and 1 when
>%SIG has handlers other than default or ignore assigned to it.
>Would that be an acceptable perl5 compromise?

Nope. Because that screws people who do evil things like:

   do "some_file_with_all_my_sig_handlers.plx";

Basically you can't know at runtime whether the fact that you have no 
signal handlers means you won't have signal handlers...

                                         Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
dan@sidhe.org                         have teddy bears and even
                                      teddy bears get drunk




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About