From a635fe75ffafbd544463f4ab569f77f5d3e49ed0 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Thu, 12 Sep 2019 19:07:24 +0200 Subject: [PATCH] prefer SIGINFO for statistics if available A far more appropriate signal for non-quitting interrupts, unfortunately only available on BSDs (bound to ctrl-T). Keep fallback to SIGQUIT as support on linux does not seem imminent :(http://lkml.iu.edu/hypermail/linux/kernel/1411.0/03374.html). --- barcat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.0