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
This commit is contained in:
Denis Vlasenko
2007-04-12 12:27:32 +00:00
parent c98c31783c
commit 831a20f512
5 changed files with 38 additions and 30 deletions

View File

@ -1119,8 +1119,7 @@ static void pseudo_exec(struct child_prog *child)
/* Count argc for use in a second... */
for (argc_l = 0; *argv_l; argv_l++, argc_l++)
/**/;
optind = 1;
continue;
debug_printf("running applet %s\n", name);
run_applet_and_exit(name, argc_l, child->argv);
}