NAME
Reflex::Signal - Generic signal watcher and base class for specific ones.
VERSION
version 0.056
SYNOPSIS
As a callback:
use Reflex::Signal;
use Reflex::Callbacks qw(cb_coderef);
my $usr1 = Reflex::Signal->new(
name => "USR1",
on_signal => cb_coderef { print "Got SIGUSR1.\n" },
);
As a promise:
my $usr2 = Reflex::Signal->new( name => "USR2" );
while ($usr2->next()) {
print "Got SIGUSR2.\n";
}
May also be used with watchers, and Reflex::Trait::Observed, but those use cases aren't shown here.
DESCRIPTION
Reflex::Signal is a general signal watcher. It may be used to notify programs when they are sent a signal via kill.
Public Attributes
name
"name" defines the name (or number) of an interesting signal. The Reflex::Signal object will emit events when it detects that the process has been given that signal.
Public Methods
None at this time. Destroy the object to stop it.
Public Events
Reflex::Signal and its subclasses emit just one event: "signal". Generic signals have no additional information, but specific ones may. For example, Reflex::PID (SIGCHLD) includes a process ID and information about its exit.
SEE ALSO
Reflex Reflex::PID Reflex::POE::Wheel::Run
"ACKNOWLEDGEMENTS" in Reflex "ASSISTANCE" in Reflex "AUTHORS" in Reflex "BUGS" in Reflex "BUGS" in Reflex "CONTRIBUTORS" in Reflex "COPYRIGHT" in Reflex "LICENSE" in Reflex "TODO" in Reflex