Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
fchdir(2)
Edit
PageHistory
Diff
Info
LikePages
!!NAME fchdir - change working directory !!SYNOPSIS __#include <unistd.h>__ __int fchdir(int__ ''fd''__);__ !!DESCRIPTION __fchdir__ is identical to chdir(2), only that the directory is given as an open file descriptor. !!RETURN VALUE On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately. !!ERRORS Depending on the file system, other errors can be returned. The more general errors for fchdir(2) are listed below: ;[ENOENT]: The file does not exist. ;[ENOMEM]: Insufficient kernel memory was available. ;[EIO]: An I/O error occurred. ;[EBADF]: ''fd'' is not a valid file descriptor. ;[EACCES]: Search permission was denied on the directory open on ''fd''. !!NOTES The prototype for fchdir(2) is only available if ___BSD_SOURCE__ is defined (either explicitly, or implicitly, by not defining _POSIX_SOURCE or compiling with the -ansi flag). !!CONFORMING TO The fchdir(2) call is compatible with SVr4, 4.4BSD and X/OPEN. SVr4 documents additional [EIO], [EINTR], and [ENOLINK] error conditions. X/OPEN documents additional [EINTR] and [EIO] error conditions. !!SEE ALSO getcwd(3), chroot(2)
3 pages link to
fchdir(2)
:
Man2f
syscalls(2)
chdir(2)
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.