dsb has asked for the wisdom of the Perl Monks concerning the following question:
Question:
I've got a program that builds a FIFO stack. I'm trying to handle any interrupt signals (CTRL-C and such, and possibly orders from the O/S to terminate) by trapping the signal, finishing off the particular element in the stack, and then exiting.
dsb
This @ISA my( $cool ) %SIG
I've got a program that builds a FIFO stack. I'm trying to handle any interrupt signals (CTRL-C and such, and possibly orders from the O/S to terminate) by trapping the signal, finishing off the particular element in the stack, and then exiting.
I'm aware of the %SIG hash:
However, I'm not sure how to manage this stack problem and I've no idea where to start.$SIG{INT} = \&handler; sub handler { our $int++; die "signaled"; }
Suggestions?
dsb
This @ISA my( $cool ) %SIG
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Handle Signal and Wrap Up
by aukjan (Friar) on Aug 19, 2005 at 13:53 UTC | |
by dsb (Chaplain) on Aug 19, 2005 at 14:27 UTC | |
by dave_the_m (Monsignor) on Aug 19, 2005 at 14:44 UTC | |
by aukjan (Friar) on Aug 19, 2005 at 18:11 UTC |
Back to
Seekers of Perl Wisdom