aboutsummaryrefslogtreecommitdiff
path: root/coreutils/chroot.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2001-05-17 03:54:37 +0000
committerMatt Kraai <kraai@debian.org>2001-05-17 03:54:37 +0000
commitbc0f783a5f907eb99f32ef3f577fbd2c7ba15ba4 (patch)
treeeaab44cd6321d41677707268625373cef1f8fc64 /coreutils/chroot.c
parent233817437ded7a4a7505bc2cdb01eb7c953472c2 (diff)
downloadbusybox-bc0f783a5f907eb99f32ef3f577fbd2c7ba15ba4.tar.gz
Fix invocation of builtin shell to have proper argc and argv.
Diffstat (limited to 'coreutils/chroot.c')
-rw-r--r--coreutils/chroot.c4
1 files changed, 3 insertions, 1 deletions
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
}