16.20.3. Discussion
The POSIX standard introduced sigaction and
sigprocmask to give you better control over how
signals are delivered. The sigprocmask function
controls delayed delivery of signals, and
sigaction installs handlers. If available, Perl
uses sigaction when you change
%SIG.
To use sigprocmask, first build a signal set using
POSIX::SigSet->new. This takes a list of signal
numbers. The POSIX module exports functions named after the signals,
which return their signal numbers.
use POSIX qw(:signal_h);
$sigset = POSIX::SigSet->new( SIGINT, SIGKILL );