about summary refs log tree commit diff
path: root/Src/exec.c
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-08-31 09:07:45 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-08-31 09:07:45 +0000
commit40e70b0419dc570770fb005f1c5c087f24d90182 (patch)
treef902a4551f92d65f645a451fb9ed72536fb4d303 /Src/exec.c
parentcf9c7884f1733c5604db38d135622b203d6c98fe (diff)
downloadzsh-40e70b0419dc570770fb005f1c5c087f24d90182.tar.gz
zsh-40e70b0419dc570770fb005f1c5c087f24d90182.tar.xz
zsh-40e70b0419dc570770fb005f1c5c087f24d90182.zip
23812: fix core dump on ( command & ) from 23460
Diffstat (limited to 'Src/exec.c')
-rw-r--r--Src/exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c
index 2ab5fb164..6d45f7452 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -2910,7 +2910,8 @@ execcmd(Estate state, int input, int output, int how, int last1)
 	    if (fdtable[i] != FDT_UNUSED)
 		close(i);
 	closem(FDT_UNUSED);
-	waitjobs();
+	if (thisjob != -1)
+	    waitjobs();
 	_exit(lastval);
     }
     fixfds(save);