From 7a0718796a56be64b5498806b4d8491ef2f9bb7d Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Wed, 27 Sep 2017 20:34:11 -0700 Subject: 41767: preserve nonzero exit status on interrupt --- Src/exec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src') diff --git a/Src/exec.c b/Src/exec.c index 161d4ac5e..0d2dc4ebb 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3199,7 +3199,8 @@ execcmd_exec(Estate state, Execcmd_params eparams, } if (errflag) { - lastval = 1; + if (!lastval) + lastval = 1; if (oautocont >= 0) opts[AUTOCONTINUE] = oautocont; return; -- cgit 1.4.1