diff options
author | Denis Vlasenko | 2007-04-12 12:27:32 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-04-12 12:27:32 +0000 |
commit | 831a20f51246cd8d54a246ba7e239a062eeb002c (patch) | |
tree | 4f3efe440c2db9df016a1aa3dc8d36eb89eb7a2a /applets | |
parent | c98c31783c062377d14b80735b056cf4c53c66e9 (diff) | |
download | busybox-831a20f51246cd8d54a246ba7e239a062eeb002c.zip busybox-831a20f51246cd8d54a246ba7e239a062eeb002c.tar.gz |
pass a copy of argv[i] to NOFORK applets (they may permute it etc).
set/save/restore more shared global variables whan call one applet from another
Diffstat (limited to 'applets')
-rw-r--r-- | applets/applets.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/applets/applets.c b/applets/applets.c index bbb545a..82a7eee 100644 --- a/applets/applets.c +++ b/applets/applets.c @@ -33,7 +33,7 @@ #if ENABLE_SHOW_USAGE && !ENABLE_FEATURE_COMPRESS_USAGE /* Define usage_messages[] */ -static const char usage_messages[] = +static const char usage_messages[] = "" #define MAKE_USAGE #include "usage.h" #include "applets.h" @@ -590,6 +590,10 @@ static int busybox_main(int argc, char **argv) void run_current_applet_and_exit(int argc, char **argv) { + /* Reinit some shared global data */ + optind = 1; + xfunc_error_retval = EXIT_FAILURE; + applet_name = current_applet->name; if (argc == 2 && !strcmp(argv[1], "--help")) bb_show_usage(); |