POSIX::SigSet - collect signal flags
use POSIX::SigSet (); use POSIX::1003::Signals; $sigset = POSIX::SigSet->new; $sigset = POSIX::SigSet->new(SIGUSR1); $sigset->addset(SIGUSR2); $sigset->delset(SIGUSR2); $sigset->emptyset(); $sigset->fillset(); if( $sigset->ismember(SIGUSR1) ) { ... }
The POSIX::SigSet object is simple a collection of signal flags. The object is administered in POSIX.xs. See POSIX::SigAction for examples of its usage.
POSIX::SigSet
Create a new SigSet object. One or more SIGNALS can be added immediately. The object will be destroyed automatically when it is no longer needed.
Add one signal to a SigSet object. Returns undef on failure.
undef
Remove one signal from the SigSet object. Returns undef on failure.
Initialize the SigSet object to be empty. Returns undef on failure.
Initialize the SigSet object to include all signals. Returns undef on failure.
Tests the SigSet object to see if it contains a specific signal.
example:
if($sigset->ismember(SIGUSR1)) { print "contains SIGUSR1\n"; }
This module is part of POSIX-1003 distribution version 0.07, built on December 28, 2011. Website: http://perl.overmeer.net. The code is based on POSIX, which is released with Perl itself.
Copyrights of the perl code and the related documentation by 2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html
To install POSIX::1003, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POSIX::1003
CPAN shell
perl -MCPAN -e shell install POSIX::1003
For more information on module installation, please visit the detailed CPAN module installation guide.