X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=original%2Fman3%2Fdirfd.3;h=70b766fa19747f65d2e70e8a72082d7e88205308;hb=361fd72f831aabd8a0aa6fe7bc4ef66ef4f89a1b;hp=c77b0c68c6e5237009cab82fdf692008c7eb3be2;hpb=c03a7a882c608ebf399d1b044ce7a6daa922351a;p=linuxjm%2FLDP_man-pages.git diff --git a/original/man3/dirfd.3 b/original/man3/dirfd.3 index c77b0c68..70b766fa 100644 --- a/original/man3/dirfd.3 +++ b/original/man3/dirfd.3 @@ -1,5 +1,6 @@ .\" Copyright (C) 2002 Andries Brouwer (aeb@cwi.nl) .\" +.\" %%%LICENSE_START(VERBATIM) .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. @@ -19,8 +20,9 @@ .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. +.\" %%%LICENSE_END .\" -.TH DIRFD 3 2010-09-26 "Linux" "Linux Programmer's Manual" +.TH DIRFD 3 2013-07-05 "Linux" "Linux Programmer's Manual" .SH NAME dirfd \- get directory stream file descriptor .SH SYNOPSIS @@ -56,7 +58,7 @@ returns the file descriptor associated with the directory stream .IR dirp . .LP This descriptor is the one used internally by the directory stream. -As a result, it is only useful for functions which do not depend on +As a result, it is useful only for functions which do not depend on or alter the file position, such as .BR fstat (2) and @@ -66,7 +68,9 @@ It will be automatically closed when is called. .SH RETURN VALUE On success, a nonnegative file descriptor is returned. -On error, \-1 is returned. +On error, \-1 is returned, and +.I errno +is set to indicate the cause of the error. .SH ERRORS POSIX.1-2008 specifies two errors, neither of which is returned by the current @@ -80,19 +84,24 @@ does not refer to a valid directory stream. .B ENOTSUP The implementation does not support the association of a file descriptor with a directory. -.SH "CONFORMING TO" +.SH ATTRIBUTES +.SS Multithreading (see pthreads(7)) +The +.BR dirfd () +function is thread-safe. +.SH CONFORMING TO POSIX.1-2008. This function was a BSD extension, present in 4.3BSD-Reno, not in 4.2BSD. .\" It is present in libc5 (since 5.1.2) and in glibc2. .SH NOTES The prototype for .BR dirfd () -is only available if +is available only if .B _BSD_SOURCE or .B _SVID_SOURCE is defined. -.SH "SEE ALSO" +.SH SEE ALSO .BR open (2), .BR closedir (3), .BR opendir (3), @@ -101,3 +110,11 @@ is defined. .BR scandir (3), .BR seekdir (3), .BR telldir (3) +.SH COLOPHON +This page is part of release 3.65 of the Linux +.I man-pages +project. +A description of the project, +and information about reporting bugs, +can be found at +\%http://www.kernel.org/doc/man\-pages/.