From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25983 invoked from network); 11 Jul 2001 08:35:50 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Jul 2001 08:35:50 -0000 Received: (qmail 22235 invoked by alias); 11 Jul 2001 08:35:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15372 Received: (qmail 22224 invoked from network); 11 Jul 2001 08:35:42 -0000 From: Sven Wischnowsky Date: Wed, 11 Jul 2001 10:33:17 +0200 (MET DST) Message-Id: <200107110833.KAA17304@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: Re: fatal flaw zsh 4.0.1 on irix 6.3 & 6.5: suspend "ls -l|less" then resume hangs In-Reply-To: <010710162700.ZM30017@candle.brasslantern.com> Bart Schaefer wrote: > On Jul 10, 5:26pm, Timothy Miller wrote: > > > > Ok: zsh-3_1_6-pws-2 works; zsh-3_1_6-pws-3 fails. > > One of these must be the culprit, then: > > * Sven: 7605: Src/exec.c, Src/jobs.c: use killpg instead of > altering process group when leader exits, fix fg test to use > killpg. > > * Sven: 7573: Src/signals.c, Src/exec.c, Src/utils.c: fix return > value of killjb(); pipelines which lose their leader get a new > one. > > Can you send us some output of `ps' that shows the process groups of the > processes involved, from both -pws-2 and anything after that? You may also try the patch below (each hunk separately or both together). If this turns out to be the problem, then Irix seems to behave differently from other Unices w.r.t. calling kill() on a process group with `signal' 0. Urgh. Bye Sven --- Src/exec.c.old Wed Jul 11 10:27:51 2001 +++ Src/exec.c Wed Jul 11 10:28:19 2001 @@ -2512,7 +2512,7 @@ } else if (thisjob != -1 && cl) { if (jobtab[list_pipe_job].gleader && (list_pipe || list_pipe_child)) { if (setpgrp(0L, jobtab[list_pipe_job].gleader) == -1 || - killpg(jobtab[list_pipe_job].gleader, 0) == -1) { + kill(jobtab[list_pipe_job].gleader, 0) == -1) { jobtab[list_pipe_job].gleader = jobtab[thisjob].gleader = (list_pipe_child ? mypgrp : getpid()); setpgrp(0L, jobtab[list_pipe_job].gleader); --- Src/utils.c.old Wed Jul 11 10:33:09 2001 +++ Src/utils.c Wed Jul 11 10:33:16 2001 @@ -2404,7 +2404,7 @@ # endif #endif { - if (pgrp != mypgrp && kill(-pgrp, 0) == -1) + if (pgrp != mypgrp && kill(pgrp, 0) == -1) attachtty(mypgrp); else { if (errno != ENOTTY) -- Sven Wischnowsky wischnow@informatik.hu-berlin.de