From 03af5fdbeed0930b5f1d3715ee1080fb993ed145 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 26 Sep 2017 09:26:57 +0100 Subject: 41761: Ensure status from interrupt is propagated by builtin --- Src/exec.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index bd242d140..161d4ac5e 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3999,8 +3999,15 @@ execcmd_exec(Estate state, Execcmd_params eparams, state->pc = opc; } dont_queue_signals(); - if (!errflag) - lastval = execbuiltin(args, assigns, (Builtin) hn); + if (!errflag) { + int ret = execbuiltin(args, assigns, (Builtin) hn); + /* + * In case of interruption assume builtin status + * is less useful than what interrupt set. + */ + if (!(errflag & ERRFLAG_INT)) + lastval = ret; + } if (do_save & BINF_COMMAND) errflag &= ~ERRFLAG_ERROR; restore_queue_signals(q); -- cgit 1.4.1