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)
int i;
char *sp, *tp;
int eacces = 0, asis = 0;
-
-#ifdef CONFIG_FEATURE_SH_STANDALONE_SHELL
char *name = c;
- optind = 1;
- if (find_applet_by_name(name)) {
- /* We have to exec here since we vforked. Running
- * run_applet_by_name() won't work and bad things
- * will happen. */
- execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp);
+ if (ENABLE_FEATURE_SH_STANDALONE_SHELL) {
+ optind = 1;
+ if (find_applet_by_name(name)) {
+ /* We have to exec here since we vforked. Running
+ * run_applet_by_name() won't work and bad things
+ * will happen. */
+ execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp);
+ }
}
-#endif
DBGPRINTF(("REXECVE: c=%p, v=%p, envp=%p\n", c, v, envp));