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
Back to
Seekers of Perl Wisdom