OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / fstatat.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" This manpage is Copyright (C) 2006, Michael Kerrisk
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" Japanese Version Copyright (c) 2006 Yuichi SATO
26 .\"         all rights reserved.
27 .\" Translated 2006-10-13 by Yuichi SATO <ysato444@yahoo.co.jp>, LDP v2.39
28 .\"
29 .TH FSTATAT 2 2009-12-13 "Linux" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .SH Ì¾Á°
32 .\"O fstatat \- get file status relative to a directory file descriptor
33 fstatat \- ¥Ç¥£¥ì¥¯¥È¥ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤«¤éÁêÂÐŪ¤Ê°ÌÃ֤ˤ¢¤ë¥Õ¥¡¥¤¥ë¤Î¾õÂÖ¤ò¼èÆÀ¤¹¤ë
34 .\"O .SH SYNOPSIS
35 .SH ½ñ¼°
36 .nf
37 .\"O .B #include <fcntl.h>           /* Definition of AT_* constants */
38 .B #include <fcntl.h>           /* AT_* Äê¿ô¤ÎÄêµÁ */
39 .B #include <sys/stat.h>
40 .sp
41 .BI "int fstatat(int " dirfd ", const char *" pathname ", struct stat *" \
42 buf ,
43 .BI "            int " flags );
44 .fi
45 .sp
46 .in -4n
47 .\"O Feature Test Macro Requirements for glibc (see
48 .\"O .BR feature_test_macros (7)):
49 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
50 .RB ( feature_test_macros (7)
51 »²¾È):
52 .in
53 .sp
54 .BR fstatat ():
55 .br
56 .\"O Since glibc 2.10: _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
57 glibc 2.10 °Ê¹ß: _XOPEN_SOURCE >= 700 || _POSIX_C_SOURCE >= 200809L
58 .br
59 .\"O Before glibc 2.10:
60 glibc 2.10 ¤è¤êÁ°:
61 _ATFILE_SOURCE
62 .\"O .SH DESCRIPTION
63 .SH ÀâÌÀ
64 .\"O The
65 .\"O .BR fstatat ()
66 .\"O system call operates in exactly the same way as
67 .\"O .BR stat (2),
68 .\"O except for the differences described in this manual page.
69 .BR fstatat ()
70 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¡¢¤³¤Î man ¥Ú¡¼¥¸¤ÇÀâÌÀ¤·¤Æ¤¤¤ë°ã¤¤¤¬¤¢¤ë°Ê³°¤Ï¡¢
71 .BR stat (2)
72 ¤ÈÁ´¤¯Æ±¤¸¤è¤¦¤ËÆ°ºî¤¹¤ë¡£
73
74 .\"O If the pathname given in
75 .\"O .I pathname
76 .\"O is relative, then it is interpreted relative to the directory
77 .\"O referred to by the file descriptor
78 .\"O .I dirfd
79 .\"O (rather than relative to the current working directory of
80 .\"O the calling process, as is done by
81 .\"O .BR stat (2)
82 .\"O for a relative pathname).
83 .I pathname
84 ¤Ç»ØÄꤵ¤ì¤ë¥Ñ¥¹Ì¾¤¬ÁêÂХѥ¹¤Ç¤¢¤ë¾ì¹ç¡¢
85 ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿
86 .I dirfd
87 ¤Ç»²¾È¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë
88 .RB ( stat (2)
89 ¤Ç¤Ï¡¢ÁêÂХѥ¹¤Ï¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤Î
90 ÁêÂХѥ¹¤È¤Ê¤ë)¡£
91
92 .\"O If
93 .\"O .I pathname
94 .\"O is relative and
95 .\"O .I dirfd
96 .\"O is the special value
97 .\"O .BR AT_FDCWD ,
98 .\"O then
99 .\"O .I pathname
100 .\"O is interpreted relative to the current working
101 .\"O directory of the calling process (like
102 .\"O .BR stat (2)).
103 .I pathname
104 ¤¬ÁêÂХѥ¹¤Ç¤¢¤ê¡¢¤«¤Ä
105 .I dirfd
106 ¤¬ÆÃÊ̤ÊÃÍ
107 .B AT_FDCWD
108 ¤Ç¤¢¤ë¾ì¹ç¡¢
109 .I pathname
110 ¤Ï
111 .RB ( stat (2)
112 ¤ÈƱ¤¸¤è¤¦¤Ë) ¸Æ¤Ó½Ð¤·¸µ¥×¥í¥»¥¹¤Î
113 ¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¤ÎÁêÂХѥ¹Ì¾¤È¤·¤Æ²ò¼á¤µ¤ì¤ë¡£
114
115 .\"O If
116 .\"O .I pathname
117 .\"O is absolute, then
118 .\"O .I dirfd
119 .\"O is ignored.
120 .I pathname
121 ¤¬ÀäÂХѥ¹¤Ç¤¢¤ë¾ì¹ç¡¢
122 .I dirfd
123 ¤Ï̵»ë¤µ¤ì¤ë¡£
124
125 .\"O .I flags
126 .\"O can either be 0, or include the following flag:
127 .I flags
128 ¤Ï 0 ¤Þ¤¿¤Ï°Ê²¼¤Î¥Õ¥é¥°¤Ç¤¢¤ë¡£
129 .TP
130 .B AT_SYMLINK_NOFOLLOW
131 .\"O If
132 .\"O .I pathname
133 .\"O is a symbolic link, do not dereference it:
134 .\"O instead return information about the link itself, like
135 .\"O .BR lstat (2).
136 .\"O (By default,
137 .\"O .BR fstatat ()
138 .\"O dereferences symbolic links, like
139 .\"O .BR stat (2).)
140 .I pathname
141 ¤¬¥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤Î¾ì¹ç¤Ï¡¢¤½¤ì¤òé¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢
142 .BR lstat (2)
143 ¤ÈƱÍͤ˥ê¥ó¥¯¼«¿È¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤òÊÖ¤¹
144 (¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
145 .BR fstatat ()
146 ¤Ï
147 .BR stat (2)
148 ¤ÈƱÍͤ˥·¥ó¥Ü¥ê¥Ã¥¯¥ê¥ó¥¯¤òé¤ë)¡£
149 .\"O .SH "RETURN VALUE"
150 .SH ÊÖ¤êÃÍ
151 .\"O On success,
152 .\"O .BR fstatat ()
153 .\"O returns 0.
154 À®¸ù¤·¤¿¾ì¹ç¡¢
155 .BR fstatat ()
156 ¤Ï 0 ¤òÊÖ¤¹¡£
157 .\"O On error, \-1 is returned and
158 .\"O .I errno
159 .\"O is set to indicate the error.
160 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤¬ÊÖ¤µ¤ì¤Æ¡¢
161 .I errno
162 ¤Ë¤Ï¥¨¥é¡¼¤ò¼¨¤¹Ãͤ¬ÀßÄꤵ¤ì¤ë¡£
163 .\"O .SH ERRORS
164 .SH ¥¨¥é¡¼
165 .\"O The same errors that occur for
166 .\"O .BR stat (2)
167 .\"O can also occur for
168 .\"O .BR fstatat ().
169 .BR stat (2)
170 ¤ÈƱ¤¸¥¨¥é¡¼¤¬
171 .BR fstatat ()
172 ¤Ç¤âµ¯¤³¤ë¡£
173 .\"O The following additional errors can occur for
174 .\"O .BR fstatat ():
175 .BR fstatat ()
176 ¤Ç¤Ï¡¢¤½¤Î¾¤Ë°Ê²¼¤Î¥¨¥é¡¼¤¬µ¯¤³¤ë:
177 .TP
178 .B EBADF
179 .\"O .I dirfd
180 .\"O is not a valid file descriptor.
181 .I dirfd
182 ¤¬Í­¸ú¤Ê¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ê¤¤¡£
183 .TP
184 .B EINVAL
185 .\"O Invalid flag specified in
186 .\"O .IR flags .
187 .I flags
188 ¤ËÉÔÀµ¤Ê¥Õ¥é¥°Ãͤ¬»ØÄꤵ¤ì¤¿¡£
189 .TP
190 .B ENOTDIR
191 .\"O .I pathname
192 .\"O is relative and
193 .\"O .I dirfd
194 .\"O is a file descriptor referring to a file other than a directory.
195 .I pathname
196 ¤¬ÁêÂХѥ¹¤Ç¡¢¤«¤Ä
197 .I dirfd
198 ¤¬¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¥Õ¥¡¥¤¥ë¤ò»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
199 .\"O .SH VERSIONS
200 .SH ¥Ð¡¼¥¸¥ç¥ó
201 .\"O .BR fstatat ()
202 .\"O was added to Linux in kernel 2.6.16.
203 .BR fstatat ()
204 ¤Ï Linux ¥«¡¼¥Í¥ë 2.6.16 ¤ÇÄɲ䵤줿¡£
205 .\"O .SH "CONFORMING TO"
206 .SH ½àµò
207 POSIX.1-2008.
208 .\"O A similar system call exists on Solaris.
209 Solaris ¤Ë¤Ï¡¢¤³¤ì¤ÈƱ¤¸¤è¤¦¤Ê¥·¥¹¥Æ¥à¥³¡¼¥ë¤¬Â¸ºß¤¹¤ë¡£
210 .\"O .SH NOTES
211 .SH Ãí°Õ
212 .\"O See
213 .\"O .BR openat (2)
214 .\"O for an explanation of the need for
215 .\"O .BR fstatat ().
216 .BR fstatat ()
217 ¤¬É¬ÍפÊÍýͳ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
218 .BR openat (2)
219 ¤ò»²¾È¤¹¤ë¤³¤È¡£
220 .\"O .SH "SEE ALSO"
221 .SH ´ØÏ¢¹àÌÜ
222 .BR openat (2),
223 .BR stat (2),
224 .BR path_resolution (7),
225 .BR symlink (7),