Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion on brace + 4 characters doesn't work
On Mon, 2 May 2011 10:34:43 +0200
Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> This is the only error. It can simply be reproduced by:
>
> myfd=99
> (echo >&$myfd) 2>msg
>
> after zsh -f.
Thanks, this fixes that problem.
Index: Src/exec.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.192
diff -p -u -r1.192 exec.c
--- Src/exec.c 6 Mar 2011 21:37:38 -0000 1.192
+++ Src/exec.c 2 May 2011 11:53:33 -0000
@@ -3008,10 +3008,11 @@ execcmd(Estate state, int input, int out
if (!checkclobberparam(fn))
fil = -1;
else if (fn->fd2 > 9 &&
- ((fdtable[fn->fd2] != FDT_UNUSED &&
- fdtable[fn->fd2] != FDT_EXTERNAL) ||
- fn->fd2 == coprocin ||
- fn->fd2 == coprocout)) {
+ (fn->fd2 > max_zsh_fd ||
+ (fdtable[fn->fd2] != FDT_UNUSED &&
+ fdtable[fn->fd2] != FDT_EXTERNAL) ||
+ fn->fd2 == coprocin ||
+ fn->fd2 == coprocout)) {
fil = -1;
errno = EBADF;
} else {
--
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author