From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3017 invoked by alias); 16 Jan 2012 15:32:12 -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: 30112 Received: (qmail 9868 invoked from network); 16 Jan 2012 15:32: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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at csr.com does not designate permitted sender hosts) Date: Mon, 16 Jan 2012 14:49:29 +0000 From: Peter Stephenson To: Subject: Re: PATCH: Fix segfaults with exec options Message-ID: <20120116144929.787e6366@pwslap01u.europe.root.pri> In-Reply-To: <87ty3v92gw.fsf@ft.bewatermyfriend.org> References: <87ty3v92gw.fsf@ft.bewatermyfriend.org> 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.101.10.170] X-Scanned-By: MailControl 7.6.5 (www.mailcontrol.com) on 10.71.0.126 On Mon, 16 Jan 2012 14:55:11 +0100 Frank Terbeck wrote: > Maybe he (or someone else) has an idea about how to fix this at a more > fundamental level. To me, my fix just plugs some holes with duct tape. Looks OK to me. There isn't a more fundamental level --- it needs an argument and you're intercepting the point where it finds out it doesn't have one. This is different from most "real" builtins, which have a handler that parses options and counts arguments. As exec is special that's done at this point; there's no higher level parsing involved. -- 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