about summary refs log tree commit diff
path: root/Src/jobs.c
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-11-18 21:57:32 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-11-18 21:57:32 +0000
commit95b4d6a31f5255987db5f8005f557bb63aa3a2cb (patch)
treef3c2a3f0ec252949cb776c8795dbb0de0b60a01d /Src/jobs.c
parent083359cd89d28415a909402e7f69708bb3a32aaa (diff)
downloadzsh-95b4d6a31f5255987db5f8005f557bb63aa3a2cb.tar.gz
zsh-95b4d6a31f5255987db5f8005f557bb63aa3a2cb.tar.xz
zsh-95b4d6a31f5255987db5f8005f557bb63aa3a2cb.zip
Merge of 23460/23461: fix longstanding problem with multios attached to a subshell process.
Diffstat (limited to 'Src/jobs.c')
-rw-r--r--Src/jobs.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/Src/jobs.c b/Src/jobs.c
index 2da44a4e8..274980321 100644
--- a/Src/jobs.c
+++ b/Src/jobs.c
@@ -1255,6 +1255,15 @@ clearjobtab(int monitor)
 
     memset(jobtab, 0, jobtabsize * sizeof(struct job)); /* zero out table */
     maxjob = 0;
+
+    /*
+     * Although we don't have job control in subshells, we
+     * sometimes needs control structures for other purposes such
+     * as multios.  Grab a job for this purpose; any will do
+     * since we've freed them all up (so there's no question
+     * of problems with the job table size here).
+     */
+    thisjob = initjob();
 }
 
 static int initnewjob(int i)