c531b5689e
(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. |
||
---|---|---|
.. | ||
bltin | ||
funcs | ||
USD.doc | ||
alias.c | ||
alias.h | ||
arith_token.c | ||
arith_tokens.h | ||
arithmetic.c | ||
arithmetic.h | ||
builtins.def | ||
cd.c | ||
cd.h | ||
error.c | ||
error.h | ||
eval.c | ||
eval.h | ||
exec.c | ||
exec.h | ||
expand.c | ||
expand.h | ||
histedit.c | ||
init.h | ||
input.c | ||
input.h | ||
jobs.c | ||
jobs.h | ||
machdep.h | ||
mail.c | ||
mail.h | ||
main.c | ||
main.h | ||
Makefile | ||
memalloc.c | ||
memalloc.h | ||
miscbltin.c | ||
miscbltin.h | ||
mkbuiltins | ||
mkinit.sh | ||
mknodenames.sh | ||
mknodes.sh | ||
mkoptions.sh | ||
mktokens | ||
myhistedit.h | ||
mystring.c | ||
mystring.h | ||
nodes.c.pat | ||
nodetypes | ||
option.list | ||
options.c | ||
options.h | ||
output.c | ||
output.h | ||
parser.c | ||
parser.h | ||
redir.c | ||
redir.h | ||
sh.1 | ||
shell.h | ||
show.c | ||
show.h | ||
syntax.c | ||
syntax.h | ||
TOUR | ||
trap.c | ||
trap.h | ||
var.c | ||
var.h | ||
version.h |