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.