From: Bruno Almeida Date: Wed, 8 Oct 2014 11:11:58 +0000 (+0000) Subject: Do not return SUCCESS error code 0 when aborted or something fails X-Git-Tag: v6.3~38^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=470462da3121947e613e57eb5b883dae7383caaa;p=pgbadger Do not return SUCCESS error code 0 when aborted or something fails --- diff --git a/pgbadger b/pgbadger index 965bbaa..937bf52 100755 --- 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;