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.
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.
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.98, built on December 03, 2013. Website: http://perl.overmeer.net. The code is based on POSIX, which is released with Perl itself. See also POSIX::Util for additional functionality.
Copyrights 2011-2013 on the perl code and the related documentation 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