From e86236b481d9d6b54704fc8e4f91234108a18286 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 30 Jun 2000 12:49:40 +0000 Subject: Added fchdir(). --- doc/posix_users/files.t | 63 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/doc/posix_users/files.t b/doc/posix_users/files.t index 16018bb647..fa153fed35 100644 --- a/doc/posix_users/files.t +++ b/doc/posix_users/files.t @@ -23,6 +23,7 @@ The directives provided by the files and directories manager are: @item @code{closedir} - Ends directory read operation @item @code{getdents} - Get directory entries @item @code{chdir} - Changes the current working directory +@item @code{fchdir} - Changes the current working directory @item @code{getcwd} - Gets current working directory @item @code{open} - Opens a file @item @code{creat} - Create a new file or rewrite an existing one @@ -399,6 +400,9 @@ int chdir( @subheading STATUS CODES: +On error, this routine returns -1 and sets @code{errno} to one of +the following: + @table @b @item EACCES Search permission is denied for a directory in a file's path prefix. @@ -429,6 +433,65 @@ changed. NONE +@c +@c +@c +@page +@subsection fchdir - Changes the current working directory + +@findex fchdir +@cindex changes the current working directory + +@subheading CALLING SEQUENCE: + +@ifset is-C +@example +#include + +int fchdir( + int fd +); +@end example +@end ifset + +@ifset is-Ada +@end ifset + +@subheading STATUS CODES: + +On error, this routine returns -1 and sets @code{errno} to one of +the following: + +@table @b +@item EACCES +Search permission is denied for a directory in a file's path prefix. + +@item ENAMETOOLONG +Length of a filename string exceeds PATH_MAX and _POSIX_NO_TRUNC is +in effect. + +@item ENOENT +A file or directory does not exist. + +@item ENOTDIR +A component of the specified pathname was not a directory when directory +was expected. + +@end table + +@subheading DESCRIPTION: + +The @code{fchdir()} function causes the directory named by @code{fd} to +become the current working directory; that is, the starting point for +searches of pathnames not beginning with a slash. + +If @code{fchdir()} detects an error, the current working directory is not +changed. + +@subheading NOTES: + +NONE + @c @c @c -- cgit v1.2.3