Sys::Signals::BlockSimple interface to block delivery of signals | |
Download |
Sys::Signals::Block Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Michael Schout
- Publisher web site:
- http://search.cpan.org/~mschout/
Sys::Signals::Block Tags
Sys::Signals::Block Description
Simple interface to block delivery of signals Sys::Signals::Block is a Perl module that provides an easy way to block the delivery of certain signals. This is essentially just a wrapper around POSIX::sigprocmask(SIG_BLOCK, ...) and POSIX::sigprocmask(SIG_UNBLOCK, ...), but with a much simpler API.The set of signals that should be blocked are given in the import list (the parameters in the use line for the module). The signal values can be either numeric, or string names. If names are given, they may be given either with or without the SIG prefix. For example, the following are all equivalent: # names, no SIG prefix use Sys::Signals::Block qw(TERM INT); # names with SIG prefix use Sys::Signals::Block qw(SIGTERM SIGINT); # integers, using POSIX constants use Sys::Signals::Block (POSIX::SIGTERM, POSIX::SIGINT);SYNOPSIS use Sys::Signals::Block qw(TERM INT); Sys::Signals::Block->block; # critical section. # SIGINT, SIGTERM will not be delivered Sys::Signals::Block->unblock; # signals sent during critical section will be delivered here # or if you prefer object syntax: my $sigs = Sys::Signals::Block->instance; $sigs->block; # critical section $sigs->unblock; Requirements: · Perl
Sys::Signals::Block Related Software