]> granicus.if.org Git - pgbadger/commitdiff
Fix an other case where pgbadger.pid was not removed.
authorDarold Gilles <gilles@darold.net>
Fri, 15 Jan 2016 21:38:16 +0000 (22:38 +0100)
committerDarold Gilles <gilles@darold.net>
Fri, 15 Jan 2016 21:38:16 +0000 (22:38 +0100)
pgbadger

index a2173e103ff26440d86d4c6081fa59672203f4ea..3f0d9cff761c9a6a5ab1b02a8ca4a033568455a6 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -1421,7 +1421,10 @@ if ($last_parsed && $last_line{datetime} && $last_line{orig}) {
        }
 }
 
-exit 2 if ($terminate);
+if ($terminate) {
+       unlink("$PID_DIR/pgbadger.pid");
+       exit 2;
+}
 
 my $t1 = Benchmark->new;
 my $td = timediff($t1, $t0);