From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27893 invoked by alias); 19 Jul 2011 10:39:34 -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: 29562 Received: (qmail 20135 invoked from network); 19 Jul 2011 10:39:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Tue, 19 Jul 2011 10:52:23 +0100 From: Peter Stephenson To: Subject: Re: Zsh 4.3.12: subshell in midnight commander: precmd: 15: bad file descriptor Message-ID: <20110719105223.14e571c3@pwslap01u.europe.root.pri> In-Reply-To: <110718085234.ZM13898@torch.brasslantern.com> References: <20110718100718.56865117@pwslap01u.europe.root.pri> <110718074551.ZM13628@torch.brasslantern.com> <20110718162435.4c6598e8@pwslap01u.europe.root.pri> <110718085234.ZM13898@torch.brasslantern.com> Organization: Cambridge Silicon Radio X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.103.11.26] X-Scanned-By: MailControl A-12-00-01 (www.mailcontrol.com) on 10.68.0.112 On Mon, 18 Jul 2011 08:52:34 -0700 Bart Schaefer wrote: > I wonder if the underlying problem doesn't somehow stem from this: > > * 27721: Src/compat.c [with unnecessary test removed], Src/exec.c, > Src/system.h, Src/utils.c: update zopenmax() not to examine huge > numbers of file descriptors; only call it at initialisation; > rationalise use of fdtable_size and expansion of fdtable. I skipped over this yesterday, but are you suggesting we call zopenmax() with a larger limit when the user tries to manipulate an fd we don't know about? (Simply pushing the limit in zopenmax() up unconditionally doesn't look like a robust fix.) I'm not sure if we gain much with that: we still have to trap the points where we are passed a large enough fd, and until the shell wishes to do something with the intervening values it has no particular need to know about them. But there could easily be a subtlety I've missed. -- Peter Stephenson Software Engineer Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom More information can be found at www.csr.com. Follow CSR on Twitter at http://twitter.com/CSR_PLC and read our blog at www.csr.com/blog