Your message dated Fri, 4 Nov 2005 15:15:04 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#332954: dash: "return" from a while condition loses exit 
status
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 9 Oct 2005 18:55:21 +0000
>From [EMAIL PROTECTED] Sun Oct 09 11:55:21 2005
Return-path: <[EMAIL PROTECTED]>
Received: from sp0137.sc1.cp.net (n064.sc1.cp.net) [64.97.136.137] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1EOgKP-0007TJ-00; Sun, 09 Oct 2005 11:55:21 -0700
Received: from sc (82.26.169.111) by n064.sc1.cp.net (7.0.038)
        id 434185B20011F2AB; Sun, 9 Oct 2005 18:55:20 +0000
Received: from chazelas by sc with local (Exim 3.36 #1 (Debian))
        id 1EOgKN-00083G-00; Sun, 09 Oct 2005 19:55:19 +0100
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
From: Stephane Chazelas <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: dash: "return" from a while condition loses exit status
X-Mailer: reportbug 3.17
Date: Sun, 09 Oct 2005 19:55:19 +0100
Message-Id: <[EMAIL PROTECTED]>
Sender: Stephane Chazelas <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

Package: dash
Version: 0.5.2-7
Severity: normal


f() {
  while return 2; do :; done
}

f
echo "$?"

The above script outputs "0" while it should output "2".

Same goes for:

dash -c 'while return 2; do :; done'

Same with "until" instead of "while"


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12
Locale: LANG=C, LC_CTYPE=en_US.ISO-8859-15 (charmap=ISO-8859-15)

Versions of packages dash depends on:
ii  libc6                         2.3.5-6    GNU C Library: Shared libraries an

dash recommends no packages.

-- debconf information:
  dash/sh: false

---------------------------------------
Received: (at 332954-done) by bugs.debian.org; 4 Nov 2005 15:09:24 +0000
>From [EMAIL PROTECTED] Fri Nov 04 07:09:24 2005
Return-path: <[EMAIL PROTECTED]>
Received: from a.mx.smarden.org [212.21.76.77] 
        by spohr.debian.org with smtp (Exim 3.36 1 (Debian))
        id 1EY3Bz-00010S-00; Fri, 04 Nov 2005 07:09:23 -0800
Received: (qmail 15903 invoked by uid 1000); 4 Nov 2005 15:09:43 -0000
Message-ID: <[EMAIL PROTECTED]>
Date: Fri, 4 Nov 2005 15:15:04 +0000
From: Gerrit Pape <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Bug#332954: dash: "return" from a while condition loses exit status
Reply-To: [EMAIL PROTECTED]
References: <[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02

On Mon, Oct 10, 2005 at 12:50:55PM +0000, Gerrit Pape wrote:
> On Sun, Oct 09, 2005 at 07:55:19PM +0100, Stephane Chazelas wrote:
> > f() {
> >   while return 2; do :; done
> > }
> > 
> > f
> > echo "$?"
> > 
> > The above script outputs "0" while it should output "2".
> > 
> > Same goes for:
> > 
> > dash -c 'while return 2; do :; done'
> > 
> > Same with "until" instead of "while"
> 
> Hi Stephane, I think the return code 0 is just fine, please see
> 
>  
> http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_04_09
>  
> http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_09_04_10
> 
> I'm about to close this bug.

Ok, closing it.

Thanks, Gerrit.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to