From 7d1877da4e6fabde8f0b5eb2f9a9f03d83e6c28d Mon Sep 17 00:00:00 2001
From: Peter Stephenson
Date: Sun, 27 Aug 2017 20:28:38 +0100
Subject: 41608 (plus tests): restore ERR_EXIT before function.
There was an exception to the usual ERR_EXIT pattern that causes
problems when executing a function in an else branch. It seems
the exception is no longer needed as the regression tests pass
without it.
---
Src/exec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'Src/exec.c')
diff --git a/Src/exec.c b/Src/exec.c
index cd99733f1..76a6bb1a4 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3025,7 +3025,7 @@ execcmd_exec(Estate state, Execcmd_params eparams,
preargs = NULL;
/* if we get this far, it is OK to pay attention to lastval again */
- if ((noerrexit & NOERREXIT_UNTIL_EXEC) && !is_shfunc)
+ if (noerrexit & NOERREXIT_UNTIL_EXEC)
noerrexit = 0;
/* Do prefork substitutions.
--
cgit 1.4.1