develooper Front page | perl.perl5.porters | Postings from February 2003

Re: [PATCH] $SIG::UNSAFE

Thread Previous | Thread Next
From:
Gurusamy Sarathy
Date:
February 23, 2003 06:38
Subject:
Re: [PATCH] $SIG::UNSAFE
Message ID:
200302231437.h1NEbSB07374@smtp3.ActiveState.com
On Sun, 23 Feb 2003 14:45:06 +0200, Jarkko Hietaniemi wrote:
>Here's a patch for enabling in runtime the Old Way Of Signals.
>After much waffling I settled on the $SIG::UNSAFE name for the
>control variable, which (I think) falls at the right balance of
>backward portability, least danger of stomping on a user variable,
>and aesthetics.

Not having looked at the patch, $SIG::UNSAFE doesn't seem all
that consistent to me.  Is there a precedent for this style
of setting a flag?

IOW, why not C< ${^UNSAFE_SIGNALS}++ >?

Or even better yet C< $SIG{__ALL__} = 'IMMEDIATE' >?  This could
be extended in future to allow more specific behaviors:
C< $SIG{ALARM} = 'IMMEDIATE' >.

C< $SIG{__ALL__} = 'IGNORE' > would of course disable signal
handling altogether, which is something one may want to do
when executing unsafe code or when creating threads or when
running embedded in another application.

Just a thought.


Sarathy
gsar@ActiveState.com

Thread Previous | 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