Signal Handlers
These options affect which handler will be used for signals installed later:
stack–traceThis pragma-supplied handler outputs a Perl stack trace to
STDERRand then tries to dump core. This is the default signal handler.dieThis pragma-supplied handler calls
dieviaCarp::croakwith a message indicating the signal caught.handlerYOURHANDLERYOURHANDLERwill be used as the handler for signals installed later.YOURHANDLERcan be any value valid for assignment into%SIG. Remember that the proper functioning of many C library calls (particularly standard I/O calls) cannot be guaranteed within a signal handler. Worse, it’s hard to guess which bits of C library code are called from which bits of Perl code. (On the other hand, many signals thatsigtraptraps are pretty vile—they’re gonna take you down anyway, so there’s not much harm in trying to do something, now is there?)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access