Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: test output pattern matching



On Fri, Dec 02, 2011 at 05:23:53PM +0000, Peter Stephenson wrote:
> On Fri, 2 Dec 2011 18:03:56 +0100
> <ports@xxxxxxxxxxxx> wrote:
> > ./A04redirect.ztst: starting.
> > *** /usr/ports/pobj/zsh-4.3.13/zsh-4.3.13/tmp.ztst.err.6420     Fri Dec  2 17:58:33 2011
> > --- /usr/ports/pobj/zsh-4.3.13/zsh-4.3.13/tmp.ztst.terr.6420    Fri Dec  2 17:58:33 2011
> > ***************
> > *** 1 ****
> > - (eval):1: failed to close file descriptor 3: bad file descriptor
> > --- 0 ----
> 
> That might mean file descriptor 3 is open, so closing it didn't
> fail.  What we could do is ensure it's closed, ignoring the status and
> error output, then try to close it again.
> 
> Index: Test/A04redirect.ztst
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Test/A04redirect.ztst,v
> retrieving revision 1.22
> diff -p -u -r1.22 A04redirect.ztst
> --- Test/A04redirect.ztst	1 Dec 2011 21:52:55 -0000	1.22
> +++ Test/A04redirect.ztst	2 Dec 2011 17:22:56 -0000
> @@ -152,10 +152,11 @@
>  >hello
>  >goodbye
>  
> -  (exec 3<&-
> +  ({ exec 3<&- } 2>/dev/null
> +  exec 3<&-
>    read foo <&-)
>  1:'<&-' redirection
> -*?\(eval\):1: failed to close file descriptor 3:*
> +*?\(eval\):*: failed to close file descriptor 3:*
>  
>    print foo >&-
>  0:'>&-' redirection
> 

Thanks. With this diff, i no longer have the error.
Regards,



Messages sorted by: Reverse Date, Date, Thread, Author