OSDN Git Service

(split) LDP v3.24 -> v3.29 の定型的な変更内容を反映。
[linuxjm/LDP_man-pages.git] / draft / man3 / getcwd.3
1 .\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
2 .\"
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
6 .\"
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
11 .\"
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein.  The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
18 .\" professionally.
19 .\"
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
22 .\" License.
23 .\" Modified Wed Jul 21 22:35:42 1993 by Rik Faith (faith@cs.unc.edu)
24 .\" Modified 18 Mar 1996 by Martin Schulze (joey@infodrom.north.de):
25 .\"   Corrected description of getwd().
26 .\" Modified Sat Aug 21 12:32:12 MET 1999 by aeb - applied fix by aj
27 .\" Modified Mon Dec 11 13:32:51 MET 2000 by aeb
28 .\" Modified Thu Apr 22 03:49:15 CEST 2002 by Roger Luethi <rl@hellgate.ch>
29 .\"
30 .\" Japanese Version Copyright (c) 1997 IMAMURA Nobutaka
31 .\"         all rights reserved.
32 .\" Translated Fri Feb 14 12:40:22 JST 1997
33 .\"         by IMAMURA Nobutaka <imamura@spp.hpc.fujitsu.co.jp>
34 .\" Modified Thu Dec 8 05:08:44 JST 1999
35 .\"         by Kentaro Shirakata <argrath@yo.rim.or.jp>
36 .\" Modified Sun Mar 12 21:08:44 JST 2000
37 .\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
38 .\" Updated 2001-01-29 by Kentaro Shirakata <argrath@ub32.org>
39 .\" Updated 2002-03-23 by Kentaro Shirakata <argrath@ub32.org>
40 .\" Updated 2002-10-17 by Kentaro Shirakata <argrath@ub32.org>
41 .\" Updated 2007-01-01 by Kentaro Shirakata <argrath@ub32.org>
42 .\" Updated 2008-08-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.07
43 .\"
44 .\" WORD: current working directory     ¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê
45 .\" WORD: LEGACY        ¡Ö²áµî¤Î̾»Ä(LEGACY)¡×
46 .\"
47 .TH GETCWD 3 2010-09-20 "GNU" "Linux Programmer's Manual"
48 .\"O .SH NAME
49 .SH Ì¾Á°
50 .\"O getcwd, getwd, get_current_dir_name \- Get current working directory
51 getcwd, getwd, get_current_dir_name \- ¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê̾¤Î¼èÆÀ
52 .\"O .SH SYNOPSIS
53 .SH ½ñ¼°
54 .nf
55 .B #include <unistd.h>
56 .sp
57 .BI "char *getcwd(char *" buf ", size_t " size );
58 .sp
59 .BI "char *getwd(char *" buf );
60 .sp
61 .B "char *get_current_dir_name(void);"
62 .fi
63 .sp
64 .in -4n
65 .\"O Feature Test Macro Requirements for glibc (see
66 .\"O .BR feature_test_macros (7)):
67 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
68 .RB ( feature_test_macros (7)
69 »²¾È):
70 .sp
71 .in
72 .BR get_current_dir_name ():
73 .RS
74 _GNU_SOURCE
75 .RE
76 .sp
77 .BR getwd ():
78 .ad l
79 .RS 4
80 .PD 0
81 .TP 4
82 .\"O Since glibc 2.10:
83 glibc 2.10 °Ê¹ß:
84 .nf
85 _BSD_SOURCE ||
86     (_XOPEN_SOURCE\ >=\ 500 ||
87         _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED) &&
88     !(_POSIX_C_SOURCE\ >=\ 200809L || _XOPEN_SOURCE\ >=\ 700)
89 .fi
90 .TP 4
91 .\"O Before glibc 2.10:
92 glibc 2.10 ¤è¤êÁ°:
93 _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 ||
94 _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTENDED
95 .PD
96 .RE
97 .ad b
98 .\"O .SH DESCRIPTION
99 .SH ÀâÌÀ
100 .\"O These functions return a null-terminated string containing an
101 .\"O absolute pathname that is the current working directory of
102 .\"O the calling process.
103 .\"O The pathname is returned as the function result and via the argument
104 .\"O .IR buf ,
105 .\"O if present.
106 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢¸Æ¤Ó½Ð¤·¤¿¥×¥í¥»¥¹¤Î¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤Î
107 ÀäÂХѥ¹Ì¾ (absolute pathname) ¤¬Æþ¤Ã¤¿Ê¸»úÎó¤òÊÖ¤¹¡£
108 ÊÖ¤µ¤ì¤ëʸ»úÎó¤Ï NULL ¤Ç½ªÃ¼¤µ¤ì¤ë¡£
109 ¥Ñ¥¹Ì¾¤Ï´Ø¿ô¤Î·ë²Ì¤È¤·¤ÆÊÖ¤µ¤ì¡¢°ú¿ô
110 .I buf
111 ¤¬¤¢¤ë¾ì¹ç¤Ï
112 .I buf
113 ·Ðͳ¤Ç¤âÊÖ¤µ¤ì¤ë¡£
114
115 .\"O The
116 .\"O .BR getcwd ()
117 .\"O function copies an absolute pathname of the current working directory
118 .\"O to the array pointed to by
119 .\"O .IR buf ,
120 .\"O which is of length
121 .\"O .IR size .
122 .BR getcwd ()
123 ´Ø¿ô¤Ï¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤ÎÀäÂХѥ¹Ì¾¤ò
124 .I buf
125 ¤Ç¼¨¤µ¤ì¤¿
126 .I size
127 ŤÎÇÛÎó¤Ë¥³¥Ô¡¼¤¹¤ë¡£
128 .PP
129 .\"O If the length of the absolute pathname of the current working directory,
130 .\"O including the terminating null byte, exceeds
131 .\"O .I size
132 .\"O bytes, NULL is returned, and
133 .\"O .I errno
134 .\"O is set to
135 .\"O .BR ERANGE ;
136 .\"O an application should check for this error, and allocate a larger
137 .\"O buffer if necessary.
138 ½ªÃ¼¤Î NULL ¥Ð¥¤¥È¤â´Þ¤á¤¿¡¢¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤Î
139 ÀäÂХѥ¹Ì¾¤ÎŤµ¤¬
140 .I size
141 ¥Ð¥¤¥È¤òĶ¤¨¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢ÊÖ¤êÃͤȤ·¤Æ NULL ¤¬ÊÖ¤ê
142 .I errno
143 ¤Ë
144 .B ERANGE
145 ¤¬¥»¥Ã¥È¤µ¤ì¤ë¡£
146 ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¤³¤Î¥¨¥é¡¼¤ò¥Á¥§¥Ã¥¯¤·¡¢
147 ɬÍפ˱þ¤¸¤Æ¤è¤êŤ¤¥Ð¥Ã¥Õ¥¡¤òÍÑ°Õ¤¹¤Ù¤­¤Ç¤¢¤ë¡£
148 .PP
149 .\"O As an extension to the POSIX.1-2001 standard, Linux (libc4, libc5, glibc)
150 .\"O .BR getcwd ()
151 .\"O allocates the buffer dynamically using
152 .\"O .BR malloc (3)
153 .\"O if
154 .\"O .I buf
155 .\"O is NULL.
156 .\"O In this case, the allocated buffer has the length
157 .\"O .I size
158 .\"O unless
159 .\"O .I size
160 .\"O is zero, when
161 .\"O .I buf
162 .\"O is allocated as big as necessary.
163 .\"O The caller should
164 .\"O .BR free (3)
165 .\"O the returned buffer.
166 POSIX.1-2001 É¸½à¤Î³ÈÄ¥¤È¤·¤Æ¡¢
167 Linux (libc4, libc5, glibc) ¤Ç¤Ï
168 .I buf
169 ¤¬ NULL ¤Î¾ì¹ç¡¢
170 .BR getcwd ()
171 ¤ÏɬÍפʥХåե¡¤ò
172 .BR malloc (3)
173 ¤òÍѤ¤¤ÆưŪ¤Ë³ä¤êÅö¤Æ¤ë¡£
174 ¤³¤Î¾ì¹ç¡¢
175 .I size
176 ¤¬ 0 ¤Î¾ì¹ç¤ò½ü¤­¡¢¥Ð¥Ã¥Õ¥¡¤ÎŤµ¤Ï
177 .I size
178 ¤È¤Ê¤ë¡£
179 .I size
180 ¤¬ 0 ¤Î¾ì¹ç¤Ë¤ÏɬÍפÊÂ礭¤µ¤¬³ÎÊݤµ¤ì¤ë¡£
181 ¸Æ¤Ó½Ð¤·Â¦¤Ç¡¢ÊÖ¤µ¤ì¤¿¥Ð¥Ã¥Õ¥¡¤ò
182 .BR free (3)
183 ¤¹¤Ù¤­¤Ç¤¢¤ë¡£
184
185 .\"O .BR get_current_dir_name ()
186 .\"O will
187 .\"O .BR malloc (3)
188 .\"O an array big enough to hold the absolute pathname of
189 .\"O the current working directory.
190 .\"O If the environment
191 .\"O variable
192 .\"O .B PWD
193 .\"O is set, and its value is correct, then that value will be returned.
194 .BR get_current_dir_name ()
195 ¤Ï¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤ÎÀäÂХѥ¹Ì¾¤ò¼ý¤á¤ë¤Î¤Ë
196 ½½Ê¬¤ÊÂ礭¤µ¤ÎÇÛÎó¤ò
197 .BR malloc (3)
198 ¤Ç³ÍÆÀ¤¹¤ë¡£´Ä¶­ÊÑ¿ô
199 .B PWD
200 ¤¬ÀßÄꤵ¤ì¤Æ¤ª¤ê¤½¤ÎÃͤ¬Àµ¤·¤±¤ì¤Ð¡¢¤½¤ÎÃͤ¬ÊÖ¤µ¤ì¤ë¡£
201 .\"O The caller should
202 .\"O .BR free (3)
203 .\"O the returned buffer.
204 ¸Æ¤Ó½Ð¤·Â¦¤Ç¡¢ÊÖ¤µ¤ì¤¿¥Ð¥Ã¥Õ¥¡¤ò
205 .BR free (3)
206 ¤¹¤Ù¤­¤Ç¤¢¤ë¡£
207
208 .\"O .BR getwd ()
209 .\"O does not
210 .\"O .BR malloc (3)
211 .\"O any memory.
212 .\"O The
213 .\"O .I buf
214 .\"O argument should be a pointer to an array at least
215 .\"O .B PATH_MAX
216 .\"O bytes long.
217 .\"O If the length of the absolute pathname of the current working directory,
218 .\"O including the terminating null byte, exceeds
219 .\"O .B PATH_MAX
220 .\"O bytes, NULL is returned, and
221 .\"O .I errno
222 .\"O is set to
223 .\"O .BR ENAMETOOLONG .
224 .BR getwd ()
225 ¤Ï
226 .BR malloc (3)
227 ¤Ë¤è¤ë¥á¥â¥ê³ÍÆÀ¤ò°ìÀڹԤʤï¤Ê¤¤¡£
228 .I buf
229 °ú¿ô¤Ï¾¯¤Ê¤¯¤È¤â
230 .B PATH_MAX
231 ¥Ð¥¤¥È¤ÎŤµ¤ò»ý¤ÄÇÛÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ëɬÍפ¬¤¢¤ë¡£
232 ½ªÃ¼¤Î NULL ¥Ð¥¤¥È¤â´Þ¤á¤¿¡¢¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤Î
233 ÀäÂХѥ¹Ì¾¤ÎŤµ¤¬
234 .B PATH_MAX
235 ¥Ð¥¤¥È¤òĶ¤¨¤Æ¤¤¤ë¾ì¹ç¡¢
236 NULL ¤¬ÊÖ¤µ¤ì¡¢
237 .I errno
238 ¤Ë
239 .B ENAMETOOLONG
240 ¤¬ÀßÄꤵ¤ì¤ë¡£
241 .\"O (Note that on some systems,
242 .\"O .B PATH_MAX
243 .\"O may not be a compile-time constant;
244 .\"O furthermore, its value may depend on the file system, see
245 .\"O .BR pathconf (3).)
246 .\"O For portability and security reasons, use of
247 .\"O .BR getwd ()
248 .\"O is deprecated.
249 (¥·¥¹¥Æ¥à¤Ë¤è¤Ã¤Æ¤Ï¡¢
250 .B PATH_MAX
251 ¤Ïɬ¤º¤·¤â¥³¥ó¥Ñ¥¤¥ë»þ¤Ë·è¤Þ¤ëÄê¿ô¤Ç¤Ï¤Ê¤¤ÅÀ¤ËÃí°Õ¤¹¤ë¤³¤È¡£
252 ¤Þ¤¿¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤Ë°Í¸¤¹¤ë¾ì¹ç¤â¤¢¤ë¡£
253 .BR pathconf (3)
254 ¤ò»²¾È¡£)
255 °Ü¿¢À­¤È¥»¥­¥å¥ê¥Æ¥£¾å¤ÎÍýͳ¤«¤é¡¢
256 .BR getwd ()
257 ¤ÎÍøÍѤϿ侩¤µ¤ì¤Ê¤¤¡£
258 .\"O .SH "RETURN VALUE"
259 .SH ÊÖ¤êÃÍ
260 .\"O On success, these functions return a pointer to a string containing
261 .\"O the pathname of the current working directory.
262 .\"O In the case
263 .\"O .BR getcwd ()
264 .\"O and
265 .\"O .BR getwd ()
266 .\"O this is the same value as
267 .\"O .IR buf.
268 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤ÎÀäÂХѥ¹Ì¾
269 ¤¬Æþ¤Ã¤¿Ê¸»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
270 .BR getcwd ()
271 ¤È
272 .BR getwd ()
273 ¤Î¾ì¹ç¡¢ÊÖ¤êÃͤÏ
274 .I buf
275 ¤ÈƱ¤¸Ãͤˤʤ롣
276
277 .\"O On failure, these functions return NULL, and
278 .\"O .I errno
279 .\"O is set to indicate the error.
280 .\"O The contents of the array pointed to by
281 .\"O .I buf
282 .\"O are undefined on error.
283 ¼ºÇÔ¤·¤¿¾ì¹ç¡¢¤³¤ì¤é¤Î´Ø¿ô¤Ï NULL ¤òÊÖ¤·¡¢
284 .I errno
285 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹ÃͤòÀßÄꤹ¤ë¡£
286 .I buf
287 ¤¬»Ø¤¹ÇÛÎó¤ÎÆâÍƤÏ̤ÄêµÁ¤Ç¤¢¤ë¡£
288 .\"O .SH ERRORS
289 .SH ¥¨¥é¡¼
290 .TP
291 .B EACCES
292 .\"O Permission to read or search a component of the filename was denied.
293 ¥Õ¥¡¥¤¥ë̾¤Î¹½À®Í×ÁǤËÂФ¹¤ëÆɤ߹þ¤ß¤¢¤ë¤¤¤Ï¸¡º÷¤Î¸¢¸Â¤¬¤Ê¤¤¡£
294 .TP
295 .B EFAULT
296 .\"O .I buf
297 .\"O points to a bad address.
298 .I buf
299 ¤¬ÉÔÀµ¤Ê¥¢¥É¥ì¥¹¤ò»Ø¤·¤Æ¤¤¤ë¡£
300 .TP
301 .B EINVAL
302 .\"O The
303 .\"O .I size
304 .\"O argument is zero and
305 .\"O .I buf
306 .\"O is not a null pointer.
307 .I size
308 °ú¿ô¤¬ 0 ¤«¤Ä¡¢
309 .I buf
310 °ú¿ô¤¬ NULL ¥Ý¥¤¥ó¥¿¤Ç¤Ê¤¤¡£
311 .TP
312 .B EINVAL
313 .\"O .BR getwd ():
314 .\"O .I buf
315 .\"O is NULL.
316 .BR getwd ():
317 .I buf
318 ¤¬ NULL ¤Ç¤¢¤ë¡£
319 .TP
320 .B ENAMETOOLONG
321 .\"O .BR getwd ():
322 .\"O The size of the null-terminated absolute pathname string exceeds
323 .\"O .B PATH_MAX
324 .\"O bytes.
325 .BR getwd ():
326 ÀäÂХѥ¹Ì¾¤¬Æþ¤Ã¤¿ NULL ½ªÃ¼¤µ¤ì¤¿Ê¸»úÎó¤ÎŤµ¤¬
327 .B PATH_MAX
328 ¥Ð¥¤¥È¤òĶ¤¨¤Æ¤¤¤ë¡£
329 .TP
330 .B ENOENT
331 .\"O The current working directory has been unlinked.
332 ¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤¬ºï½ü¤µ¤ì¤Æ¤¤¤ë¡£
333 .TP
334 .B ERANGE
335 .\"O The
336 .\"O .I size
337 .\"O argument is less than the length of the absolute pathname of the
338 .\"O working directory, including the terminating null byte.
339 .\"O You need to allocate a bigger array and try again.
340 .I size
341 °ú¿ô¤ÎÃͤ¬¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤ÎÀäÂХѥ¹Ì¾¤ÎŤµ¤è¤ê¾®¤µ¤¤¡£
342 Ťµ¤Ë¤Ïʸ»úÎó¤Î½ªÃ¼¥Ð¥¤¥È¤â´Þ¤Þ¤ì¤ë¡£
343 ¤è¤êÂ礭¤¤ÇÛÎó¤ò³ÎÊݤ·¤Æ¤â¤¦°ìÅټ¹Ԥ¹¤ëɬÍפ¬¤¢¤ë¡£
344 .\"O .SH "CONFORMING TO"
345 .SH ½àµò
346 .\"O .BR getcwd ()
347 .\"O conforms to POSIX.1-2001.
348 .BR getcwd ()
349 ¤Ï POSIX.1-2001 ¤Ë½àµò¤·¤Æ¤¤¤ë¡£
350 .\"O Note however that POSIX.1-2001 leaves the behavior of
351 .\"O .BR getcwd ()
352 .\"O unspecified if
353 .\"O .I buf
354 .\"O is NULL.
355 POSIX.1-2001 ¤Ï¡¢
356 .I buf
357 ¤¬ NULL ¤Î¾ì¹ç¤Î
358 .BR getcwd ()
359 ¤ÎÆ°ºî¤òµ¬Äꤷ¤Ê¤¤¤Þ¤Þ¤È¤·¤Æ¤¤¤ë¡£
360
361 .\"O .BR getwd ()
362 .\"O is present in POSIX.1-2001, but marked LEGACY.
363 .BR getwd ()
364 ¤Ï POSIX.1-2001 ¤Ë¸ºß¤·¤Æ¤¤¤ë¤¬¡¢¡Ö²áµî¤Î̾»Ä(LEGACY)¡×¤È¤µ¤ì¤Æ¤¤¤ë¡£
365 .\"O POSIX.1-2008 removes the specification of
366 .\"O .BR getwd ().
367 .\"O Use
368 .\"O .BR getcwd ()
369 .\"O instead.
370 .\"O POSIX.1-2001
371 .\"O does not define any errors for
372 .\"O .BR getwd ().
373 POSIX.1-2008 ¤Ç¤Ï¡¢
374 .BR getwd ()
375 ¤Î»ÅÍͤ¬ºï½ü¤µ¤ì¤Æ¤¤¤ë¡£
376 Âå¤ï¤ê¤Ë
377 .BR getcwd ()
378 ¤ò»È¤¦¤³¤È¡£
379 POSIX.1-2001 ¤Ï
380 .BR getwd ()
381 ¤Ë´Ø¤¹¤ë¥¨¥é¡¼¤òÄêµÁ¤·¤Æ¤¤¤Ê¤¤¡£
382
383 .\"O .BR get_current_dir_name ()
384 .\"O is a GNU extension.
385 .BR get_current_dir_name ()
386 ¤Ï GNU ³ÈÄ¥¤Ç¤¢¤ë¡£
387 .\"O .SH NOTES
388 .SH Ãí°Õ
389 .\"O Under Linux, the function
390 .\"O .BR getcwd ()
391 .\"O is a system call (since 2.1.92).
392 Linux ¤Ç¤Ï (2.1.92 °Ê¹ß)¡¢
393 .BR getcwd ()
394 ¤Ï¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ç¤¢¤ë¡£
395 .\"O On older systems it would query
396 .\"O .IR /proc/self/cwd .
397 ¸Å¤¤¥·¥¹¥Æ¥à¤Ç¤Ï
398 .I /proc/self/cwd
399 ¤ò»²¾È¤¹¤ë¡£
400 .\"O If both system call and proc file system are missing, a
401 .\"O generic implementation is called.
402 .\"O Only in that case can
403 .\"O these calls fail under Linux with
404 .\"O .BR EACCES .
405 ¥·¥¹¥Æ¥à¥³¡¼¥ë¤â proc ¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤â¤Ê¤¤¾ì¹ç¡¢
406 °ìÈÌŪ¤Ê¼ÂÁõ¤¬¸Æ¤Ó½Ð¤µ¤ì¤ë¡£
407 ¤³¤Î¾ì¹ç¤Ë¤ª¤¤¤Æ¤Î¤ß¡¢(Linux ¤Ç¤Ï) ¤³¤Î´Ø¿ô¤Ï
408 .B EACCES
409 ¤Ç¼ºÇÔ¤¹¤ë²ÄǽÀ­¤¬¤¢¤ë¡£
410 .LP
411 .\"O These functions are often used to save the location of the current working
412 .\"O directory for the purpose of returning to it later.
413 .\"O Opening the current
414 .\"O directory (".") and calling
415 .\"O .BR fchdir (2)
416 .\"O to return is usually a faster and more reliable alternative when sufficiently
417 .\"O many file descriptors are available, especially on platforms other than Linux.
418 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¤·¤Ð¤·¤Ð¥«¥ì¥ó¥È¥ï¡¼¥­¥ó¥°¥Ç¥£¥ì¥¯¥È¥ê¤Î°ÌÃÖ¤òÊݸ¤·¡¢
419 ¸å¤ÇÌá¤Ã¤Æ¤¯¤ë¤¿¤á¤ËÍøÍѤµ¤ì¤ë¡£
420 ̤»ÈÍѤΥե¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬½½Ê¬¤¢¤ë¾ì¹ç¤Ï¡¢
421 ¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê (".") ¤ò³«¤¤¤Æ
422 .BR fchdir (2)
423 ¤ò¸Æ¤Ó½Ð¤¹¤Û¤¦¤¬ÉáÄ̤Ϲ⮤ǿ®ÍêÀ­¤¬¤¢¤ë¡£
424 ÆäˠLinux °Ê³°¤Î¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¾ì¹ç¤Ï¤½¤¦¤Ç¤¢¤ë¡£
425 .\"O .SH "SEE ALSO"
426 .SH ´ØÏ¢¹àÌÜ
427 .BR chdir (2),
428 .BR fchdir (2),
429 .BR open (2),
430 .BR unlink (2),
431 .BR free (3),
432 .BR malloc (3)