|
|
1.1 ! root 1: .TH CHDIR 2 "2 July 1983" ! 2: .UC 4 ! 3: .SH NAME ! 4: chdir \- change current working directory ! 5: .SH SYNOPSIS ! 6: .nf ! 7: .ft B ! 8: chdir(path) ! 9: char *path; ! 10: .ft R ! 11: .fi ! 12: .SH DESCRIPTION ! 13: .I Path ! 14: is the pathname of a directory. ! 15: .I Chdir ! 16: causes this directory ! 17: to become the current working directory, ! 18: the starting point for path names not beginning with ``/''. ! 19: .PP ! 20: In order for a directory to become the current directory, ! 21: a process must have execute (search) access to the directory. ! 22: .SH "RETURN VALUE ! 23: Upon successful completion, a value of 0 is returned. ! 24: Otherwise, a value of \-1 is returned and \fIerrno\fP is set to indicate ! 25: the error. ! 26: .SH ERRORS ! 27: .I Chdir ! 28: will fail and the current working directory will be unchanged if ! 29: one or more of the following are true: ! 30: .TP 15 ! 31: [ENOTDIR] ! 32: A component of the pathname is not a directory. ! 33: .TP 15 ! 34: [ENOENT] ! 35: The named directory does not exist. ! 36: .TP 15 ! 37: [ENOENT] ! 38: The argument path name was too long. ! 39: .TP 15 ! 40: [EPERM] ! 41: The argument contains a byte with the high-order bit set. ! 42: .TP 15 ! 43: [EACCES] ! 44: Search permission is denied for any component of ! 45: the path name. ! 46: .TP 15 ! 47: [EFAULT] ! 48: .I Path ! 49: points outside the process's allocated address space. ! 50: .TP 15 ! 51: [ELOOP] ! 52: Too many symbolic links were encountered in translating ! 53: the pathname. ! 54: .SH "SEE ALSO" ! 55: chroot(2)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.