Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'busybox.c')
-rw-r--r--busybox.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/busybox.c b/busybox.c
index 48ca05408..486ef4d77 100644
--- a/busybox.c
+++ b/busybox.c
@@ -479,6 +479,13 @@ int main(int argc, char **argv)
*argv = name;
+#ifdef BB_SH
+ /* Add in a special case hack -- whenever **argv == '-'
+ * (i.e. '-su' or '-sh') always invoke the shell */
+ if (**argv == '-')
+ exit(((*(shell_main)) (argc, argv)));
+#endif
+
while (a->name != 0) {
if (strcmp(name, a->name) == 0) {
exit(((*(a->main)) (argc, argv)));