Annotation of 43BSDTahoe/man/man2/chroot.2, revision 1.1.1.1

1.1       root        1: .\" Copyright (c) 1983 Regents of the University of California.
                      2: .\" All rights reserved.  The Berkeley software License Agreement
                      3: .\" specifies the terms and conditions for redistribution.
                      4: .\"
                      5: .\"    @(#)chroot.2    6.3 (Berkeley) 8/26/85
                      6: .\"
                      7: .TH CHROOT 2 "August 26, 1985"
                      8: .UC 5
                      9: .SH NAME
                     10: chroot \- change root directory
                     11: .SH SYNOPSIS
                     12: .nf
                     13: .ft B
                     14: chroot(dirname)
                     15: char *dirname;
                     16: .ft R
                     17: .fi
                     18: .SH DESCRIPTION
                     19: .I Dirname
                     20: is the address of the pathname of a directory, terminated by a null byte.
                     21: .I Chroot
                     22: causes this directory
                     23: to become the root directory,
                     24: the starting point for path names beginning with ``/''.
                     25: .PP
                     26: In order for a directory to become the root directory
                     27: a process must have execute (search) access to the directory.
                     28: .PP
                     29: This call is restricted to the super-user.
                     30: .SH "RETURN VALUE
                     31: Upon successful completion, a value of 0 is returned.  Otherwise,
                     32: a value of \-1 is returned and \fIerrno\fP is set to indicate an error.
                     33: .SH ERRORS
                     34: .I Chroot
                     35: will fail and the root directory will be unchanged if
                     36: one or more of the following are true:
                     37: .TP 15
                     38: [ENOTDIR]
                     39: A component of the path name is not a directory.
                     40: .TP 15
                     41: [EINVAL]
                     42: The pathname contains a character with the high-order bit set.
                     43: .TP 15
                     44: [ENAMETOOLONG]
                     45: A component of a pathname exceeded 255 characters,
                     46: or an entire path name exceeded 1023 characters.
                     47: .TP 15
                     48: [ENOENT]
                     49: The named directory does not exist.
                     50: .TP 15
                     51: [EACCES]
                     52: Search permission is denied for any component of the path name.
                     53: .TP 15
                     54: [ELOOP]
                     55: Too many symbolic links were encountered in translating the pathname.
                     56: .TP 15
                     57: [EFAULT]
                     58: .I Path
                     59: points outside the process's allocated address space.
                     60: .TP 15
                     61: [EIO]
                     62: An I/O error occurred while reading from or writing to the file system.
                     63: .SH "SEE ALSO"
                     64: chdir(2)

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.