make busybox --install work even if /proc/self/exe doesn't exist

# size busybox_old busybox_unstripped
   text    data     bss     dec     hex filename
 680095    2704   15648  698447   aa84f busybox_old
 680099    2704   15648  698451   aa853 busybox_unstripped
This commit is contained in:
Denis Vlasenko
2007-06-08 15:02:55 +00:00
parent c14d39e83a
commit bdbbb7ec49
8 changed files with 15 additions and 21 deletions

View File

@@ -6471,7 +6471,7 @@ tryexec(char *cmd, char **argv, char **envp)
run_current_applet_and_exit(argv);
}
/* re-exec ourselves with the new arguments */
execve(CONFIG_BUSYBOX_EXEC_PATH, argv, envp);
execve(bb_busybox_exec_path, argv, envp);
/* If they called chroot or otherwise made the binary no longer
* executable, fall through */
}

View File

@@ -1392,7 +1392,7 @@ static void pseudo_exec_argv(char **argv)
}
/* re-exec ourselves with the new arguments */
debug_printf_exec("re-execing applet '%s'\n", argv[0]);
execvp(CONFIG_BUSYBOX_EXEC_PATH, argv);
execvp(bb_busybox_exec_path, argv);
/* If they called chroot or otherwise made the binary no longer
* executable, fall through */
}

View File

@@ -3062,7 +3062,7 @@ static const char *rexecve(char *c, char **v, char **envp)
/* We have to exec here since we vforked. Running
* run_applet_and_exit() won't work and bad things
* will happen. */
execve(CONFIG_BUSYBOX_EXEC_PATH, v, envp);
execve(bb_busybox_exec_path, v, envp);
}
}