bb_opt_complementally and STANDALONE_SHELL
Shaun Jackman
sjackman at gmail.com
Fri Jul 7 11:08:57 PDT 2006
On 7/7/06, Shaun Jackman <sjackman at gmail.com> wrote:
> When STANDALONE_SHELL is used on a vfork system, if an applet sets
> bb_opt_complementally, it will remain set when the shell calls the
> next applet. This issue is similar to the shell needing to clear
> optind before calling the next applet. Either bb_opt_complementally
> could be cleared in the same place that optind is cleared, or
...
If changing the prototype of bb_getopt_ulflags seems to invasive, I
propose this patch as an alternative. It works for me.
Cheers,
Shaun
2006-07-07 Shaun Jackman <sjackman at gmail.com>
* shell/lash.c (pseudo_exec) [ENABLE_FEATURE_SH_STANDALONE_SHELL]:
Clear bb_opt_complementally and bb_applet_long_options.
--- shell/lash.c 6280109425b1028a3daf73149bba5d4ef9615da2
+++ shell/lash.c 77d0a727eb06192ad0dfdbd830c349ed0979f5ff
@@ -1208,6 +1208,8 @@
for(argc_l=0; *argv_l; argv_l++, argc_l++);
optind = 0;
+ bb_opt_complementally = NULL;
+ bb_applet_long_options = NULL;
run_applet_by_name(child->argv[0], argc_l, child->argv);
}
-------------- next part --------------
2006-07-07 Shaun Jackman <sjackman at gmail.com>
* shell/lash.c (pseudo_exec) [ENABLE_FEATURE_SH_STANDALONE_SHELL]:
Clear bb_opt_complementally and bb_applet_long_options.
--- shell/lash.c 6280109425b1028a3daf73149bba5d4ef9615da2
+++ shell/lash.c 77d0a727eb06192ad0dfdbd830c349ed0979f5ff
@@ -1208,6 +1208,8 @@
for(argc_l=0; *argv_l; argv_l++, argc_l++);
optind = 0;
+ bb_opt_complementally = NULL;
+ bb_applet_long_options = NULL;
run_applet_by_name(child->argv[0], argc_l, child->argv);
}
More information about the busybox
mailing list