[git commit] hush: fix func_return2.tests on NOMMU
Denys Vlasenko
vda.linux at googlemail.com
Mon Apr 9 15:54:07 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=eb0de05d682b28fcf7465358ea31cf8574c1221b
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
function old new delta
hush_main 1714 1718 +4
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/hush.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/shell/hush.c b/shell/hush.c
index d5ea3b21f..3a4b5d894 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -9394,6 +9394,13 @@ int hush_main(int argc, char **argv)
optarg++;
G.depth_of_loop = bb_strtou(optarg, &optarg, 16);
# endif
+# if ENABLE_HUSH_FUNCTIONS
+ /* nommu uses re-exec trick for "... | func | ...",
+ * should allow "return".
+ * This accidentally allows returns in subshells.
+ */
+ G_flag_return_in_progress = -1;
+# endif
break;
}
case 'R':
More information about the busybox-cvs
mailing list