sigaction#
Install or inspect a signal handler for signal $sig.
Synopsis#
use POSIX qw(sigaction SIGINT);
my $action = POSIX::SigAction->new("IGNORE");
my $old = POSIX::SigAction->new;
sigaction(SIGINT, $action, $old);
What you get back#
"0 but true" on success, undef on failure. When $oldaction is supplied, it is populated with the previous HANDLER, MASK, FLAGS, and SAFE fields.
Edge cases#
Negative
$sigcroaks withNegative signals are not allowed.An action hash without a
HANDLERkey croaks withCan't supply an action without a HANDLER.
See also#
sigprocmask- change the blocked-signal mask.POSIX::SigSet- build theMASKfield of an action.