ladybird/Base/usr/share/man/man2/chroot.md
Andreas Kling 3f9e4cd24e chroot: Add a little chroot program
This program changes the current filesystem root and spawns a shell.
2020-01-10 23:23:20 +01:00

26 lines
469 B
Markdown

## Name
chroot - change filesystem root
## Synopsis
```**c++
#include <unistd.h>
int chroot(const char* path);
```
## Description
`chroot()` changes the filesystem root of the current process to a new directory specified by `path`.
## Errors
* `EPERM`: The current process does not have superuser privileges.
* `EFAULT`: `path` is not in readable memory.
All of the usual path resolution errors may also occur.
## See also
* [`chroot`(8)](../man8/chroot.md)