summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenis Vlasenko2007-10-10 14:38:47 +0000
committerDenis Vlasenko2007-10-10 14:38:47 +0000
commit82d38dab917754c9c37aaa7e414a47318b5082fe (patch)
treeea00ffed0879edb0f2dce87953d6f9c5908a18bf /shell
parent141750e38897900db98eaeab1ea35c18f5794023 (diff)
downloadbusybox-82d38dab917754c9c37aaa7e414a47318b5082fe.zip
busybox-82d38dab917754c9c37aaa7e414a47318b5082fe.tar.gz
get rid of global "struct bb_applet *current_applet"
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c6
-rw-r--r--shell/hush.c5
2 files changed, 4 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 8b21e65..af96c4d 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6470,10 +6470,8 @@ tryexec(char *cmd, char **argv, char **envp)
a = find_applet_by_name(cmd);
if (a) {
- if (a->noexec) {
- current_applet = a;
- run_current_applet_and_exit(argv);
- }
+ if (a->noexec)
+ run_appletstruct_and_exit(a, argv);
/* re-exec ourselves with the new arguments */
execve(bb_busybox_exec_path, argv, envp);
/* If they called chroot or otherwise made the binary no longer
diff --git a/shell/hush.c b/shell/hush.c
index 90ed155..1977da0 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1399,10 +1399,9 @@ static void pseudo_exec_argv(char **argv)
const struct bb_applet *a = find_applet_by_name(argv[0]);
if (a) {
if (a->noexec) {
- current_applet = a;
debug_printf_exec("running applet '%s'\n", argv[0]);
-// is it ok that run_current_applet_and_exit() does exit(), not _exit()?
- run_current_applet_and_exit(argv);
+// is it ok that run_appletstruct_and_exit() does exit(), not _exit()?
+ run_appletstruct_and_exit(a, argv);
}
/* re-exec ourselves with the new arguments */
debug_printf_exec("re-execing applet '%s'\n", argv[0]);