From 8d49a26b2bf9c150d23526da0999d8d4fa38a4f7 Mon Sep 17 00:00:00 2001 From: Siteshwar Vashisht Date: Fri, 28 Jul 2017 15:51:07 +0200 Subject: [PATCH] Make read builtin interruptible if input contains zeros --- builtins/read.def | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/builtins/read.def b/builtins/read.def index 33821f3..de23ab0 100644 --- a/builtins/read.def +++ b/builtins/read.def @@ -609,7 +609,7 @@ read_builtin (list) break; } - CHECK_ALRM; + check_signals(); #if defined (READLINE) } @@ -662,7 +662,10 @@ read_builtin (list) break; if (c == '\0' && delim != '\0') - continue; /* skip NUL bytes in input */ + { + internal_warning ("read_builtin: ignored null byte in input"); + continue; /* skip NUL bytes in input */ + } if ((skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL)) { -- 2.9.4