about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2017-03-04 15:25:17 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2017-03-04 15:25:17 -0800
commit5e61eaf855dc4bc94c35e9e950fb2e1d7f88d5af (patch)
tree8e3121f2430565b2a00d7a48e616f1c29c6e680c /Src/exec.c
parentb8b5f18f3fcfe64e4b7596018d31410042f379f1 (diff)
downloadzsh-5e61eaf855dc4bc94c35e9e950fb2e1d7f88d5af.tar.gz
zsh-5e61eaf855dc4bc94c35e9e950fb2e1d7f88d5af.tar.xz
zsh-5e61eaf855dc4bc94c35e9e950fb2e1d7f88d5af.zip
40654: exit cleanly from special POSIXBUILTINS in subshells
This patch overloads the zsh_subshell counter which is meant for $ZSH_SUBSHELL, but no one has suggested a working alternate test.
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c1
1 files changed, 1 insertions, 0 deletions
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)) {