[libdaemon-control-perl] 01/01: Imported Upstream version 0.001006
Salvatore Bonaccorso
carnil at debian.org
Wed Jun 25 21:24:48 UTC 2014
This is an automated email from the git hooks/post-receive script.
carnil pushed a commit to annotated tag upstream/0.001006
in repository libdaemon-control-perl.
commit 0a2bc55e7f9897329542ca9d3fd5d95cab458706
Author: Salvatore Bonaccorso <carnil at debian.org>
Date: Wed Jun 25 23:21:22 2014 +0200
Imported Upstream version 0.001006
---
Changes | 5 +++++
META.yml | 8 ++++----
inc/Module/Install.pm | 2 +-
inc/Module/Install/Base.pm | 2 +-
inc/Module/Install/Can.pm | 2 +-
inc/Module/Install/Fetch.pm | 2 +-
inc/Module/Install/Makefile.pm | 2 +-
inc/Module/Install/Metadata.pm | 2 +-
inc/Module/Install/Win32.pm | 2 +-
inc/Module/Install/WriteAll.pm | 2 +-
lib/Daemon/Control.pm | 34 ++++++++++++++++++++++++----------
11 files changed, 41 insertions(+), 22 deletions(-)
diff --git a/Changes b/Changes
index a6f9a50..26b5aed 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,8 @@
+0.001006 2014-06-24 SymKat <symkat at symkat.com>
+ * Allow custom reload/stop signals (hemmop)
+ * Documentation cleanup (ilmari, rwstauner)
+ * Module name POD format fixed (RT 93280)
+
0.001005 2014-02-19 SymKat <symkat at symkat.com>
* Constructor now accepts a list as well as a hashref
* New method added: run_command, allows multiple instances of D::C
diff --git a/META.yml b/META.yml
index c977a45..696869b 100644
--- a/META.yml
+++ b/META.yml
@@ -4,12 +4,12 @@ author:
- '=over 4'
build_requires:
ExtUtils::MakeMaker: 6.59
- Test::More: 0.88
+ Test::More: '0.88'
configure_requires:
ExtUtils::MakeMaker: 6.59
distribution_type: module
dynamic_config: 1
-generated_by: 'Module::Install version 1.06'
+generated_by: 'Module::Install version 1.08'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -21,11 +21,11 @@ no_index:
- t
requires:
Cwd: 0
- File::Path: 2.08
+ File::Path: '2.08'
File::Spec: 0
POSIX: 0
perl: 5.8.1
resources:
license: http://dev.perl.org/licenses/
repository: git://github.com/symkat/Daemon-Control.git
-version: 0.001005
+version: '0.001006'
diff --git a/inc/Module/Install.pm b/inc/Module/Install.pm
index 4ecf46b..7680c84 100644
--- a/inc/Module/Install.pm
+++ b/inc/Module/Install.pm
@@ -31,7 +31,7 @@ BEGIN {
# This is not enforced yet, but will be some time in the next few
# releases once we can make sure it won't clash with custom
# Module::Install extensions.
- $VERSION = '1.06';
+ $VERSION = '1.08';
# Storage for the pseudo-singleton
$MAIN = undef;
diff --git a/inc/Module/Install/Base.pm b/inc/Module/Install/Base.pm
index 802844a..3e63345 100644
--- a/inc/Module/Install/Base.pm
+++ b/inc/Module/Install/Base.pm
@@ -4,7 +4,7 @@ package Module::Install::Base;
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
- $VERSION = '1.06';
+ $VERSION = '1.08';
}
# Suspend handler for "redefined" warnings
diff --git a/inc/Module/Install/Can.pm b/inc/Module/Install/Can.pm
index 22167b8..93f248d 100644
--- a/inc/Module/Install/Can.pm
+++ b/inc/Module/Install/Can.pm
@@ -8,7 +8,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.06';
+ $VERSION = '1.08';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Fetch.pm b/inc/Module/Install/Fetch.pm
index bee0c4f..ecc0d53 100644
--- a/inc/Module/Install/Fetch.pm
+++ b/inc/Module/Install/Fetch.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.06';
+ $VERSION = '1.08';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Makefile.pm b/inc/Module/Install/Makefile.pm
index 7052f36..c0978a4 100644
--- a/inc/Module/Install/Makefile.pm
+++ b/inc/Module/Install/Makefile.pm
@@ -8,7 +8,7 @@ use Fcntl qw/:flock :seek/;
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.06';
+ $VERSION = '1.08';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Metadata.pm b/inc/Module/Install/Metadata.pm
index 58430f3..e4112f8 100644
--- a/inc/Module/Install/Metadata.pm
+++ b/inc/Module/Install/Metadata.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.06';
+ $VERSION = '1.08';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/Win32.pm b/inc/Module/Install/Win32.pm
index eeaa3fe..e529382 100644
--- a/inc/Module/Install/Win32.pm
+++ b/inc/Module/Install/Win32.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.06';
+ $VERSION = '1.08';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
}
diff --git a/inc/Module/Install/WriteAll.pm b/inc/Module/Install/WriteAll.pm
index 85d8018..2c74308 100644
--- a/inc/Module/Install/WriteAll.pm
+++ b/inc/Module/Install/WriteAll.pm
@@ -6,7 +6,7 @@ use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
- $VERSION = '1.06';
+ $VERSION = '1.08';
@ISA = qw{Module::Install::Base};
$ISCORE = 1;
}
diff --git a/lib/Daemon/Control.pm b/lib/Daemon/Control.pm
index eeefec0..5ff2e64 100644
--- a/lib/Daemon/Control.pm
+++ b/lib/Daemon/Control.pm
@@ -8,7 +8,7 @@ use File::Path qw( make_path );
use Cwd 'abs_path';
require 5.008001; # Supporting 5.8.1+
-our $VERSION = '0.001005'; # 0.1.5
+our $VERSION = '0.001006'; # 0.1.6
$VERSION = eval $VERSION;
my @accessors = qw(
@@ -16,7 +16,7 @@ my @accessors = qw(
uid path gid scan_name stdout_file stderr_file pid_file fork data
lsb_start lsb_stop lsb_sdesc lsb_desc redirect_before_fork init_config
kill_timeout umask resource_dir help init_code
- prereq_no_process foreground
+ prereq_no_process foreground reload_signal stop_signals
);
my $cmd_opt = "[start|stop|restart|reload|status|show_warnings|get_init_file|help]";
@@ -74,6 +74,8 @@ sub new {
quiet => 0,
umask => 0,
foreground => 0,
+ reload_signal => 'HUP',
+ stop_signals => [ qw(TERM TERM INT KILL) ],
}, $class;
for my $accessor ( @accessors ) {
@@ -451,7 +453,7 @@ sub do_stop {
if ( $self->pid_running($start_pid) ) {
SIGNAL:
- foreach my $signal ( qw(TERM TERM INT KILL) ) {
+ foreach my $signal (@{ $self->stop_signals }) {
$self->trace( "Sending $signal signal to pid $start_pid..." );
kill $signal => $start_pid;
@@ -513,7 +515,7 @@ sub do_reload {
$self->read_pid;
if ( $self->pid && $self->pid_running ) {
- kill "SIGHUP", $self->pid;
+ kill $self->reload_signal, $self->pid;
$self->pretty_print( "Reloaded" );
return 0;
} else {
@@ -691,7 +693,7 @@ Write a program that describes the daemon:
use strict;
use Daemon::Control;
- Daemon::Control->new(
+ exit Daemon::Control->new(
name => "My Daemon",
lsb_start => '$syslog $remote_fs',
lsb_stop => '$syslog',
@@ -713,7 +715,7 @@ Write a program that describes the daemon:
By default C<run> will use @ARGV for the action, and exit with an LSB compatible
exit code. For finer control, you can use C<run_command>, which will return
the exit code, and accepts the action as an argument. This enables more programatic
-control, as well as running multiple instances of M<Daemon::Control> from one script.
+control, as well as running multiple instances of L<Daemon::Control> from one script.
my $daemon = Daemon::Control->new(
...
@@ -852,7 +854,7 @@ and STDERR will be redirected to C<stderr_file>. Setting this to 0 will disable
redirecting before a double fork. This is useful when you are using a code
reference and would like to leave the filehandles alone until you're in control.
-Call C<->redirect_filehandles> on the Daemon::Control instance your coderef is
+Call C<< ->redirect_filehandles >> on the Daemon::Control instance your coderef is
passed to redirect the filehandles.
=head2 stdout_file
@@ -983,6 +985,18 @@ If this boolean flag is set to a true value all output from the init script
$daemon->quiet( 1 );
+=head2 reload_signal
+
+The signal to send to the daemon when reloading it.
+Default signal is C<HUP>.
+
+=head2 stop_signals
+
+An array ref of signals that should be tried (in order) when
+stopping the daemon.
+Default signals are C<TERM>, C<TERM>, C<INT> and C<KILL> (yes, C<TERM>
+is tried twice).
+
=head1 METHODS
=head2 run_command
@@ -1013,7 +1027,7 @@ exits. Called by:
Is called when B<foreground> is given as an argument. Starts the
program or code reference and stays in the foreground -- no forking
is done, regardless of the compile-time arguments. Additionally,
-turns C<quiet> on to avoid showing M<Daemon::Control> output.
+turns C<quiet> on to avoid showing L<Daemon::Control> output.
/usr/bin/my_program_launcher.pl foreground
@@ -1033,8 +1047,8 @@ Called by:
=head2 do_reload
-Is called when reload is given as an argument. Sends a HUP signal to the
-daemon.
+Is called when reload is given as an argument. Sends the signal
+C<reload_signal> to the daemon.
/usr/bin/my_program_launcher.pl reload
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libdaemon-control-perl.git
More information about the Pkg-perl-cvs-commits
mailing list