[git commit] hush: add TODO comment

Denys Vlasenko vda.linux at googlemail.com
Sat Apr 1 20:16:32 UTC 2023


commit: https://git.busybox.net/busybox/commit/?id=1409432d072e62c3838ef2e86b0d97637201dbd5
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 shell/hush.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/shell/hush.c b/shell/hush.c
index e6be70078..e42de8762 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -11276,6 +11276,9 @@ static int FAST_FUNC builtin_local(char **argv)
 		bb_error_msg("%s: not in a function", argv[0]);
 		return EXIT_FAILURE; /* bash compat */
 	}
+//TODO? ash and bash support "local -" special form,
+//which saves/restores $- around function call (including async returns, such as ^C)
+//(IOW: it makes "set +/-..." effects local)
 	argv++;
 	/* Since all builtins run in a nested variable level,
 	 * need to use level - 1 here. Or else the variable will be removed at once


More information about the busybox-cvs mailing list