IO::Async::Signal man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

IO::Async::Signal(3)  User Contributed Perl Documentation IO::Async::Signal(3)

NAME
       "IO::Async::Signal" - event callback on receipt of a POSIX signal

SYNOPSIS
	use IO::Async::Signal;

	use IO::Async::Loop;
	my $loop = IO::Async::Loop->new();

	my $signal = IO::Async::Signal->new(
	   name => "HUP",

	   on_receipt => sub {
	       print "I caught SIGHUP\n";
	   },
	);

	$loop->add( $signal );

	$loop->loop_forever;

DESCRIPTION
       This module provides a class of "IO::Async::Notifier" which invokes its
       callback when a particular POSIX signal is received.

       Multiple objects can be added to a "Loop" that all watch for the same
       signal.	The callback functions will all be invoked, in no particular
       order.

       This object may be used in one of two ways; with a callback function,
       or as a base class.

       Callbacks
	   If the "on_receipt" key is supplied to the constructor, it should
	   contain a CODE reference to a callback function to be invoked when
	   the signal is received.

	    $on_receipt->( $self )

       Base Class
	   If a subclass is built, then it can override the "on_receipt"
	   method.

	    $self->on_receipt()

PARAMETERS
       The following named parameters may be passed to "new" or "configure":

       name => STRING
	       The name of the signal to watch. This should be a bare name
	       like "TERM". Can only be given at construction time.

       on_receipt => CODE
	       CODE reference to callback to invoke when the signal is
	       received. If not supplied, the subclass method will be called
	       instead.

       Once constructed, the "Signal" will need to be added to the "Loop"
       before it will work.

AUTHOR
       Paul Evans <leonerd@leonerd.org.uk>

perl v5.14.2			  2010-06-09		  IO::Async::Signal(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net