CHDIR(2) COMMAND REFERENCE CHDIR(2)
NAME
chdir - change current working directory
SYNOPSIS
chdir(path)
char *path;
DESCRIPTION
Path is the pathname of a directory. Chdir causes this
directory to become the current working directory, the
starting point for path searches for pathnames not beginning
with ``/''.
In order for a directory to become the current directory, a
process must have execute (search) access to the directory.
DIAGNOSTICS
Chdir will fail and the current working directory will be
unchanged if one or more of the following are true:
[ENOTDIR]
A component of the pathname is not a directory.
[ENOENT]
The named directory does not exist.
[ENAMETOOLONG]
The argument path is too long.
[ENOASCII]
The argument path contains a byte with the high-order
bit set.
[EACCES]
Search permission is denied for any component of the
path name. If the target directory is located on a
remote host, this error code will be returned if the
local host name and local user name does not appear in
/usr/lib/dfs/access on the remote machine. See access
(dfs)(5n).
[EIO]
An I/O error occurred while reading from or writing to
the file system.
[EFAULT]
Path points outside the process's allocated address
space.
[ELOOP]
Too many symbolic links were encountered in translating
the pathname.
Printed 10/17/86 1
CHDIR(2) COMMAND REFERENCE CHDIR(2)
[EDFSNOSUCHHOST]
The pathname referenced a remote host, but when we
broadcast a request for its address, no host responded.
[EDFS_CD]
There is a fixed limit for the number of chdirs that may
be made to a remote host. When this limit is exceeded
this error message is returned.
RETURN VALUE
Upon successful completion, a value of 0 is returned.
Otherwise, a value of -1 is returned and errno is set to
indicate the error.
CAVEATS
If you chdir to a directory on a remote host, and are
inactive for four hours, the daemon serving you will exit.
SEE ALSO
chroot(2).
Printed 10/17/86 2
%%index%%
na:72,76;
sy:148,218;
de:366,452;
di:818,1240;2202,335;
rv:2537,236;
ca:2773,204;
se:2977,113;
%%index%%000000000128