diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-01 19:56:52 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-10-01 19:56:52 +0200 |
commit | 35ec818fa23b9c68572f871da5c325101009939a (patch) | |
tree | 9ca295a470f2faa930771242aee09718abf3b925 /scripts/basic/Makefile | |
parent | 1b8e0e8adfc28c0b2472121c22f61e1d032805c8 (diff) | |
download | busybox-35ec818fa23b9c68572f871da5c325101009939a.tar.gz |
ash: fix "return N" not setting $? in loop conditionals
Upstream commit 1:
Date: Mon, 6 Oct 2014 20:45:04 +0800
[EVAL] Move common skipcount logic into skiploop
The functions evalloop and evalfor share the logic on checking
and updating skipcount. This patch moves that into the helper
function skiploop.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Upstream commit 2:
Date: Mon, 6 Oct 2014 21:22:43 +0800
[BUILTIN] Allow return in loop conditional to set exit status
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=332954
When return is used in a loop conditional the exit status will
be lost because we always set the exit status at the end of the
loop to that of the last command executed in the body.
This is counterintuitive and contrary to what most other shells do.
This patch fixes this by always preserving the exit status of
return when it is used in a loop conditional.
The patch was originally written by Gerrit Pape <pape@smarden.org>.
Reported-by: Stephane Chazelas <stephane_chazelas@yahoo.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/basic/Makefile')
0 files changed, 0 insertions, 0 deletions