From 470462da3121947e613e57eb5b883dae7383caaa Mon Sep 17 00:00:00 2001 From: Bruno Almeida Date: Wed, 8 Oct 2014 11:11:58 +0000 Subject: [PATCH] Do not return SUCCESS error code 0 when aborted or something fails --- pgbadger | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.40.0