mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:37:35 +00:00
chroot: Add a little chroot program
This program changes the current filesystem root and spawns a shell.
This commit is contained in:
parent
ddd0b19281
commit
3f9e4cd24e
3 changed files with 81 additions and 0 deletions
26
Base/usr/share/man/man2/chroot.md
Normal file
26
Base/usr/share/man/man2/chroot.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
## 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)
|
Loading…
Add table
Add a link
Reference in a new issue