Fix invocation of builtin shell to have proper argc and argv.

This commit is contained in:
Matt Kraai 2001-05-17 03:54:37 +00:00
parent 233817437d
commit bc0f783a5f
2 changed files with 6 additions and 2 deletions

View File

@ -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
}

View File

@ -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
}