summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/exec.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index df23602c0..ecbae823e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-03-04  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 40654: Src/exec.c: exit cleanly from special POSIXBUILTINS in
+	subshells
+
 2017-03-04  Oliver Kiddle  <opk@zsh.org>
 
 	* unposted (github): Christoffer Aasted:
diff --git a/Src/exec.c b/Src/exec.c
index 83d1513d0..6af4ddbf3 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3996,6 +3996,7 @@ execcmd_exec(Estate state, Execcmd_params eparams,
 	 * classify as a builtin) we treat all errors as fatal.
 	 * The "command" builtin is not special so resets this behaviour.
 	 */
+	forked |= zsh_subshell;
     fatal:
 	if (redir_err || errflag) {
 	    if (!isset(INTERACTIVE)) {