From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23723 invoked by alias); 3 Dec 2011 19:17:20 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29936 Received: (qmail 9376 invoked from network); 3 Dec 2011 19:17:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at raveland.org designates 195.200.166.230 as permitted sender) Date: Sat, 3 Dec 2011 20:17:10 +0100 From: ports@raveland.org To: Peter Stephenson Cc: Zsh workers Subject: Re: PATCH: test output pattern matching Message-ID: <20111203191709.GA1294@coredump.raveland.priv> References: <15488.1322689558@pws-pc.ntlworld.com> <14298.1322742430@thecus.kiddle.eu> <20111201125247.0abdc564@pwslap01u.europe.root.pri> <20111201212742.365c9e13@pws-pc.ntlworld.com> <20111202170356.GA6110@coredump.raveland.priv> <20111202172353.5edfcf04@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20111202172353.5edfcf04@pwslap01u.europe.root.pri> X-Operating-System: OpenBSD 5.0 amd64 User-Agent: Mutt/1.5.21 (2010-09-15) On Fri, Dec 02, 2011 at 05:23:53PM +0000, Peter Stephenson wrote: > On Fri, 2 Dec 2011 18:03:56 +0100 > 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,