CHROOT(2)

NAME
chroot - change root direvtory.

SYNOPSIS
#include <unistd.h>
int chroot(const char* path);

DESCRIPTION
chroot() sets the root directory for the calling process to path. On success, 0 is returned, otherwise a negative value is returned. The effective uid of the calling process must be root (0).

ERRORS
-ENOENT is returned if a component of path does not exist.

-ENOTDIR is returned if path is not a directory.

FILES
linux/fs/open.c /usr/include/linux/sys.h, /usr/include/unistd.h

SEE ALSO
mount(2)