From: Mischa POSLAWSKY Date: Thu, 12 Sep 2019 17:07:24 +0000 (+0200) Subject: prefer SIGINFO for statistics if available X-Git-Url: http://git.shiar.nl/barcat.git/commitdiff_plain/4d62c423066eadf66d680c42f24bcc917afc61d6?ds=sidebyside prefer SIGINFO for statistics if available --- diff --git a/barcat b/barcat index 650e406..de3f6f8 100755 --- a/barcat +++ b/barcat @@ -87,7 +87,7 @@ $opt{'value-length'} = 1 if $opt{unmodified}; my (@lines, @values, @order); -$SIG{QUIT} = \&show_stat; +$SIG{$_} = \&show_stat for exists $SIG{INFO} ? 'INFO' : 'QUIT'; $SIG{ALRM} = sub { show_lines(); alarm $opt{interval} if defined $opt{interval} and $opt{interval} > 0;