NAME
POSIX::SigSet - collect signal flags
SYNOPSIS
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) ) { ... }
DESCRIPTION
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.
METHODS
Constructors
- POSIX::SigSet->new([SIGNALS])
-
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.
Other
- $obj->addset(SIGNAL)
-
Add one signal to a SigSet object. Returns
undef
on failure. - $obj->delset(SIGNAL)
-
Remove one signal from the SigSet object. Returns
undef
on failure. - $obj->emptyset()
-
Initialize the SigSet object to be empty. Returns
undef
on failure. - $obj->fillset()
-
Initialize the SigSet object to include all signals. Returns
undef
on failure. - $obj->ismember()
-
Tests the SigSet object to see if it contains a specific signal.
example:
if($sigset->ismember(SIGUSR1)) { print "contains SIGUSR1\n"; }
SEE ALSO
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
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