fix clean pid handling on clean exit
authordpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Fri, 19 Aug 2005 15:28:59 +0000 (15:28 +0000)
committerdpavlin <dpavlin@8392b6e1-25fa-0310-8288-cc32f8e212ea>
Fri, 19 Aug 2005 15:28:59 +0000 (15:28 +0000)
git-svn-id: svn+ssh://llin/home/dpavlin/private/svn/BackupPC/trunk@39 8392b6e1-25fa-0310-8288-cc32f8e212ea

bin/BackupPC_updatedb

index a310303..989d086 100755 (executable)
@@ -22,9 +22,9 @@ if (my $pid = $pidfile->running ) {
 } elsif ($pidfile->pid ne $$) {
        $pidfile->remove;
        $pidfile = new File::Pid;
-       $pidfile->write;
-       print STDERR "$0 using pid ",$pidfile->pid," file ",$pidfile->file,"\n";
 }
+$pidfile->write;
+print STDERR "$0 using pid ",$pidfile->pid," file ",$pidfile->file,"\n";
 
 my $t_fmt = '%Y-%m-%d %H:%M:%S';