From: Matt Kraai Date: Thu, 17 May 2001 03:54:37 +0000 (-0000) Subject: Fix invocation of builtin shell to have proper argc and argv. X-Git-Tag: 0_52~167 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=bc0f783a5f907eb99f32ef3f577fbd2c7ba15ba4;p=oweals%2Fbusybox.git Fix invocation of builtin shell to have proper argc and argv. --- diff --git a/chroot.c b/chroot.c index bae9cd757..c10df7a7c 100644 --- a/chroot.c +++ b/chroot.c @@ -54,7 +54,9 @@ int chroot_main(int argc, char **argv) prog = "/bin/sh"; execlp(prog, prog, NULL); #else - shell_main(argc, argv); + char shell[] = "/bin/sh"; + char *shell_argv[2] = { shell, NULL }; + shell_main(1, shell_argv); return EXIT_SUCCESS; #endif } diff --git a/coreutils/chroot.c b/coreutils/chroot.c index bae9cd757..c10df7a7c 100644 --- a/coreutils/chroot.c +++ b/coreutils/chroot.c @@ -54,7 +54,9 @@ int chroot_main(int argc, char **argv) prog = "/bin/sh"; execlp(prog, prog, NULL); #else - shell_main(argc, argv); + char shell[] = "/bin/sh"; + char *shell_argv[2] = { shell, NULL }; + shell_main(1, shell_argv); return EXIT_SUCCESS; #endif }