diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-07 12:55:25 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-07 12:55:25 +0000 |
commit | b9f3866e7cae963d7bf5a3a52a5e686765c27924 (patch) | |
tree | 3b46c502b3bd22150318fc6c3d000acc0fccb288 | |
parent | f96516c2d27491cfb9ea45209fae062395bb0585 (diff) | |
download | zsh-b9f3866e7cae963d7bf5a3a52a5e686765c27924.tar.gz zsh-b9f3866e7cae963d7bf5a3a52a5e686765c27924.tar.xz zsh-b9f3866e7cae963d7bf5a3a52a5e686765c27924.zip |
zsh-workers/9600
-rw-r--r-- | Src/exec.c | 7 |
1 files changed, 5 insertions, 2 deletions
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); |