From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26986 invoked from network); 1 Feb 2000 10:58:34 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Feb 2000 10:58:34 -0000 Received: (qmail 20104 invoked by alias); 1 Feb 2000 10:58:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9503 Received: (qmail 20097 invoked from network); 1 Feb 2000 10:58:29 -0000 Date: Tue, 1 Feb 2000 11:58:27 +0100 (MET) Message-Id: <200002011058.LAA07413@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Mon, 31 Jan 2000 13:53:36 +0100 (MET) Subject: Re: PATCH: job-control I wrote: > But removing those two child_* and > adding: > > if (list_pipe_job && jobtab[list_pipe_job].procs && > !(jobtab[list_pipe_job].stat & STAT_STOPPED)) > child_suspend(0); > > before the if (!list_pipe_child && ...) fixes the problem, too and is > almost certainly better. Can anyone see a problem with this? No, we would also need a child_block, then, so we can use child_unblock()/child_block() after this test. I haven't found an example where this fails... Bye Sven diff -ru ../z.old/Src/exec.c Src/exec.c --- ../z.old/Src/exec.c Tue Feb 1 11:33:24 2000 +++ Src/exec.c Tue Feb 1 11:34:43 2000 @@ -980,9 +980,12 @@ jn->stat |= STAT_NOPRINT; makerunning(jn); } - if (!(jn->stat & STAT_LOCKED)) { - child_unblock(); + if (!(jn->stat & STAT_LOCKED)) waitjobs(); + + if (list_pipe_job && jobtab[list_pipe_job].procs && + !(jobtab[list_pipe_job].stat & STAT_STOPPED)) { + child_unblock(); child_block(); } if (list_pipe_child && -- Sven Wischnowsky wischnow@informatik.hu-berlin.de