From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28055 invoked from network); 9 Apr 2005 00:57:58 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 9 Apr 2005 00:57:58 -0000 Received: (qmail 35842 invoked from network); 9 Apr 2005 00:57:52 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Apr 2005 00:57:52 -0000 Received: (qmail 5317 invoked by alias); 9 Apr 2005 00:57:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21127 Received: (qmail 5306 invoked from network); 9 Apr 2005 00:57:48 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 9 Apr 2005 00:57:48 -0000 Received: (qmail 35552 invoked from network); 9 Apr 2005 00:57:48 -0000 Received: from loncoche.terra.com.br (200.154.55.229) by a.mx.sunsite.dk with SMTP; 9 Apr 2005 00:57:44 -0000 Received: from estero.terra.com.br (estero.terra.com.br [200.154.55.138]) by loncoche.terra.com.br (Postfix) with ESMTP id C7ED9E78470 for ; Fri, 8 Apr 2005 21:57:42 -0300 (BRT) X-Terra-Karma: -2% X-Terra-Hash: 11256eef636f3bb52a45d3d4bf2465e4 Received-SPF: pass (estero.terra.com.br: domain of terra.com.br designates 200.154.55.138 as permitted sender) client-ip=200.154.55.138; envelope-from=stdfk@terra.com.br; helo=alien.nyvra.org; Received: from alien.nyvra.org (dl-lns1-poa-C89AE13C.dialterra.com.br [200.154.225.60]) (authenticated user stdfk) by estero.terra.com.br (Postfix) with ESMTP id 1F27D72801A for ; Fri, 8 Apr 2005 21:57:41 -0300 (BRT) Date: Fri, 8 Apr 2005 21:50:09 -0300 (BRST) From: Felipe Kellermann To: zsh-workers@sunsite.dk Subject: Re: Parse errors don't cause a non-zero exit code? In-Reply-To: <200504011208.j31C86Qo018462@news01.csr.com> Message-ID: References: <20050329231719.GH51674@dan.emsphone.com> <200504011208.j31C86Qo018462@news01.csr.com> User-Agent: Pine MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-1.8 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -1.8 On Fri, 1 Apr 2005 1:08pm +0100, Peter Stephenson wrote: > builtin/function returns status X" is a perfectly natural way of saying > "returns the exit status X" given that the command doesn't actually exit > (in the UNIX sense). In other words, I don't think I want to play any > more. Hi Peter, About this issue, I have a long-term question about the exit status of zsh when it gets passed an script as argument: % zsh a a: can't open input file: a % print $? 1 % a zsh: command not found: a % print $? 127 % I am aware that the standard isn't very clear in this respect, but most shells explicitly interpret both cases the same way, returning 127 when the shell gets a command as an argument. $ ksh --version version sh (AT&T Labs Research) 1993-12-28 q $ ksh a ksh: line 1: a: not found $ echo $? 127 $ $ bash --version GNU bash, version 3.00.0(1)-release (i586-pc-linux-gnu) Copyright (C) 2004 Free Software Foundation, Inc. $ bash a bash: a: No such file or directory $ echo $? 127 $ I have recently talked with Michael Rendell about this issue on pdksh and he OK'ed the patch I sent to him, though he is not planning to make a new release of pdksh :-) -- Felipe Kellermann