summaryrefslogtreecommitdiff
path: root/pod/modpods/sigtrap.pod
diff options
context:
space:
mode:
Diffstat (limited to 'pod/modpods/sigtrap.pod')
-rw-r--r--pod/modpods/sigtrap.pod19
1 files changed, 19 insertions, 0 deletions
diff --git a/pod/modpods/sigtrap.pod b/pod/modpods/sigtrap.pod
new file mode 100644
index 0000000000..ecc35421cc
--- /dev/null
+++ b/pod/modpods/sigtrap.pod
@@ -0,0 +1,19 @@
+=head1 NAME
+
+sigtrap - Perl pragma to enable stack backtrace on unexpected signals
+
+=head1 SYNOPSIS
+
+ use sigtrap;
+ use sigtrap qw(BUS SEGV PIPE SYS ABRT TRAP);
+
+=head1 DESCRIPTION
+
+The C<sigtrap> pragma initializes some default signal handlers that print
+a stack dump of your Perl program, then sends itself a SIGABRT. This
+provides a nice starting point if something horrible goes wrong.
+
+By default, handlers are installed for the ABRT, BUS, EMT, FPE, ILL, PIPE,
+QUIT, SEGV, SYS, TERM, and TRAP signals.
+
+See L<perlmod/Pragmatic Modules>.