Re: bash-4.0 regression: negative return values

2009-02-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Mike Frysinger on 2/22/2009 10:03 PM: 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 $

Re: bash-4.0 regression: negative return values

2009-02-23 Thread Chet Ramey
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:

Re: bash-4.0 regression: negative return values

2009-02-23 Thread Mike Frysinger
On Monday 23 February 2009 07:50:30 Eric Blake wrote: According to Mike Frysinger on 2/22/2009 10:03 PM: 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

Re: bash-4.0 regression: negative return values

2009-02-23 Thread Mike Frysinger
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

Re: bash-4.0 regression: negative return values

2009-02-23 Thread Chet Ramey
Mike Frysinger wrote: 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 $

Re: bash-4.0 regression: negative return values

2009-02-23 Thread Chet Ramey
Mike Frysinger wrote: Are filenames beginning with a `-' useless because `rm' interprets them as option arguments when, for instance, they're generated by the expansion of `*'? Is `rm' broken for interpreting them as options? I mean, there's no real difference between the two cases. If you

Re: bash-4.0 regression: negative return values

2009-02-23 Thread Mike Frysinger
On Monday 23 February 2009 15:16:21 Chet Ramey wrote: Mike Frysinger wrote: Are filenames beginning with a `-' useless because `rm' interprets them as option arguments when, for instance, they're generated by the expansion of `*'? Is `rm' broken for interpreting them as options? I mean,

Re: bash-4.0 regression: negative return values

2009-02-23 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Chet Ramey on 2/23/2009 1:16 PM: OK. Let me try to explain how the current behavior derives from Posix. It falls under two parts of the standard (section 1.4): 1. Unless otherwise stated in the utility description, when given an

bash-4.0 regression: negative return values

2009-02-22 Thread Mike Frysinger
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] POSIX states that the

Re: bash-4.0 regression: negative return values

2009-02-22 Thread Jon Seymour
On Mon, Feb 23, 2009 at 4:03 PM, Mike Frysinger vap...@gentoo.org 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:

Re: bash-4.0 regression: negative return values

2009-02-22 Thread Mike Frysinger
On Monday 23 February 2009 00:25:57 Jon Seymour wrote: On Mon, Feb 23, 2009 at 4:03 PM, Mike Frysinger vap...@gentoo.org 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