r69064 - in /trunk/libproc-daemon-perl: Changes MANIFEST META.yml debian/changelog debian/control debian/copyright lib/Proc/Daemon.pm lib/Proc/Daemon.pod t/02_testmodule.t
carnil at users.alioth.debian.org
carnil at users.alioth.debian.org
Sat Feb 19 07:32:45 UTC 2011
Author: carnil
Date: Sat Feb 19 07:32:35 2011
New Revision: 69064
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=69064
Log:
* New upstream release
* Add myself to Uploaders.
* Fix changelog entry for versions 0.05-1, merge the unreleased
version 0.03-2.0.
* debian/copyright: Refresh debian/* packaging stanza.
Modified:
trunk/libproc-daemon-perl/Changes
trunk/libproc-daemon-perl/MANIFEST
trunk/libproc-daemon-perl/META.yml
trunk/libproc-daemon-perl/debian/changelog
trunk/libproc-daemon-perl/debian/control
trunk/libproc-daemon-perl/debian/copyright
trunk/libproc-daemon-perl/lib/Proc/Daemon.pm
trunk/libproc-daemon-perl/lib/Proc/Daemon.pod
trunk/libproc-daemon-perl/t/02_testmodule.t
Modified: trunk/libproc-daemon-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-daemon-perl/Changes?rev=69064&op=diff
==============================================================================
--- trunk/libproc-daemon-perl/Changes (original)
+++ trunk/libproc-daemon-perl/Changes Sat Feb 19 07:32:35 2011
@@ -1,41 +1,45 @@
-Revision history for Perl module Proc::Daemon.
-
-0.06 Mon Jan 17 2011
- - A lot of documentation was add to the source code.
- - Daemon STDIN was fixed to "read" now instead of "write".
- - Replaced global filehandles with scalars.
- - Add a <die> if <chdir> fails.
- - Updated the documentation and add a note to the documentation about the
- behavior of process-group Signals.
-
-0.05 Thu Okt 28 2010
- - fixed a problem when using the old method of calling Proc::Daemon::Init
- without object (reported by Alex Samorukov). The parent process didn't
- exit.
- - fixed a problem with Proc::ProcessTable 0.44: Under some conditions
- 'cmndline' retruns with space and/or other characters at the end.
- - Update and small fixes in the documentation.
-
-0.04 Sun Okt 24 2010
- - Added functions: new(), adjust_settings(), fix_filename(), Status(),
- Kill_Daemon(), get_pid() and get_pid_by_proc_table_attr().
- - Init() now returns the PID of the daemon.
- - Fork() now allways returns values like Perls built-in 'fork' does.
- - Description was rewritten, extended and moved to the new Daemon.pod file.
- - Additional test are done at installation.
- - $SIG{'HUP'} was set to be valid only 'local' (bug report).
- - POSIX::EAGAIN() was added to Fork() (bug report).
-
-0.03 Thu Jun 19 2003
- - Licensing is more explicit: Either GPL or Artistic.
- - Updated author contact information.
-
-0.02 Sat Apr 17 1999
- - init() function superceded by Init() function.
- - All open files are closed during daemonization.
- - A double fork is now down to avoid the potential of acquiring
- a controlling terminal.
- - Added Fork() and OpenMax() functions.
-
-0.01 Thu Jan 27 1998
- - initial bundled release.
+Revision history for Perl module Proc::Daemon.
+
+0.07 Thu Feb 17 2011
+ - Add signal processing to Kill_Daemon().
+ - Updated the documentation.
+
+0.06 Mon Jan 17 2011
+ - A lot of documentation was add to the source code.
+ - Daemon STDIN was fixed to "read" now instead of "write".
+ - Replaced global filehandles with scalars.
+ - Add a <die> if <chdir> fails.
+ - Updated the documentation and add a note to the documentation about the
+ behavior of process-group Signals.
+
+0.05 Thu Okt 28 2010
+ - fixed a problem when using the old method of calling Proc::Daemon::Init
+ without object (reported by Alex Samorukov). The parent process didn't
+ exit.
+ - fixed a problem with Proc::ProcessTable 0.44: Under some conditions
+ 'cmndline' retruns with space and/or other characters at the end.
+ - Update and small fixes in the documentation.
+
+0.04 Sun Okt 24 2010
+ - Added functions: new(), adjust_settings(), fix_filename(), Status(),
+ Kill_Daemon(), get_pid() and get_pid_by_proc_table_attr().
+ - Init() now returns the PID of the daemon.
+ - Fork() now allways returns values like Perls built-in 'fork' does.
+ - Description was rewritten, extended and moved to the new Daemon.pod file.
+ - Additional test are done at installation.
+ - $SIG{'HUP'} was set to be valid only 'local' (bug report).
+ - POSIX::EAGAIN() was added to Fork() (bug report).
+
+0.03 Thu Jun 19 2003
+ - Licensing is more explicit: Either GPL or Artistic.
+ - Updated author contact information.
+
+0.02 Sat Apr 17 1999
+ - init() function superceded by Init() function.
+ - All open files are closed during daemonization.
+ - A double fork is now down to avoid the potential of acquiring
+ a controlling terminal.
+ - Added Fork() and OpenMax() functions.
+
+0.01 Thu Jan 27 1998
+ - initial bundled release.
Modified: trunk/libproc-daemon-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-daemon-perl/MANIFEST?rev=69064&op=diff
==============================================================================
--- trunk/libproc-daemon-perl/MANIFEST (original)
+++ trunk/libproc-daemon-perl/MANIFEST Sat Feb 19 07:32:35 2011
@@ -1,9 +1,9 @@
-Changes
-MANIFEST
-Makefile.PL
-README
-lib/Proc/Daemon.pm
-lib/Proc/Daemon.pod
-t/01_loadmodule.t
-t/02_testmodule.t
-META.yml Module meta-data (added by MakeMaker)
+Changes
+MANIFEST
+Makefile.PL
+README
+lib/Proc/Daemon.pm
+lib/Proc/Daemon.pod
+t/01_loadmodule.t
+t/02_testmodule.t
+META.yml Module meta-data (added by MakeMaker)
Modified: trunk/libproc-daemon-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-daemon-perl/META.yml?rev=69064&op=diff
==============================================================================
--- trunk/libproc-daemon-perl/META.yml (original)
+++ trunk/libproc-daemon-perl/META.yml Sat Feb 19 07:32:35 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: Proc-Daemon
-version: 0.06
+version: 0.07
abstract: ~
license: perl
author:
Modified: trunk/libproc-daemon-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-daemon-perl/debian/changelog?rev=69064&op=diff
==============================================================================
--- trunk/libproc-daemon-perl/debian/changelog (original)
+++ trunk/libproc-daemon-perl/debian/changelog Sat Feb 19 07:32:35 2011
@@ -1,3 +1,13 @@
+libproc-daemon-perl (0.07-1) UNRELEASED; urgency=low
+
+ * New upstream release
+ * Add myself to Uploaders.
+ * Fix changelog entry for versions 0.05-1, merge the unreleased
+ version 0.03-2.0.
+ * debian/copyright: Refresh debian/* packaging stanza.
+
+ -- Salvatore Bonaccorso <carnil at debian.org> Sat, 19 Feb 2011 08:32:14 +0100
+
libproc-daemon-perl (0.06-1) unstable; urgency=low
[ Nicholas Bamber ]
@@ -17,20 +27,17 @@
libproc-daemon-perl (0.05-1) unstable; urgency=low
+ [ Krzysztof Krzyżaniak (eloy) ]
* New upstream release
* Added me to Uploaders & debian/copyright
- -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Fri, 26 Nov 2010 12:57:31 +0100
-
-libproc-daemon-perl (0.03-2.0) UNRELEASED; urgency=low
-
- * NOT YET RELEASED, don't upload before squeeze release
+ [ Marc Haber ]
* adapt debian/control to perl group policy
* add debian/watch
* dh-make-perl refresh
* Standards-Version: 3.9.1.0 (no changes necessary)
- -- Marc Haber <mh+debian-packages at zugschlus.de> Tue, 28 Sep 2010 15:22:15 +0200
+ -- Krzysztof Krzyżaniak (eloy) <eloy at debian.org> Fri, 26 Nov 2010 12:57:31 +0100
libproc-daemon-perl (0.03-2) unstable; urgency=low
Modified: trunk/libproc-daemon-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-daemon-perl/debian/control?rev=69064&op=diff
==============================================================================
--- trunk/libproc-daemon-perl/debian/control (original)
+++ trunk/libproc-daemon-perl/debian/control Sat Feb 19 07:32:35 2011
@@ -6,7 +6,8 @@
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Marc Haber <mh+debian-packages at zugschlus.de>,
Krzysztof Krzyżaniak (eloy) <eloy at debian.org>,
- Nicholas Bamber <nicholas at periapt.co.uk>
+ Nicholas Bamber <nicholas at periapt.co.uk>,
+ Salvatore Bonaccorso <carnil at debian.org>
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libproc-daemon-perl
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libproc-daemon-perl/
Homepage: http://search.cpan.org/~ehood/Proc-Daemon/
Modified: trunk/libproc-daemon-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-daemon-perl/debian/copyright?rev=69064&op=diff
==============================================================================
--- trunk/libproc-daemon-perl/debian/copyright (original)
+++ trunk/libproc-daemon-perl/debian/copyright Sat Feb 19 07:32:35 2011
@@ -14,6 +14,7 @@
2003, 2010, Marc Haber <mh+debian-packages at zugschlus.de>
2010, Krzysztof Krzyżaniak (eloy) <eloy at debian.org>
2011, Nicholas Bamber <nicholas at periapt.co.uk>
+ 2011, Salvatore Bonaccorso <carnil at debian.org>
License: Artistic or GPL-1+
License: Artistic
Modified: trunk/libproc-daemon-perl/lib/Proc/Daemon.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-daemon-perl/lib/Proc/Daemon.pm?rev=69064&op=diff
==============================================================================
--- trunk/libproc-daemon-perl/lib/Proc/Daemon.pm (original)
+++ trunk/libproc-daemon-perl/lib/Proc/Daemon.pm Sat Feb 19 07:32:35 2011
@@ -21,7 +21,7 @@
use strict;
use POSIX();
-$Proc::Daemon::VERSION = '0.06';
+$Proc::Daemon::VERSION = '0.07';
################################################################################
@@ -114,7 +114,7 @@
# Set the new working directory.
- chdir $self->{work_dir} or die "Can't <chdir> to $self->{work_dir}: $!";
+ die "Can't <chdir> to $self->{work_dir}: $!" unless chdir $self->{work_dir};
# Clear the file creation mask.
umask 0;
@@ -194,8 +194,8 @@
if ( $exec_command ) {
exec $exec_command;
exit; # Not a real exit, but needed since Perl warns you if
- # there is no statement like 'die', 'warn', or 'exit'
- # following 'exec'. The 'exec' function executes a system
+ # there is no statement like <die>, <warn>, or <exit>
+ # following <exec>. The <exec> function executes a system
# command and never returns.
}
@@ -406,11 +406,12 @@
################################################################################
# Kill the (daemon) process:
-# Kill_Daemon( [ number or string ] )
+# Kill_Daemon( [ number or string [, SIGNAL ] ] )
#
# Examples:
# $object->Kill_Daemon() - Tries to get the PID out of the settings in new() and kill it.
-# $object->Kill_Daemon( 12345 ) - Number of PID to kill.
+# $object->Kill_Daemon( 12345, 'TERM' ) - Number of PID to kill with signal 'TERM'. The
+# names or numbers of the signals are the ones listed out by kill -l on your system.
# $object->Kill_Daemon( './pid.txt' ) - Path to file containing one PID to kill.
# $object->Kill_Daemon( 'perl /home/my_perl_daemon.pl' ) - Command line entry of the
# running program to kill. Requires Proc::ProcessTable to work.
@@ -420,7 +421,8 @@
################################################################################
sub Kill_Daemon {
my Proc::Daemon $self = shift;
- my $pid = shift;
+ my $pid = shift;
+ my $signal = shift || 'KILL';
my $pidfile;
# Get the process ID.
@@ -430,7 +432,7 @@
return 0 if ! $pid;
# Kill the process.
- my $killed = kill( 9, $pid );
+ my $killed = kill( $signal, $pid );
if ( $killed && $pidfile ) {
# Set PID in pid file to '0'.
Modified: trunk/libproc-daemon-perl/lib/Proc/Daemon.pod
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-daemon-perl/lib/Proc/Daemon.pod?rev=69064&op=diff
==============================================================================
--- trunk/libproc-daemon-perl/lib/Proc/Daemon.pod (original)
+++ trunk/libproc-daemon-perl/lib/Proc/Daemon.pod Sat Feb 19 07:32:35 2011
@@ -272,13 +272,15 @@
=back
-=item Kill_Daemon( [ $ARG ] )
+=item Kill_Daemon( [ $ARG [, SIGNAL] ] )
This function kills the Daemon process. Returns the number of processes
successfully killed (which mostly is not the same as the PID number), or 0 if
the process wasn't found.
-$ARG is the same as of C<Status()>.
+$ARG is the same as of C<Status()>. SIGNAL is an optional signal name or number
+as required by Perls C<kill> function and listed out by C<kill -l> on your
+system. Default value is 9 ('KILL' = non-catchable, non-ignorable kill).
=item Fork
Modified: trunk/libproc-daemon-perl/t/02_testmodule.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-daemon-perl/t/02_testmodule.t?rev=69064&op=diff
==============================================================================
--- trunk/libproc-daemon-perl/t/02_testmodule.t (original)
+++ trunk/libproc-daemon-perl/t/02_testmodule.t Sat Feb 19 07:32:35 2011
@@ -33,7 +33,7 @@
);
# create a daemon
-my $Kid_PID = $daemon->Init;
+my $Kid_PID = $daemon->init; # init instead of Init is a test for the old style too!
if ( ok( $Kid_PID, "child_1 was created with PID: " . ( defined $Kid_PID ? $Kid_PID : '<undef>' ) ) || defined $Kid_PID ) {
# here goes the child
More information about the Pkg-perl-cvs-commits
mailing list