From 95b4d6a31f5255987db5f8005f557bb63aa3a2cb Mon Sep 17 00:00:00 2001 From: Paul Ackersviller Date: Sun, 18 Nov 2007 21:57:32 +0000 Subject: Merge of 23460/23461: fix longstanding problem with multios attached to a subshell process. --- Src/jobs.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Src/jobs.c') 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) -- cgit 1.4.1