From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7496 invoked from network); 25 Jun 1999 09:38:53 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Jun 1999 09:38:53 -0000 Received: (qmail 9465 invoked by alias); 25 Jun 1999 09:38:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6848 Received: (qmail 9458 invoked from network); 25 Jun 1999 09:38:33 -0000 Date: Fri, 25 Jun 1999 11:38:32 +0200 (MET DST) Message-Id: <199906250938.LAA02038@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: "Bart Schaefer"'s message of Fri, 25 Jun 1999 09:23:39 +0000 Subject: Re: 3.0.6-pre-5 problem Bart Schaefer wrote: > On Jun 25, 9:17am, Bart Schaefer wrote: > } Subject: Re: 3.0.6-pre-5 problem > } > } [...] I think zsh > } may have sent a STOP signal to the xterm that is its parent. > > Yup, I can confirm this: > > zagzig% Src/zsh -f > zagzig% echo $SHLVL > 4 > zagzig% Src/zsh -f > zagzig% echo $SHLVL > 5 > zagzig% mutt () { > function> command mutt "$@" > function> echotc rs > function> } > zagzig% mutt > zsh: suspended (signal) Src/zsh -f > zagzig% echo $SHLVL > 4 > > Zsh has just stopped its parent. Naughty zsh. Err, itself, right? That was a hint... (I still wonder why I can't reproduce it, though). I hope this fixes it. It's the only place where a parent shell sends a SIGSTOP and, yes, it's good to have that extra test there -- it means roughly that we don't need to suspend the beginning of a pipeline if there is no such beginning -- exactly what happens when suspending a function. Bye Sven --- os/exec.c Fri Jun 25 10:06:02 1999 +++ Src/exec.c Fri Jun 25 11:32:57 1999 @@ -966,7 +966,7 @@ close(synch[1]); read(synch[0], &dummy, 1); close(synch[0]); - /* If this job has finished, we turn this into a + /* If this job has finished, we leave it as a * normal (non-super-) job. */ if (!(jn->stat & STAT_DONE)) { jobtab[list_pipe_job].other = newjob; @@ -974,7 +974,7 @@ jn->stat |= STAT_SUBJOB | STAT_NOPRINT; jn->other = pid; } - if (list_pipe || last1) + if ((list_pipe || last1) && jobtab[list_pipe_job].procs) killpg(jobtab[list_pipe_job].gleader, SIGSTOP); break; } -- Sven Wischnowsky wischnow@informatik.hu-berlin.de