From b9f3866e7cae963d7bf5a3a52a5e686765c27924 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 7 Feb 2000 12:55:25 +0000 Subject: zsh-workers/9600 --- Src/exec.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Src') diff --git a/Src/exec.c b/Src/exec.c index e021a4581..632a99865 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1111,7 +1111,10 @@ execpline2(Estate state, wordcode pcode, 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'; } @@ -1141,7 +1144,7 @@ execpline2(Estate state, wordcode pcode, } 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); -- cgit 1.4.1