aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/chroot.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 9b1a5a82d..e8ce53973 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -47,10 +47,15 @@ int chroot_main(int argc, char **argv)
prog = *argv;
execvp(*argv, argv);
} else {
+#ifndef BB_SH
prog = getenv("SHELL");
if (!prog)
prog = "/bin/sh";
execlp(prog, prog, NULL);
+#else
+ shell_main(argc, argv);
+ exit (0);
+#endif
}
fatalError("cannot execute %s: %s\n", prog, strerror(errno));