1Daemon::Generic::While1U(s3e)r Contributed Perl DocumentaDtaieomnon::Generic::While1(3)
2
3
4
6 Daemon::Generic::While1 - Daemon framework with default while(1) loop
7
9 @ISA = qw(Daemon::Generic::While1);
10
11 sub gd_run_body {
12 # stuff
13 }
14
16 This is a slight variation on Daemon::Generic: a default "gd_run()"
17 provided. It has a while(1) loop that calls "gd_run_body()" over and
18 over. It checks for reconifg and and terminate events and only actions
19 them between calls to "gd_run_body()".
20
21 Terminate events will be forced through after
22 $Daemon::Generic::force_quit_delay seconds if "gd_run_body()" doesn't
23 return quickly enough.
24
26 The following method is required to be overridden to subclass
27 Daemon::Generic::While1:
28
29 gd_run_body() This method will be called over and over. This method
30 should include a call to sleep(1) (or a bit more).
31 Reconfig events will not interrupt it. Quit events will
32 only interrupt it after 15 seconds.
33
35 The following additional methods are available for your use (as
36 compared to Daemon::Generic):
37
38 gd_sleep($period)
39 This will sleep for $period seconds but in one-second
40 intervals so that if a SIGINT or SIGHUP arrives the
41 sleep period can end more quickly.
42
43 Using this makes it safe for "gd_run_body()" to sleep
44 for longer than $Daemon::Generic::force_quit_delay
45 seconds at a time.
46
48 The following additional bits of member data are defined:
49
50 gd_sigint The time at which an (unprocessed) SIGINT was recevied.
51
52 gd_sighup The time at which an (unprocessed) SIGHUP was recevied.
53
55 If you need high-speed internet services (T1, T3, OC3 etc), please send
56 me your request-for-quote. I have access to very good pricing: you'll
57 save money and get a great service.
58
60 Copyright(C) 2006 David Muir Sharnoff <muir@idiom.com>. This module
61 may be used and distributed on the same terms as Perl itself.
62
63
64
65perl v5.12.1 2010-07-14 Daemon::Generic::While1(3)