git.shiar.nl
/
barcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a66dc84
)
respond to alarm signal regardless of interval
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 11 Sep 2019 14:42:25 +0000
(16:42 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 12 Sep 2019 15:48:11 +0000
(17:48 +0200)
barcat
patch
|
blob
|
history
diff --git
a/barcat
b/barcat
index 1818493a8af4603898a2e4b7f1265c6bcfda948d..b051353ecf2d228ffaeade4e1ab19021cfc569b4 100755
(executable)
--- a/
barcat
+++ b/
barcat
@@
-83,12
+83,13
@@
$opt{'value-length'} = 1 if $opt{unmodified};
my (@lines, @values, @order);
my (@lines, @values, @order);
+$SIG{ALRM} = sub {
+ show_lines();
+ alarm $opt{interval} if defined $opt{interval};
+};
+
if (defined $opt{interval}) {
$opt{interval} ||= 1;
if (defined $opt{interval}) {
$opt{interval} ||= 1;
- $SIG{ALRM} = sub {
- show_lines();
- alarm $opt{interval};
- };
alarm $opt{interval};
eval {
alarm $opt{interval};
eval {
@@
-286,6
+287,7
@@
Short integers are aligned but kept without decimal point.
=item -t, --interval[=<seconds>]
Interval time to output partial progress.
=item -t, --interval[=<seconds>]
Interval time to output partial progress.
+An update can also be forced by sending a I<SIGALRM> alarm signal.
=item -l, --length=[-]<size>[%]
=item -l, --length=[-]<size>[%]