bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash-4.0 regression: negative return values


From: Chet Ramey
Subject: Re: bash-4.0 regression: negative return values
Date: Mon, 23 Feb 2009 08:48:32 -0500
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

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 `--'.

It's in the change log as having happened between bash-4.0-alpha and
bash-4.0 beta.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]