Module Name: src Committed By: kre Date: Sat May 4 02:52:55 UTC 2019
Modified Files: src/bin/sh: eval.c Log Message: When a return occurs in the test part of a loop statement (while/until) (inside a function or dot script) the exit status of that return statement should become the exit status of the function (or dot script) - we were ignoring it, That is fn() { while return 7; do return 9; done; return 11; } should exit with status 7. It was exiting 0. This is apparently another old ash bug that has been fixed everywhere else in the past. Issue pointed out by Martijn Dekker, (fairly obvious) fix borrowed from FreeBSD, due for return sometime next century. To generate a diff of this commit: cvs rdiff -u -r1.174 -r1.175 src/bin/sh/eval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.