Полезная информация

Programming Perl

Programming PerlSearch this book
Previous: 7.2.56 Shell - Run Shell Commands Transparently Within PerlChapter 7
The Standard Perl Library
Next: 7.2.58 Socket - Load the C socket.h Defines and Structure Manipulators
 

7.2.57 sigtrap - Enable Stack Backtrace on Unexpected Signals

use sigtrap;       # initialize default signal handlers
use sigtrap LIST;  # LIST example:  qw(BUS SEGV PIPE SYS ABRT TRAP)

The sigtrap pragma initializes a signal handler for the signals specified in LIST, or (if no list is given) for a set of default signals. The signal handler prints a stack dump of the program and then issues a (non-trapped) ABRT signal.

In the absence of LIST, the signal handler is set up to deal with the ABRT, BUS, EMT, FPE, ILL, PIPE, QUIT, SEGV, SYS, TERM, and TRAP signals.


Previous: 7.2.56 Shell - Run Shell Commands Transparently Within PerlProgramming PerlNext: 7.2.58 Socket - Load the C socket.h Defines and Structure Manipulators
7.2.56 Shell - Run Shell Commands Transparently Within PerlBook Index7.2.58 Socket - Load the C socket.h Defines and Structure Manipulators