diff options
-rw-r--r-- | Doc/Zsh/redirect.yo | 12 | ||||
-rw-r--r-- | Src/exec.c | 4 | ||||
-rw-r--r-- | Src/lex.c | 1 |
3 files changed, 11 insertions, 6 deletions
diff --git a/Doc/Zsh/redirect.yo b/Doc/Zsh/redirect.yo index 3f30b75a1..e8fccb36d 100644 --- a/Doc/Zsh/redirect.yo +++ b/Doc/Zsh/redirect.yo @@ -77,10 +77,10 @@ item(tt(<<<) var(word))( Perform shell expansion on var(word) and pass the result to standard input. This is known as a em(here-string). ) -xitem(tt(<&) var(digit)) -item(tt(>&) var(digit))( +xitem(tt(<&) var(number)) +item(tt(>&) var(number))( The standard input/output is duplicated from file descriptor -var(digit) (see manref(dup)(2)). +var(number) (see manref(dup2)(2)). ) xitem(tt(<& -)) item(tt(>& -))( @@ -90,8 +90,10 @@ xitem(tt(<& p)) item(tt(>& p))( The input/output from/to the coprocess is moved to the standard input/output. ) -item(tt(>&) var(word))( -Same as `tt(>) var(word) tt(2>&1)'. +xitem(tt(>&) var(word)) +item(tt(&>) var(word))( +Same as `tt(>) var(word) tt(2>&1)'. Note that with tt(&>), var(word) is +never interpreted as a file descriptor, even if it is a number. ) item(tt(>>&) var(word))( Same as `tt(>>) var(word) tt(2>&1)'. diff --git a/Src/exec.c b/Src/exec.c index ed77497d3..0670148c7 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -877,8 +877,10 @@ execpline(Sublist l, int how, int last1) if (how & Z_ASYNC) { lastwj = newjob; jobtab[thisjob].stat |= STAT_NOSTTY; - if (l->flags & PFLAG_COPROC) + if (l->flags & PFLAG_COPROC) { zclose(ipipe[1]); + zclose(opipe[0]); + } if (how & Z_DISOWN) { deletejob(jobtab + thisjob); thisjob = -1; diff --git a/Src/lex.c b/Src/lex.c index 069f9b39b..d88e57c22 100644 --- a/Src/lex.c +++ b/Src/lex.c @@ -642,6 +642,7 @@ gettok(void) } hungetc(d); lexstop = 0; + tokfd = -1; return AMPOUTANG; } hungetc(d); |