aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shell/msh.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/shell/msh.c b/shell/msh.c
index b491a08a4..df6f321aa 100644
--- a/shell/msh.c
+++ b/shell/msh.c
@@ -3126,18 +3126,17 @@ static char *rexecve(char *c, char **v, char **envp)
3126 int i; 3126 int i;
3127 char *sp, *tp; 3127 char *sp, *tp;
3128 int eacces = 0, asis = 0; 3128 int eacces = 0, asis = 0;
3129
3130#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
3131 char *name = c; 3129 char *name = c;
3132 3130
3133 optind = 1; 3131 if (ENABLE_FEATURE_SH_STANDALONE_SHELL) {
3134 if (find_applet_by_name(name)) { 3132 optind = 1;
3135 /* We have to exec here since we vforked. Running 3133 if (find_applet_by_name(name)) {
3136 * run_applet_by_name() won't work and bad things 3134 /* We have to exec here since we vforked. Running
3137 * will happen. */ 3135 * run_applet_by_name() won't work and bad things
3138 execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp); 3136 * will happen. */
3137 execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp);
3138 }
3139 } 3139 }
3140#endif
3141 3140
3142 DBGPRINTF(("REXECVE: c=%p, v=%p, envp=%p\n", c, v, envp)); 3141 DBGPRINTF(("REXECVE: c=%p, v=%p, envp=%p\n", c, v, envp));
3143 3142