diff options
Diffstat (limited to 'sys-utils/chroot.c')
-rw-r--r-- | sys-utils/chroot.c | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/sys-utils/chroot.c b/sys-utils/chroot.c deleted file mode 100644 index 7ddbe791f..000000000 --- a/sys-utils/chroot.c +++ /dev/null @@ -1,25 +0,0 @@ -/* - * chroot.c -- change root directory and execute a command there - * Rick Sladkey <jrs@world.std.com> - * In the public domain. - */ - -#include <stdio.h> -#include <unistd.h> -#include <stdlib.h> - -int main(int argc, char *argv[]) -{ - if (argc < 3) { - fprintf(stderr, "usage: %s directory program [arg ...]\n", - argv[0]); - exit(1); - } - if (chroot(argv[1]) < 0) { - perror("chroot"); - exit(1); - } - execvp(argv[2], argv + 2); - perror("execvp"); - exit(1); -} |