From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20638 invoked by alias); 20 Jan 2015 11:43:11 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19757 Received: (qmail 861 invoked from network); 20 Jan 2015 11:43:09 -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 Date: Tue, 20 Jan 2015 12:43:07 +0100 From: Roman Neuhauser To: Peter Stephenson Cc: ;, Zsh Users Subject: Re: warning about closing an already closed file descriptor Message-ID: <20150120114307.GJ979@isis.sigpipe.cz> References: <1469711.vAe1BPIYVt@kdudka.brq.redhat.com> <20150119145935.5eee77ee@pwslap01u.europe.root.pri> <20150119172850.1bffc197@pwslap01u.europe.root.pri> <20150120110203.GI979@isis.sigpipe.cz> <20150120113943.27f2d110@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150120113943.27f2d110@pwslap01u.europe.root.pri> User-Agent: Mutt/1.5.23 (2014-03-12) # p.stephenson@samsung.com / 2015-01-20 11:39:43 +0000: > On Tue, 20 Jan 2015 12:02:03 +0100 > Roman Neuhauser wrote: > > > - ({ exec 3<&- } 2>/dev/null > > > - exec 3<&- > > > - read foo <&-) > > > + (exec {varid}<&0 > > > + exec {varid}<&- > > > + print About to close a second time >&2 > > > + read {varid}<&-) > > > > sorry if i'm talking out of my ass, but does this mean that > > the non-{varid} syntax is now without a test? > > For closing fd's, yes. There's no output to test --- though there is a > status, so we could still test that. And I suppose the lack of an error > message is itself a test... yup, testing that stderr is actually quiet was my concern. thanks a lot! -- roman