[SCM] libmessage-passing-perl Debian packaging branch, master, updated. debian/0.111-3-14-g44f6e88

Tomas Doran bobtfish at bobtfish.net
Mon May 6 11:56:54 UTC 2013


The following commit has been merged in the master branch:
commit c867cadfea945113783097418d0bf8c10a5454b4
Author: Tomas Doran <bobtfish at bobtfish.net>
Date:   Sun Apr 29 23:35:36 2012 +0100

    Change to write PID file after user switch

diff --git a/lib/Log/Stash.pm b/lib/Log/Stash.pm
index dee7e0a..3043d6c 100644
--- a/lib/Log/Stash.pm
+++ b/lib/Log/Stash.pm
@@ -51,13 +51,12 @@ has daemonize => (
 
 sub deamonize_if_needed {
     my ($self) = @_;
-    my $daemon = $self->daemonize;
     my $fh;
     if ($self->_has_pid_file) {
         open($fh, '>', $self->pid_file)
-            or confess("Could not open pid file '". $self->pid_file . "'");
+            or confess("Could not open pid file '". $self->pid_file . "': $?");
     }
-    if ($daemon) {
+    if ($self->daemonize) {
         fork && exit;
         POSIX::setsid();
         fork && exit;
@@ -98,8 +97,8 @@ foreach my $name (qw/ user pid_file /) {
 sub start {
     my $class = shift;
     my $instance = $class->new_with_options(@_);
-    $instance->deamonize_if_needed;
     $instance->change_uid_if_needed;
+    $instance->deamonize_if_needed;
     run_log_server $instance->build_chain;
 }
 

-- 
libmessage-passing-perl Debian packaging



More information about the Pkg-perl-cvs-commits mailing list