From 4b923ab2bc237314a2e3558bd16301811ebd1898 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Wed, 11 Sep 2019 16:55:40 +0200 Subject: [PATCH] only ignore interrupt signal after input Assume no input is an unpiped invocation a user tries to abort by ctrl-C. --- barcat | 1 + 1 file changed, 1 insertion(+) diff --git a/barcat b/barcat index 1b780e6..2f73fa5 100755 --- 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 }; -- 2.30.0