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


Thread Previous | Thread Next
Gurusamy Sarathy
February 23, 2003 09:16
Message ID:
On Sun, 23 Feb 2003 15:09:21 GMT, Nicholas Clark wrote:
>On Sun, Feb 23, 2003 at 06:37:28AM -0800, Gurusamy Sarathy wrote:
>> 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.
>I like this idea as described. But it has implications:
>Conceptually what happens when I go $SIG{__ALL__} = 'DEFAULT'; ?

Sets all signals to their initial (default) dispositions?

>And presumably local $SIG{__ALL__} = 'IGNORE'; restores all old signal
>handlers at scope exit?


>In what state does
>  local $SIG{__ALL__} = 'IGNORE';
>  $SIG{ALARM} = \&pie;
>leave the alarm handler?

Whatever is most useful.  Perhaps the ALARM handler will still be
installed as is normally done, but will not be called within
that scope (since signals are being blocked).  Outside the scope,
it should get called on ALARM.


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