int chdir(path) char *path;
int fchdir(fd) int fd;
chdir() and fchdir() make the directory specified by path or fd the current working directory. Subsequent references to pathnames not starting with `/' are relative to the new current working directory.
In order for a directory to become the current directory, a process must have execute (search) access to the directory.
chdir() returns:
A pathname component is longer than {NAME_MAX} while {_POSIX_NO_TRUNC} is in effect (see pathconf.2v
In addition to the above, the following may also occur:
fchdir() is provided as a performance enhancement and is guaranteed to fail under certain conditions. In particular, if auditing is active the call will never succeed, and EINVAL will be returned. Applications which use this system call must be coded to detect this failure and switch to using chdir() from that point on.
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97