From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24099 invoked by alias); 23 Oct 2013 19:50:28 -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: 31876 Received: (qmail 4451 invoked from network); 23 Oct 2013 19:50:24 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Y49IykRYoe2CmXmSYZpZNhQZC2Ra0yjkBg0x0W14Urg=; b=Jq1RsRK3UtwMOfBpNZFxEd+4nNX+HpSgZPBQkapKqeuwbCncOkR8Vxrh6li6LpfwgX nImpstCsmUi7RAmizVmgb92xDgxVL+WaP2u0a7O4Ppj4CiSuo56Y8+xoPDKgDIMT4vfg vX4SgDAML8/V6N6nAf1abXhWHps1vGudX+KvAbIn8hWj2zPdsvpUtn90PrbH2Tv9aWMh ta1hEDwarYSr25Tx5qxTS95zjQEr9xoAsYQgw/p95FCPv1YnvcW1E+LF1Kqbm1WPrT9y fPwhA1A+rO64eIIqBX9y846u2eOuJebSZDmr7MXTFLxuMur8/HzKDJ9THcWWRZ9TRfEf xOBg== X-Received: by 10.220.16.73 with SMTP id n9mr2406699vca.24.1382557821967; Wed, 23 Oct 2013 12:50:21 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20131023092155.5ba8a54b@pwslap01u.europe.root.pri> References: <20131023092155.5ba8a54b@pwslap01u.europe.root.pri> From: Ian F Date: Wed, 23 Oct 2013 12:49:51 -0700 Message-ID: Subject: Re: Strange function/pipestatus behavior, maybe a scope bug? To: Peter Stephenson Cc: zsh-workers@zsh.org Content-Type: multipart/alternative; boundary=001a11c3bea0dc279304e96dd3be --001a11c3bea0dc279304e96dd3be Content-Type: text/plain; charset=ISO-8859-1 Peter, all, Thank you for taking the time to provide your research and experience on this issue. Absent any further material communication on the subject (more googling has not yielded anything of substance), I appear to have provided a test case that exhibits the error behavior 100% of the time. Based on the referenced thread and my further search results, this is a material development. After reading, AFAICT the main hurdle to identification of this bug has been related to its previously extremely low probability of occurrence in provided test cases. I have used my test case to verify 100% occurrence on another, very different hardware, kernel, and zsh (4.2.1 vs. 5.0.0) version, using precisely the same test case (different version of awk; forced to provide '-f -' in awkFunc). I suggest this to be a significant progression in identification of this bug, as well as indicating a greatly heightened severity, owing to the 100% incorrect handling of pipeline exit values in the provided, very simple test case (again, substantially different than previous reports I've been able to find). Sadly, my C fu is not up to par, otherwise I would delve into it myself. Please let me know if I can be of any further assistance. Best, %Ian On Wed, Oct 23, 2013 at 1:21 AM, Peter Stephenson wrote: > On Tue, 22 Oct 2013 11:03:07 -0700 > Ian F wrote: > > Potential bug case: > > > > awkFunc() { awk; } > > > > % false | true | false | true | awkFunc; echo $pipestatus > > 0 > > Yes, that's a bug owing to the way the shell executes internal shell > commands within the right hand side of a pipeline. There was a thread > on this starting at zsh-workers/29973: > > http://www.zsh.org/mla/workers/2011/msg01394.html > > pws > -- Ian F Big hitter, the Lama --001a11c3bea0dc279304e96dd3be--