Go to the previous, next section.
int chdir(const char *path);
int fchdir(int fd);
path: [in] a pointer to the new current directory.
fd: [in] the file descriptor of the new directory.
chdir changes the current directory to path and
fchdir to fd.
On success zero is returned. On error, -1 is returned and errno is
set to one of the following values:
for chdir:
ENOTDIR, EACCESS, EFAULT, ENOENT,
ENOMEM ENAMETOOLONG, EROFS or ELOOP.
for fchdir:
EBADF, ENOENT, ENOTDIR or EACCESS.
Go to the previous, next section.