]> granicus.if.org Git - pgbadger/commitdiff
Do not return SUCCESS error code 0 when aborted or something fails
authorBruno Almeida <brunomgalmeida@gmail.com>
Wed, 8 Oct 2014 11:11:58 +0000 (11:11 +0000)
committerBruno Almeida <brunomgalmeida@gmail.com>
Wed, 8 Oct 2014 11:11:58 +0000 (11:11 +0000)
pgbadger

index 965bbaa510ba0fa5b19f173a9337a9ad664bad73..937bf529eb9b1f72952f6aff790d7d7d615a7365 100755 (executable)
--- a/pgbadger
+++ b/pgbadger
@@ -1256,7 +1256,7 @@ if ($last_parsed && $last_line{datetime} && $last_line{orig}) {
        }
 }
 
-exit 0 if ($terminate);
+exit 2 if ($terminate);
 
 my $t1 = Benchmark->new;
 my $td = timediff($t1, $t0);
@@ -1843,7 +1843,7 @@ sub multiprocess_progressbar
        # Terminate the process when we haven't read the complete file but must exit
        local $SIG{USR1} = sub {
                print STDERR "\n";
-               exit 0;
+               exit 1;
        };
        my $timeout  = 3;
        my $cursize  = 0;