From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14782 invoked from network); 7 Feb 2000 12:53:31 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Feb 2000 12:53:31 -0000 Received: (qmail 6123 invoked by alias); 7 Feb 2000 12:53:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9600 Received: (qmail 6115 invoked from network); 7 Feb 2000 12:53:24 -0000 Date: Mon, 7 Feb 2000 11:15:16 +0100 (MET) Message-Id: <200002071015.LAA32465@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Alexandre Duret-Lutz's message of 04 Feb 2000 17:11:07 +0100 Subject: Re: Zsh 3.1.6 still hangs on for loops utilizing lots of stdout [ No idea about the main problem yet, but... ] Alexandre Duret-Lutz wrote: > ... > /goinfre/swiss-2 % for i in *.wav Err 139 #6 > do > 8hz-mp3 $i $i:r.mp3 > done | od > > [...lot's of output...] > > zsh: exit 141 for i in *.wav; do; 8hz-mp3 $i $i:r.mp3; done | od | > zsh: segmentation fault od > > How fun! now, that's od which is segfaulting. BTW where does this last pipe > (after `od' on the exit report line) come from?. At least this can be fixed. Thinko in execpline2(). Bye Sven diff -ru ../z.old/Src/exec.c Src/exec.c --- ../z.old/Src/exec.c Fri Feb 4 16:07:26 2000 +++ Src/exec.c Mon Feb 7 11:11:29 2000 @@ -1112,7 +1112,10 @@ if (pline_level == 1) { if ((how & Z_ASYNC) || (!sfcontext && !sourcelevel)) - strcpy(list_pipe_text, getjobtext(state->prog, state->pc - 1)); + strcpy(list_pipe_text, + getjobtext(state->prog, + state->pc + (WC_PIPE_TYPE(pcode) == WC_PIPE_END ? + 0 : 1))); else list_pipe_text[0] = '\0'; } @@ -1142,7 +1145,7 @@ } else if (pid) { char dummy, *text; - text = getjobtext(state->prog, state->pc - 2); + text = getjobtext(state->prog, state->pc); addproc(pid, text); close(synch[1]); read(synch[0], &dummy, 1); -- Sven Wischnowsky wischnow@informatik.hu-berlin.de