aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
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 8b21e655c..af96c4d1d 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -6470,10 +6470,8 @@ tryexec(char *cmd, char **argv, char **envp)
6470 6470
6471 a = find_applet_by_name(cmd); 6471 a = find_applet_by_name(cmd);
6472 if (a) { 6472 if (a) {
6473 if (a->noexec) { 6473 if (a->noexec)
6474 current_applet = a; 6474 run_appletstruct_and_exit(a, argv);
6475 run_current_applet_and_exit(argv);
6476 }
6477 /* re-exec ourselves with the new arguments */ 6475 /* re-exec ourselves with the new arguments */
6478 execve(bb_busybox_exec_path, argv, envp); 6476 execve(bb_busybox_exec_path, argv, envp);
6479 /* If they called chroot or otherwise made the binary no longer 6477 /* If they called chroot or otherwise made the binary no longer
diff --git a/shell/hush.c b/shell/hush.c
index 90ed15547..1977da0f0 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -1399,10 +1399,9 @@ static void pseudo_exec_argv(char **argv)
1399 const struct bb_applet *a = find_applet_by_name(argv[0]); 1399 const struct bb_applet *a = find_applet_by_name(argv[0]);
1400 if (a) { 1400 if (a) {
1401 if (a->noexec) { 1401 if (a->noexec) {
1402 current_applet = a;
1403 debug_printf_exec("running applet '%s'\n", argv[0]); 1402 debug_printf_exec("running applet '%s'\n", argv[0]);
1404// is it ok that run_current_applet_and_exit() does exit(), not _exit()? 1403// is it ok that run_appletstruct_and_exit() does exit(), not _exit()?
1405 run_current_applet_and_exit(argv); 1404 run_appletstruct_and_exit(a, argv);
1406 } 1405 }
1407 /* re-exec ourselves with the new arguments */ 1406 /* re-exec ourselves with the new arguments */
1408 debug_printf_exec("re-execing applet '%s'\n", argv[0]); 1407 debug_printf_exec("re-execing applet '%s'\n", argv[0]);