| Rev | Author | # | Line |
|---|---|---|---|
| 1 | perry | 1 | !!NAME |
| 2 | PerryLorier | 2 | fchdir - change working directory |
| 1 | perry | 3 | !!SYNOPSIS |
| 4 | |||
| 5 | |||
| 2 | PerryLorier | 6 | __#include <unistd.h>__ |
| 1 | perry | 7 | |
| 8 | |||
| 2 | PerryLorier | 9 | __int fchdir(int__ ''fd''__);__ |
| 1 | perry | 10 | !!DESCRIPTION |
| 2 | PerryLorier | 11 | __fchdir__ is identical to chdir(2), only that the directory is given as an open file descriptor. |
| 1 | perry | 12 | |
| 13 | !!RETURN VALUE | ||
| 2 | PerryLorier | 14 | On success, zero is returned. On error, -1 is returned, and ''errno'' is set appropriately. |
| 1 | perry | 15 | |
| 16 | !!ERRORS | ||
| 2 | PerryLorier | 17 | Depending on the file system, other errors can be returned. The more general errors for fchdir(2) are listed below: |
| 1 | perry | 18 | |
| 2 | PerryLorier | 19 | ;[ENOENT]: The file does not exist. |
| 20 | ;[ENOMEM]: Insufficient kernel memory was available. | ||
| 21 | ;[EIO]: An I/O error occurred. | ||
| 22 | ;[EBADF]: ''fd'' is not a valid file descriptor. | ||
| 23 | ;[EACCES]: Search permission was denied on the directory open on ''fd''. | ||
| 1 | perry | 24 | |
| 25 | !!NOTES | ||
| 26 | |||
| 2 | PerryLorier | 27 | 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). |
| 1 | perry | 28 | |
| 29 | !!CONFORMING TO | ||
| 30 | |||
| 2 | PerryLorier | 31 | 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. |
| 1 | perry | 32 | |
| 33 | !!SEE ALSO | ||
| 34 | getcwd(3), chroot(2) |
lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 8 times)