IO::Async::SignalProxy - a class to allow handling of POSIX signals with IO::Async-based IO
IO::Async::SignalProxy
IO::Async
use IO::Async::SignalProxy; my $sigproxy = IO::Async::SignalProxy->new( signal_HUP => sub { reread_config() }, ); my $set = IO::Async::Set::... $set->add( $sigproxy );
This module provides a class that allows POSIX signals to be handled safely alongside other IO operations on filehandles in an IO::Async::Set. Because signals could arrive at any time, care must be taken that they do not interrupt the normal flow of the program, and are handled at the same time as other events in the IO::Async::Set's results.
IO::Async::Set
This function returns a new instance of a IO::Async::SignalProxy object. The %params hash takes keys that specify callback functions to run when signals arrive. They are all of the form
%params
signal_$NAME => sub { ... }
where $NAME is the basic POSIX name for the signal, such as TERM or CHLD.
$NAME
TERM
CHLD
POSIX for the SIGname constants
SIGname
Paul Evans <leonerd@leonerd.org.uk>
To install IO::Async::Set, copy and paste the appropriate command in to your terminal.
cpanm
cpanm IO::Async::Set
CPAN shell
perl -MCPAN -e shell install IO::Async::Set
For more information on module installation, please visit the detailed CPAN module installation guide.