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:
8407b1f
)
only ignore interrupt signal after input
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 11 Sep 2019 14:55:40 +0000
(16:55 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 12 Sep 2019 15:48:11 +0000
(17:48 +0200)
Assume no input is an unpiped invocation a user tries to abort by ctrl-C.
barcat
patch
|
blob
|
history
diff --git
a/barcat
b/barcat
index 1b780e618d23620456c984ad6e61b36bd2438c78..2f73fa5ab2c59e3e8be6ce6b0b57fd235641587a 100755
(executable)
--- a/
barcat
+++ b/
barcat
@@
-100,6
+100,7
@@
if (defined $opt{interval}) {
$SIG{INT} = sub {
$SIG{INT} = 'DEFAULT'; # reset for subsequent attempts
+ exit if !$.;
'IGNORE' # continue after assumed eof
};