[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash-4.0 regression: negative return values
From: |
Mike Frysinger |
Subject: |
Re: bash-4.0 regression: negative return values |
Date: |
Mon, 23 Feb 2009 09:54:33 -0500 |
User-agent: |
KMail/1.11.0 (Linux/2.6.28; KDE/4.2.0; x86_64; ; ) |
On Monday 23 February 2009 08:48:32 Chet Ramey wrote:
> Mike Frysinger wrote:
> > previous versions of bash would happily accept negative values ( treated
> > as a signed integer and masked with like 0xff), but it seems some changes
> > related to option parsing has broken that
> >
> > $ f(){ return -1; }; f
> > -bash: return: -1: invalid option
> > return: usage: return [n]
>
> Bash still happily accepts the same negative return values; however, the
> `return' builtin was changed to use the standard option parsing rules
> like the rest of the builtins. The effect is that arguments
> beginning with a `-' that are not to be treated as options must follow
> a `--'.
that makes negative values kind of useless imo and breaks backwards
compatibility. if 'return -1' isnt going to be fixed, then i'd just break it
completely so as to force people to migrate to POSIX compliant behavior.
> It's in the change log as having happened between bash-4.0-alpha and
> bash-4.0 beta.
the changelog mentions options, not negative values. they arent the same
thing.
-mike
signature.asc
Description: This is a digitally signed message part.
- bash-4.0 regression: negative return values, Mike Frysinger, 2009/02/23
- Re: bash-4.0 regression: negative return values, Jon Seymour, 2009/02/23
- Re: bash-4.0 regression: negative return values, Eric Blake, 2009/02/23
- Re: bash-4.0 regression: negative return values, Chet Ramey, 2009/02/23
- Re: bash-4.0 regression: negative return values,
Mike Frysinger <=
- Re: bash-4.0 regression: negative return values, Chet Ramey, 2009/02/23
- Re: bash-4.0 regression: negative return values, Mike Frysinger, 2009/02/23
- Re: bash-4.0 regression: negative return values, Chet Ramey, 2009/02/23
- Re: bash-4.0 regression: negative return values, Mike Frysinger, 2009/02/23
- Re: bash-4.0 regression: negative return values, Eric Blake, 2009/02/23