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. Thanks, Gerrit. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]