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


Thread Previous | Thread Next
Gurusamy Sarathy
February 23, 2003 06:38
Message ID:
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{__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.


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