zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
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)	[thread overview]
Message-ID: <200002071015.LAA32465@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Alexandre Duret-Lutz's message of 04 Feb 2000 17:11:07 +0100


[ 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


             reply	other threads:[~2000-02-07 12:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-07 10:15 Sven Wischnowsky [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-02-18  9:44 Sven Wischnowsky
2000-02-17  9:20 Sven Wischnowsky
2000-02-17 17:18 ` Bart Schaefer
2000-02-04 12:30 Sven Wischnowsky
2000-02-04 16:11 ` Alexandre Duret-Lutz
2000-02-03 18:45 Clint Olsen
2000-02-04  9:24 ` Alexandre Duret-Lutz
     [not found] ` <000203162102.ZM8092@candle.brasslantern.com>
2000-02-16 19:08   ` Clint Olsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200002071015.LAA32465@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).