.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved. The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\" @(#)chroot.2 6.2 (Berkeley) %G%
chroot \- change root directory
is the address of the pathname of a directory, terminated by a null byte.
to become the root directory,
the starting point for path names beginning with ``/''.
In order for a directory to become the root directory
a process must have execute (search) access to the directory.
This call is restricted to the super-user.
Upon successful completion, a value of 0 is returned. Otherwise,
a value of \-1 is returned and \fIerrno\fP is set to indicate an error.
will fail and the root directory will be unchanged if
one or more of the following are true:
A component of the path name is not a directory.
The pathname contains a character with the high-order bit set.
A component of a pathname exceeded 255 characters,
or an entire path name exceeded 1023 characters.
The named directory does not exist.
Search permission is denied for any component of the path name.
Too many symbolic links were encountered in translating the pathname.
points outside the process's allocated address space.