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 1.02, built on November 10, 2020. Website: http://perl.overmeer.net/CPAN. The code is based on POSIX, which is released with Perl itself. See also POSIX::Util for additional functionality.
COPYRIGHTS
Copyrights 2011-2020 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://dev.perl.org/licenses/