1 .\" Copyright (c) 1990, 1991 The Regents of the University of California.
2 .\" All rights reserved.
4 .\" This code is derived from software contributed to Berkeley by
5 .\" Chris Torek and the American National Standards Committee X3,
6 .\" on Information Processing Systems.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
16 .\" 3. All advertising materials mentioning features or use of this software
17 .\" must display the following acknowledgement:
18 .\" This product includes software developed by the University of
19 .\" California, Berkeley and its contributors.
20 .\" 4. Neither the name of the University nor the names of its contributors
21 .\" may be used to endorse or promote products derived from this software
22 .\" without specific prior written permission.
24 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
25 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
28 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .\" @(#)fopen.3 6.8 (Berkeley) 6/29/91
38 .\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu
39 .\" Modified, aeb, 960421, 970806
40 .\" Modified, joey, aeb, 2002-01-03
42 .\" Japanese Version Copyright (c) 1997 YOSHINO Takashi
43 .\" all rights reserved.
44 .\" Translated Thu Feb 13 12:10:38 JST 1997
45 .\" by YOSHINO Takashi <yoshino@civil.jcn.nihon-u.ac.jp>
46 .\" Updated & Modified Mon Mar 1 1999
47 .\" by NAKANO Takeo <nakano@apm.seikei.ac.jp>
48 .\" Updated 1999-12-08, Kentaro Shirakata <argrath@ub32.org>
49 .\" Updated 2001-12-13, Kentaro Shirakata <argrath@ub32.org>
50 .\" Updated 2002-03-23, Kentaro Shirakata <argrath@ub32.org>
51 .\" Updated 2005-10-15, Kentaro Shirakata <argrath@ub32.org>
52 .\" Updated 2006-07-20, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
54 .\"WORD: file descriptor ¥Õ¥¡¥¤¥ëµ½Ò»Ò
55 .\"WORD: file position indicator ¥Õ¥¡¥¤¥ë°ÌÃֻؼ¨»Ò
56 .\"WORD: indicator »Ø¼¨»Ò
57 .\"WORD: global variable Âç°èÊÑ¿ô
58 .\"WORD: cancellation points ¼è¤ê¾Ã¤·¥Ý¥¤¥ó¥È
60 .TH FOPEN 3 2009-02-23 "GNU" "Linux Programmer's Manual"
62 .\"O fopen, fdopen, freopen \- stream open functions
63 fopen, fdopen, freopen \- ¥¹¥È¥ê¡¼¥à¤ò³«¤¯´Ø¿ô
68 .BI "FILE *fopen(const char *" path ", const char *" mode );
70 .BI "FILE *fdopen(int " fd ", const char *" mode );
72 .BI "FILE *freopen(const char *" path ", const char *" mode ", FILE *" stream );
76 .\"O Feature Test Macro Requirements for glibc (see
77 .\"O .BR feature_test_macros (7)):
78 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
79 .RB ( feature_test_macros (7)
84 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
88 .\"O function opens the file whose name is the string pointed to by
90 .\"O and associates a stream with it.
94 ¤Ç»ØÄꤵ¤ì¤¿Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤ò³«¤¡¢¥¹¥È¥ê¡¼¥à¤È·ë¤Ó¤Ä¤±¤ë¡£
98 .\"O points to a string beginning with one of the following sequences
99 .\"O (Additional characters may follow these sequences.):
102 ¤Ï¡¢°Ê²¼¤Ë³¤¯Ê¸»ú¤Î¤Ò¤È¤Ä¤«¤é»Ï¤Þ¤ëʸ»úÎó¤Ø¤Î¥Ý¥¤¥ó¥¿¤Ç¤¢¤ë
103 (ÄɲäÎʸ»ú¤¬¤³¤Îʸ»ú¤Î¸å¤Ë³¤¯¤³¤È¤â¤¢¤ë):
106 .\"O Open text file for reading.
107 .\"O The stream is positioned at the beginning of the file.
108 ¥Æ¥¥¹¥È¥Õ¥¡¥¤¥ë¤òÆɤ߽Ф¹¤¿¤á¤Ë³«¤¯¡£
109 ¥¹¥È¥ê¡¼¥à¤Ï¥Õ¥¡¥¤¥ë¤ÎÀèƬ¤Ë°ÌÃÖ¤µ¤ì¤ë¡£
112 .\"O Open for reading and writing.
113 .\"O The stream is positioned at the beginning of the file.
114 Æɤ߽Ф·¤ª¤è¤Ó½ñ¤¹þ¤ß¤¹¤ë¤¿¤á¤Ë³«¤¯¡£
115 ¥¹¥È¥ê¡¼¥à¤Ï¥Õ¥¡¥¤¥ë¤ÎÀèƬ¤Ë°ÌÃÖ¤µ¤ì¤ë¡£
118 .\"O Truncate file to zero length or create text file for writing.
119 .\"O The stream is positioned at the beginning of the file.
120 ¥Õ¥¡¥¤¥ë¤ò½ñ¤¹þ¤ß¤Î¤¿¤á¤Ë³«¤¯¡£
121 ¥Õ¥¡¥¤¥ë¤¬´û¤Ë¸ºß¤¹¤ë¾ì¹ç¤Ë¤ÏŤµ¥¼¥í¤ËÀÚ¤êµÍ¤á¤ë¡£
122 ¥Õ¥¡¥¤¥ë¤¬¤Ê¤«¤Ã¤¿¾ì¹ç¤Ë¤Ï¿·¤¿¤ËºîÀ®¤¹¤ë¡£
123 ¥¹¥È¥ê¡¼¥à¤Ï¥Õ¥¡¥¤¥ë¤ÎÀèƬ¤Ë°ÌÃÖ¤µ¤ì¤ë¡£
126 .\"O Open for reading and writing.
127 .\"O The file is created if it does not exist, otherwise it is truncated.
128 .\"O The stream is positioned at the beginning of the file.
129 Æɤ߽Ф·¤ª¤è¤Ó½ñ¤¹þ¤ß¤Î¤¿¤á¤Ë³«¤¯¡£
130 ¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¿·¤¿¤ËºîÀ®¤¹¤ë¡£
131 ¸ºß¤·¤Æ¤¤¤ë¾ì¹ç¤Ë¤ÏŤµ¥¼¥í¤ËÀÚ¤êµÍ¤á¤é¤ì¤ë¡£
132 ¥¹¥È¥ê¡¼¥à¤Ï¥Õ¥¡¥¤¥ë¤ÎÀèƬ¤Ë°ÌÃÖ¤µ¤ì¤ë¡£
135 .\"O Open for appending (writing at end of file).
136 .\"O The file is created if it does not exist.
137 .\"O The stream is positioned at the end of the file.
138 Äɲà (¥Õ¥¡¥¤¥ë¤ÎºÇ¸å¤Ë½ñ¤¹þ¤à) ¤Î¤¿¤á¤Ë³«¤¯¡£
139 ¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¿·¤¿¤ËºîÀ®¤¹¤ë¡£
140 ¥¹¥È¥ê¡¼¥à¤Ï¥Õ¥¡¥¤¥ë¤ÎºÇ¸å¤Ë°ÌÃÖ¤µ¤ì¤ë¡£
143 .\"O Open for reading and appending (writing at end of file).
144 .\"O The file is created if it does not exist.
145 .\"O The initial file position for reading is at the beginning of the file,
146 .\"O but output is always appended to the end of the file.
147 Æɤ߽Ф·¤ª¤è¤ÓÄɲà (¥Õ¥¡¥¤¥ë¤ÎºÇ¸å¤Ë½ñ¤¹þ¤à) ¤Î¤¿¤á¤Ë³«¤¯¡£
148 ¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¿·¤¿¤ËºîÀ®¤¹¤ë¡£
149 Æɤ߽Ф·¤Î½é´ü¥Õ¥¡¥¤¥ë°ÌÃ֤ϥե¡¥¤¥ë¤ÎÀèƬ¤Ç¤¢¤ë¤¬¡¢
150 ½ñ¤¹þ¤ß¤Ï¾ï¤Ë¥Õ¥¡¥¤¥ë¤ÎºÇ¸å¤ËÄɲ䵤ì¤ë¡£
154 .\"O string can also include the letter \(aqb\(aq either as a last character or as
155 .\"O a character between the characters in any of the two-character strings
156 .\"O described above.
157 .\"O This is strictly for compatibility with C89
158 .\"O and has no effect; the \(aqb\(aq is ignored on all POSIX
159 .\"O conforming systems, including Linux.
161 ʸ»úÎó¤Ë¤Ïʸ»ú \(aqb\(aq ¤òÄɲûØÄꤹ¤ë¤³¤È¤¬¤Ç¤¡¢
163 ʸ»úÎó¤ÎºÇ¸å¤Îʸ»ú¤È¤·¤Æ»ØÄꤹ¤ë¡£
164 ¾åµ¤Î¤¦¤Á 2 ʸ»ú¤Î¥â¡¼¥É¤Î¾ì¹ç¤Ë¤Ï 2 ¤Ä¤Îʸ»ú¤Î´Ö¤Ë»ØÄꤹ¤ë¤³¤È¤â¤Ç¤¤ë¡£
165 ¤³¤ì¤Ï C89 ¤È¤Î¸ß´¹À¤Î¤¿¤á¤À¤±¤ËÍÑ°Õ¤µ¤ì¤¿
166 ¤â¤Î¤Ç¤¢¤ê¡¢´Ø¿ô¤Î¼Â¹Ô¤ËÂФ·¤Æ¤Ï¤¤¤«¤Ê¤ë±Æ¶Á¤â»ý¤¿¤Ê¤¤¡£
167 ¤¹¤Ê¤ï¤Á¡¢Linux ¤ò´Þ¤àÁ´¤Æ¤Î POSIX ½àµò¥·¥¹¥Æ¥à¤Ç¤Ï¡¢
168 ¤³¤Î \(aqb\(aq ¤Ï̵»ë¤µ¤ì¤ë¡£
169 .\"O (Other systems may treat text files and binary files differently,
170 .\"O and adding the \(aqb\(aq may be a good idea if you do I/O to a binary
171 .\"O file and expect that your program may be ported to non-UNIX
173 (¤½¤Î¾¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¥Æ¥¥¹¥È¥Õ¥¡¥¤¥ë¤È¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë¤òÊÌ¡¹¤Ë°·¤¦¤â¤Î¤â¤¢¤ë¤Î¤Ç¡¢
174 ¤â¤·¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë¤ÎÆþ½ÐÎϤò¹Ô¤¤¡¢
175 ¤½¤Î¥×¥í¥°¥é¥à¤¬Èó UNIX ´Ä¶¤Ø°Ü¿¢¤µ¤ì¤ë¤Èͽ¬¤¹¤ë¤Ê¤é¡¢
176 \(aqb\(aq¤òÉÕ¤±¤Æ¤ª¤¯¤Î¤ÏÎɤ¤¹Í¤¨¤Ç¤¢¤ë)
178 .\"O See NOTES below for details of glibc extensions for
181 ¤Î glibc ¤Ë¤è¤ë³ÈÄ¥¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï²¼µ¤Î¡ÖÃí°Õ¡×¤ò»²¾È¡£
183 .\"O Any created files will have mode
184 .\"O .BR S_IRUSR " | " S_IWUSR " | " S_IRGRP " | " S_IWGRP " | " S_IROTH " | " S_IWOTH
185 .\"O (0666), as modified by the process's umask value (see
187 ¤¹¤Ù¤Æ¤ÎÀ¸À®¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Ï¡¢
188 .BR S_IRUSR " | " S_IWUSR " | " S_IRGRP " | " S_IWGRP " | " S_IROTH " | " S_IWOTH
190 ¤½¤Î¥×¥í¥»¥¹¤Î umask Ãͤˤè¤Ã¤Æ½¤Àµ¤·¤¿¥â¡¼¥É¤ò»ý¤Ä
194 .\"O Reads and writes may be intermixed on read/write streams in any order.
195 .\"O Note that ANSI C requires that a file positioning function intervene
196 .\"O between output and input, unless an input operation encounters end-of-file.
197 .\"O (If this condition is not met, then a read is allowed to return the
198 .\"O result of writes other than the most recent.)
199 .\"O Therefore it is good practice (and indeed sometimes necessary
200 .\"O under Linux) to put an
204 .\"O operation between write and read operations on such a stream.
205 .\"O This operation may be an apparent no-op
206 .\"O (as in \fIfseek(..., 0L, SEEK_CUR)\fP
207 .\"O called for its synchronizing side effect.
208 Æɤ߽Ф·/½ñ¤¹þ¤ß¥¹¥È¥ê¡¼¥à¤ËÂФ·¤Æ¤ÏǤ°Õ¤Î½ç½ø¤ÇÆɤ߽ñ¤¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤¤ë¡£
210 (ÆþÎÏÁàºî¤¬¥Õ¥¡¥¤¥ë¤ÎËöÈø¤ËÅþ㤷¤¿¾ì¹ç¤ò½ü¤¤¤Æ)
211 ½ÐÎϤÈÆþÎϤδ֤ˤϥե¡¥¤¥ë¤Î°ÌÃÖ·è¤á´Ø¿ô¤ò
212 ¶´¤Þ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤³¤È¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤³¤È¤ËÃí°Õ¤µ¤ì¤¿¤¤
213 (¤³¤Î¾ò·ï¤òËþ¤·¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¢Æɤ߹þ¤ßÁàºî¤Ï¡¢
214 ºÇ¸å¤Ë½ñ¤¹þ¤Þ¤ì¤¿¤â¤Î¤Ç¤Ê¤¯¡¢°ÊÁ°¤Ë½ñ¤¹þ¤Þ¤ì¤¿
215 ÃͤòÊÖ¤¹¤³¤È¤òµö¤µ¤ì¤Æ¤¤¤ë)¡£
216 ¤·¤¿¤¬¤Ã¤Æ¡¢¤³¤Î¤è¤¦¤Ê¥¹¥È¥ê¡¼¥à¤Ç¤ÎÆɤ߽ñ¤Áàºî¤Î´Ö¤Ë¤Ï
220 Áàºî¤ò¶´¤ó¤Ç¤ª¤¯¤ÈÎɤ¤¤À¤í¤¦
221 (Linux ¤Ç¤ÏËÜÅö¤ËɬÍפȤʤ뤳¤È¤â¤È¤¤É¤¤¢¤ë)¡£
222 ¤³¤ÎÁàºî¤Ï¸«¤«¤±¾å²¿¤â¤·¤Ê¤¤Áàºî (no-op) ¤Ç¤âÎɤ¤
223 (Î㤨¤Ð \fIfseek(..., 0L, SEEK_CUR)\fP ¤ò
224 ¤½¤ÎÉû¼¡Åª¸ú²Ì¤Ç¤¢¤ëƱ´ü¤Î¤¿¤á¤À¤±¤Ë¸Æ¤Ù¤ÐÎɤ¤)¡£
226 .\"O Opening a file in append mode (\fBa\fP as the first character of
228 .\"O causes all subsequent write operations to this stream to occur
229 .\"O at end-of-file, as if preceded by an
232 .\"O fseek(stream,0,SEEK_END);
238 ¤ÎºÇ½é¤Îʸ»ú¤ò \fBa\fP ¤Ë¤¹¤ë) ¤Ç³«¤¯¤È¡¢
239 ¤³¤Î¥¹¥È¥ê¡¼¥à¤ËÂФ¹¤ë½ñ¤¹þ¤ßÁàºî¤Ï (Àè¤Ë
242 fseek(stream,0,SEEK_END);
245 ¤Î¸Æ¤Ó½Ð¤·¤ò¼Â¹Ô¤·¤¿¤«¤Î¤è¤¦¤Ë) ¥Õ¥¡¥¤¥ëËöÈø¤ËÂФ·¤Æ¹Ô¤ï¤ì¤ë¡£
249 .\"O function associates a stream with the existing file descriptor,
252 ´Ø¿ô¤Ï¡¢´û¸¤Î¥Õ¥¡¥¤¥ëµ½Ò»Ò
254 ¤Ë¥¹¥È¥ê¡¼¥à¤ò·ë¤Ó¤Ä¤±¤ë¡£
257 .\"O of the stream (one of the values "r", "r+", "w", "w+", "a", "a+")
258 .\"O must be compatible with the mode of the file descriptor.
261 ("r", "r+", "w", "w+", "a", "a+" ¤Î¤¤¤º¤ì¤«) ¤Ï
262 ¥Õ¥¡¥¤¥ëµ½Ò»Ò¤Î¥â¡¼¥É¤È¸ß´¹¤Î¤â¤Î¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
263 .\"O The file position indicator of the new stream is set to that
266 .\"O and the error and end-of-file indicators are cleared.
267 .\"O Modes "w" or "w+" do not cause truncation of the file.
268 ¿·¤·¤¤¥¹¥È¥ê¡¼¥à¤Î¥Õ¥¡¥¤¥ë°ÌÃֻؼ¨»Ò¤Ï
270 ¤Ë°¤·¤Æ¤¤¤ëÃͤËÀßÄꤵ¤ì¤ë¡£
271 error ¤È end-of-file ¤Î³Æ»Ø¼¨»Ò¤Ï¥¯¥ê¥¢¤µ¤ì¤ë¡£
272 "w" ¤ª¤è¤Ó "w+" ¥â¡¼¥É¤Ç¤Î¥Õ¥¡¥¤¥ë¤ÎÀÚ¤êµÍ¤á¤Ï¹Ô¤ï¤ì¤Ê¤¤¡£
273 .\"O The file descriptor is not dup'ed, and will be closed when
274 .\"O the stream created by
277 .\"O The result of applying
279 .\"O to a shared memory object is undefined.
280 ¥Õ¥¡¥¤¥ëµ½Ò»Ò¤ÎÊ£À½¤Ï¹Ô¤Ê¤ï¤ì¤Ê¤¤¡£
282 ¤ÇºîÀ®¤µ¤ì¤¿¥¹¥È¥ê¡¼¥à¤¬ÊĤ¸¤é¤ì¤¿¤È¤¤Ë¥Õ¥¡¥¤¥ëµ½Ò»Ò¤â
284 ¶¦Í¥á¥â¥ê¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ø
286 ¤ò¹Ô¤Ã¤¿¤È¤¤Î·ë²Ì¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
290 .\"O function opens the file whose name is the string pointed to by
292 .\"O and associates the stream pointed to by
295 .\"O The original stream (if it exists) is closed.
298 .\"O argument is used just as in the
301 .\"O The primary use of the
303 .\"O function is to change the file associated with a standard text stream
304 .\"O .RI ( stderr ", " stdin ", or " stdout ).
308 ¤Ç̾Á°¤¬»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤ò³«¤¡¢
310 ¤Ç»ØÄꤵ¤ì¤¿¥¹¥È¥ê¡¼¥à¤Ë¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤ò·ë¤Ó¤Ä¤±¤ë¡£
311 ¤â¤È¤Î¥¹¥È¥ê¡¼¥à¤Ï (¤â¤·Â¸ºß¤¹¤ë¾ì¹ç¤Ë¤Ï) ÊĤ¸¤é¤ì¤ë¡£
315 ´Ø¿ô¤ÈƱ¤¸·Á¤Ç»È¤ï¤ì¤ë¡£
317 ´Ø¿ô¤Î¼ç¤ÊÍÑÅӤϡ¢É¸½à¥Æ¥¥¹¥È¥¹¥È¥ê¡¼¥à
318 .RI ( stderr ", " stdin ", " stdout )
319 ¤ÈÂбþÉÕ¤±¤é¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤òÊѹ¹¤¹¤ë¤³¤È¤Ç¤¢¤ë¡£
321 .\"O Upon successful completion
329 .\"O Otherwise, NULL is returned and
331 .\"O is set to indicate the error.
338 ¼ºÇÔ¤¹¤ë¤È NULL ¤¬ÊÖ¤µ¤ì¡¢
340 ¤¬¥¨¥é¡¼¤ò¼¨¤¹Ãͤ˥»¥Ã¥È¤µ¤ì¤ë¡£
364 .\"O functions may also fail and set
366 .\"O for any of the errors specified for the routine
373 ¥ë¡¼¥Á¥ó¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¥¨¥é¡¼¤Ç¤â¼ºÇÔ¤¹¤ë¤³¤È¤¬¤¢¤ê¡¢
380 .\"O function may also fail and set
382 .\"O for any of the errors specified for the routine
387 ¥ë¡¼¥Á¥ó¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¥¨¥é¡¼¤Ç¤â¼ºÇÔ¤¹¤ë¤³¤È¤¬¤¢¤ê¡¢
394 .\"O function may also fail and set
396 .\"O for any of the errors specified for the routine
401 ¥ë¡¼¥Á¥ó¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¥¨¥é¡¼¤Ç¤â¼ºÇÔ¤¹¤ë¤³¤È¤¬¤¢¤ê¡¢
408 .\"O function may also fail and set
410 .\"O for any of the errors specified for the routines
420 ³Æ¥ë¡¼¥Á¥ó¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¥¨¥é¡¼¤Ç¤â¼ºÇÔ¤¹¤ë¤³¤È¤¬¤¢¤ê¡¢
429 .\"O functions conform to C89.
432 .\"O function conforms to POSIX.1-1990.
436 ´Ø¿ô¤Ï C89¤Ë½àµò¤·¤Æ¤¤¤ë¡£
438 ´Ø¿ô¤Ï POSIX.1-1990 ¤Ë½àµò¤·¤Æ¤¤¤ë¡£
443 .\"O The GNU C library allows the following extensions for the string specified in
445 GNU C ¥é¥¤¥Ö¥é¥ê¤Ç¤Ï¡¢
447 ¤Ë»ØÄê¤Ç¤¤ëʸ»úÎó¤È¤·¤Æ¡¢°Ê²¼¤Î³ÈÄ¥¤¬¹Ô¤ï¤ì¤Æ¤¤¤ë:
449 .\"O .BR c " (since glibc 2.3.3)"
450 .BR c " (glibc 2.3.3 °Ê¹ß)"
451 .\"O Do not make the open operation,
452 .\"O or subsequent read and write operations,
453 .\"O thread cancellation points.
454 open Áàºî¡¢¤½¤ì¤Ë³¤¯ read/write Áàºî¤Î¡¢
455 ¥¹¥ì¥Ã¥É¤Î¼è¤ê¾Ã¤·¥Ý¥¤¥ó¥È (cancellation points)
458 .\"O .BR e " (since glibc 2.7)"
459 .BR e " (glibc 2.7 °Ê¹ß)"
460 .\"O Open the file with the
465 .\"O for more information.
467 ¥Õ¥é¥°¤ò͸ú¤Ë¤·¤Æ¥Õ¥¡¥¤¥ë¤ò¥ª¡¼¥×¥ó¤¹¤ë¡£
472 .\"O .BR m " (since glibc 2.3)"
473 .BR m " (glibc 2.3 °Ê¹ß)"
474 .\"O Attempt to access the file using
476 .\"O rather than I/O system calls
480 .\"O .\" As at glibc 2.4:
483 .\"O is only attempted for a file opened for reading.
489 ¤ò»È¤Ã¤Æ¥Õ¥¡¥¤¥ë¤Ë¥¢¥¯¥»¥¹¤·¤è¤¦¤È¤¹¤ë¡£
492 ¤ò»È¤ª¤¦¤È¤¹¤ë¤Î¤Ï¡¢Æɤ߽Ф·ÍѤ˥ª¡¼¥×¥ó¤¹¤ë¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¤À¤±¤Ç¤¢¤ë¡£
495 .\"O Open the file exclusively
500 .\"O If the file already exists,
506 ¥Õ¥¡¥¤¥ë¤òÇÓ¾Ū¤Ë¥ª¡¼¥×¥ó¤¹¤ë
511 ¥Õ¥¡¥¤¥ë¤¬¤¹¤Ç¤Ë¸ºß¤¹¤ë¾ì¹ç¡¢
518 .\"O This flag is ignored for
523 .\" FIXME document /,ccs= charset/