GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  DAEMON::GENERIC::WHILE1 (3)

.ds Aq ’

NAME



 Daemon::Generic::While1 - Daemon framework with default while(1) loop



CONTENTS

SYNOPSIS



 @ISA = qw(Daemon::Generic::While1);

 sub gd_run_body {
        # stuff
 }



DESCRIPTION

This is a slight variation on Daemon::Generic: a default gd_run() provided. It has a while(1) loop that calls gd_run_body() over and over. It checks for reconifg and and terminate events and only actions them between calls to gd_run_body().

Terminate events will be forced through after $Daemon::Generic::force_quit_delay seconds if gd_run_body() doesn’t return quickly enough.

SUBCLASS METHODS REQUIRD

The following method is required to be overridden to subclass Daemon::Generic::While1:
gd_run_body() This method will be called over and over. This method should include a call to sleep(1) (or a bit more). Reconfig events will not interrupt it. Quit events will only interrupt it after 15 seconds.

ADDITIONAL METHODS

The following additional methods are available for your use (as compared to Daemon::Generic):
gd_sleep($period) This will sleep for $period seconds but in one-second intervals so that if a SIGINT or SIGHUP arrives the sleep period can end more quickly.

Using this makes it safe for gd_run_body() to sleep for longer than $Daemon::Generic::force_quit_delay seconds at a time.

ADDITIONAL MEMBER DATA

The following additional bits of member data are defined:
gd_sigint The time at which an (unprocessed) SIGINT was received.
gd_sighup The time at which an (unprocessed) SIGHUP was received.

LICENSE

Copyright (C) 2006-2010 David Muir Sharnoff <muir@idiom.com>. Copyright (C) 2011 Google, Inc. This module may be used and distributed on the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 DAEMON::GENERIC::WHILE1 (3) 2013-10-05

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.