Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Zsh 3.1.6 still hangs on for loops utilizing lots of stdout
- X-seq: zsh-workers 9600
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Zsh 3.1.6 still hangs on for loops utilizing lots of stdout
- Date: Mon, 7 Feb 2000 11:15:16 +0100 (MET)
- In-reply-to: Alexandre Duret-Lutz's message of 04 Feb 2000 17:11:07 +0100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
[ 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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author