OSDN Git Service

Unwrap ja.po to simplify upcoming replacements
[linuxjm/LDP_man-pages.git] / po4a / stdio / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:25+0900\n"
10 "PO-Revision-Date: 2015-01-24 20:57+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
13 "Language: \n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #. type: TH
19 #: build/C/man3/asprintf.3:27
20 #, no-wrap
21 msgid "ASPRINTF"
22 msgstr "ASPRINTF"
23
24 #. type: TH
25 #: build/C/man3/asprintf.3:27 build/C/man3/fcloseall.3:25
26 #: build/C/man3/fmtmsg.3:13 build/C/man3/stdio_ext.3:25
27 #, no-wrap
28 msgid "2013-06-21"
29 msgstr "2013-06-21"
30
31 #. type: TH
32 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
33 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
34 #: build/C/man3/fcloseall.3:25 build/C/man3/fflush.3:45
35 #: build/C/man3/fgetc.3:27 build/C/man3/fgetwc.3:18 build/C/man3/fmemopen.3:10
36 #: build/C/man3/fopen.3:44 build/C/man3/fputwc.3:16 build/C/man3/fread.3:45
37 #: build/C/man3/fseek.3:42 build/C/man3/getline.3:26 build/C/man3/gets.3:29
38 #: build/C/man3/getw.3:25 build/C/man3/popen.3:40 build/C/man3/printf.3:34
39 #: build/C/man3/puts.3:26 build/C/man3/remove.3:31 build/C/man3/scanf.3:52
40 #: build/C/man3/wprintf.3:16
41 #, no-wrap
42 msgid "GNU"
43 msgstr "GNU"
44
45 #. type: TH
46 #: build/C/man3/asprintf.3:27 build/C/man3/ctermid.3:26
47 #: build/C/man3/dprintf.3:26 build/C/man3/fclose.3:44
48 #: build/C/man3/fcloseall.3:25 build/C/man3/ferror.3:44
49 #: build/C/man3/fflush.3:45 build/C/man3/fgetc.3:27 build/C/man3/fgetwc.3:18
50 #: build/C/man3/flockfile.3:25 build/C/man3/fmemopen.3:10
51 #: build/C/man3/fmtmsg.3:13 build/C/man3/fopen.3:44
52 #: build/C/man3/fopencookie.3:26 build/C/man3/fpurge.3:25
53 #: build/C/man3/fputwc.3:16 build/C/man3/fread.3:45 build/C/man3/fseek.3:42
54 #: build/C/man3/fseeko.3:25 build/C/man3/getline.3:26 build/C/man3/gets.3:29
55 #: build/C/man3/getw.3:25 build/C/man2/link.2:32 build/C/man2/llseek.2:28
56 #: build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25 build/C/man2/open.2:51
57 #: build/C/man2/open_by_handle_at.2:25 build/C/man3/perror.3:31
58 #: build/C/man2/pipe.2:36 build/C/man3/popen.3:40 build/C/man3/printf.3:34
59 #: build/C/man3/puts.3:26 build/C/man2/read.2:35 build/C/man2/readlink.2:44
60 #: build/C/man2/readv.2:32 build/C/man3/remove.3:31 build/C/man2/rename.2:33
61 #: build/C/man2/rmdir.2:30 build/C/man3/scanf.3:52 build/C/man3/setbuf.3:48
62 #: build/C/man3/stdin.3:13 build/C/man3/stdio.3:39 build/C/man3/stdio_ext.3:25
63 #: build/C/man2/symlink.2:33 build/C/man7/symlink.7:37
64 #: build/C/man3/tempnam.3:25 build/C/man3/tmpfile.3:31
65 #: build/C/man3/tmpnam.3:27 build/C/man2/unlink.2:33
66 #: build/C/man3/unlocked_stdio.3:25 build/C/man3/wprintf.3:16
67 #: build/C/man2/write.2:39
68 #, no-wrap
69 msgid "Linux Programmer's Manual"
70 msgstr "Linux Programmer's Manual"
71
72 #. type: SH
73 #: build/C/man3/asprintf.3:28 build/C/man3/ctermid.3:27
74 #: build/C/man3/dprintf.3:27 build/C/man3/fclose.3:45
75 #: build/C/man3/fcloseall.3:26 build/C/man3/ferror.3:45
76 #: build/C/man3/fflush.3:46 build/C/man3/fgetc.3:28 build/C/man3/fgetwc.3:19
77 #: build/C/man3/flockfile.3:26 build/C/man3/fmemopen.3:11
78 #: build/C/man3/fmtmsg.3:14 build/C/man3/fopen.3:45
79 #: build/C/man3/fopencookie.3:27 build/C/man3/fpurge.3:26
80 #: build/C/man3/fputwc.3:17 build/C/man3/fread.3:46 build/C/man3/fseek.3:43
81 #: build/C/man3/fseeko.3:26 build/C/man3/getline.3:27 build/C/man3/gets.3:30
82 #: build/C/man3/getw.3:26 build/C/man2/link.2:33 build/C/man2/llseek.2:29
83 #: build/C/man2/lseek.2:48 build/C/man3/lseek64.3:26 build/C/man2/open.2:52
84 #: build/C/man2/open_by_handle_at.2:26 build/C/man3/perror.3:32
85 #: build/C/man2/pipe.2:37 build/C/man3/popen.3:41 build/C/man3/printf.3:35
86 #: build/C/man3/puts.3:27 build/C/man2/read.2:36 build/C/man2/readlink.2:45
87 #: build/C/man2/readv.2:33 build/C/man3/remove.3:32 build/C/man2/rename.2:34
88 #: build/C/man2/rmdir.2:31 build/C/man3/scanf.3:53 build/C/man3/setbuf.3:49
89 #: build/C/man3/stdin.3:14 build/C/man3/stdio.3:40 build/C/man3/stdio_ext.3:26
90 #: build/C/man2/symlink.2:34 build/C/man7/symlink.7:38
91 #: build/C/man3/tempnam.3:26 build/C/man3/tmpfile.3:32
92 #: build/C/man3/tmpnam.3:28 build/C/man2/unlink.2:34
93 #: build/C/man3/unlocked_stdio.3:26 build/C/man3/wprintf.3:17
94 #: build/C/man2/write.2:40
95 #, no-wrap
96 msgid "NAME"
97 msgstr "名前"
98
99 #. type: Plain text
100 #: build/C/man3/asprintf.3:30
101 msgid "asprintf, vasprintf - print to allocated string"
102 msgstr "asprintf, vasprintf - 文字列を割り当ててそれに出力する"
103
104 #. type: SH
105 #: build/C/man3/asprintf.3:30 build/C/man3/ctermid.3:29
106 #: build/C/man3/dprintf.3:29 build/C/man3/fclose.3:47
107 #: build/C/man3/fcloseall.3:28 build/C/man3/ferror.3:47
108 #: build/C/man3/fflush.3:48 build/C/man3/fgetc.3:30 build/C/man3/fgetwc.3:21
109 #: build/C/man3/flockfile.3:28 build/C/man3/fmemopen.3:13
110 #: build/C/man3/fmtmsg.3:16 build/C/man3/fopen.3:47
111 #: build/C/man3/fopencookie.3:29 build/C/man3/fpurge.3:28
112 #: build/C/man3/fputwc.3:19 build/C/man3/fread.3:48 build/C/man3/fseek.3:45
113 #: build/C/man3/fseeko.3:28 build/C/man3/getline.3:29 build/C/man3/gets.3:32
114 #: build/C/man3/getw.3:28 build/C/man2/link.2:35 build/C/man2/llseek.2:31
115 #: build/C/man2/lseek.2:50 build/C/man3/lseek64.3:28 build/C/man2/open.2:54
116 #: build/C/man2/open_by_handle_at.2:29 build/C/man3/perror.3:34
117 #: build/C/man2/pipe.2:39 build/C/man3/popen.3:43 build/C/man3/printf.3:38
118 #: build/C/man3/puts.3:29 build/C/man2/read.2:38 build/C/man2/readlink.2:47
119 #: build/C/man2/readv.2:35 build/C/man3/remove.3:34 build/C/man2/rename.2:36
120 #: build/C/man2/rmdir.2:33 build/C/man3/scanf.3:55 build/C/man3/setbuf.3:51
121 #: build/C/man3/stdin.3:16 build/C/man3/stdio.3:42 build/C/man3/stdio_ext.3:30
122 #: build/C/man2/symlink.2:36 build/C/man3/tempnam.3:28
123 #: build/C/man3/tmpfile.3:34 build/C/man3/tmpnam.3:30 build/C/man2/unlink.2:36
124 #: build/C/man3/unlocked_stdio.3:29 build/C/man3/wprintf.3:20
125 #: build/C/man2/write.2:42
126 #, no-wrap
127 msgid "SYNOPSIS"
128 msgstr "書式"
129
130 #. type: Plain text
131 #: build/C/man3/asprintf.3:32
132 msgid "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */"
133 msgstr "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */"
134
135 #. type: Plain text
136 #: build/C/man3/asprintf.3:34 build/C/man3/dprintf.3:31
137 #: build/C/man3/fclose.3:49 build/C/man3/ferror.3:49 build/C/man3/fflush.3:50
138 #: build/C/man3/fseek.3:47 build/C/man3/perror.3:36 build/C/man3/printf.3:40
139 #: build/C/man3/remove.3:36 build/C/man3/stdio.3:44
140 #: build/C/man3/stdio_ext.3:32
141 msgid "B<#include E<lt>stdio.hE<gt>>"
142 msgstr "B<#include E<lt>stdio.hE<gt>>"
143
144 #. type: Plain text
145 #: build/C/man3/asprintf.3:36
146 msgid "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
147 msgstr "B<int asprintf(char **>I<strp>B<, const char *>I<fmt>B<, ...);>"
148
149 #. type: Plain text
150 #: build/C/man3/asprintf.3:38
151 msgid "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
152 msgstr "B<int vasprintf(char **>I<strp>B<, const char *>I<fmt>B<, va_list >I<ap>B<);>"
153
154 #. type: SH
155 #: build/C/man3/asprintf.3:38 build/C/man3/ctermid.3:46
156 #: build/C/man3/dprintf.3:55 build/C/man3/fclose.3:51
157 #: build/C/man3/fcloseall.3:35 build/C/man3/ferror.3:65
158 #: build/C/man3/fflush.3:52 build/C/man3/fgetc.3:44 build/C/man3/fgetwc.3:30
159 #: build/C/man3/flockfile.3:51 build/C/man3/fmemopen.3:46
160 #: build/C/man3/fmtmsg.3:26 build/C/man3/fopen.3:65
161 #: build/C/man3/fopencookie.3:37 build/C/man3/fpurge.3:42
162 #: build/C/man3/fputwc.3:28 build/C/man3/fread.3:58 build/C/man3/fseek.3:57
163 #: build/C/man3/fseeko.3:54 build/C/man3/getline.3:58 build/C/man3/gets.3:38
164 #: build/C/man3/getw.3:59 build/C/man2/link.2:66 build/C/man2/llseek.2:43
165 #: build/C/man2/lseek.2:56 build/C/man3/lseek64.3:36 build/C/man2/open.2:88
166 #: build/C/man2/open_by_handle_at.2:43 build/C/man3/perror.3:55
167 #: build/C/man2/pipe.2:51 build/C/man3/popen.3:64 build/C/man3/printf.3:76
168 #: build/C/man3/puts.3:43 build/C/man2/read.2:44 build/C/man2/readlink.2:86
169 #: build/C/man2/readv.2:58 build/C/man3/remove.3:38 build/C/man2/rename.2:72
170 #: build/C/man2/rmdir.2:37 build/C/man3/scanf.3:87 build/C/man3/setbuf.3:73
171 #: build/C/man3/stdin.3:24 build/C/man3/stdio.3:50 build/C/man3/stdio_ext.3:54
172 #: build/C/man2/symlink.2:74 build/C/man7/symlink.7:40
173 #: build/C/man3/tempnam.3:42 build/C/man3/tmpfile.3:40
174 #: build/C/man3/tmpnam.3:36 build/C/man2/unlink.2:66
175 #: build/C/man3/unlocked_stdio.3:106 build/C/man3/wprintf.3:58
176 #: build/C/man2/write.2:46
177 #, no-wrap
178 msgid "DESCRIPTION"
179 msgstr "説明"
180
181 #. type: Plain text
182 #: build/C/man3/asprintf.3:53
183 msgid "The functions B<asprintf>()  and B<vasprintf>()  are analogs of B<sprintf>(3)  and B<vsprintf>(3), except that they allocate a string large enough to hold the output including the terminating null byte (\\(aq\\e0\\(aq), and return a pointer to it via the first argument.  This pointer should be passed to B<free>(3)  to release the allocated storage when it is no longer needed."
184 msgstr "B<asprintf>()  関数と B<vasprintf>()  関数とは、それぞれ B<sprintf>(3)  関数と B<vsprintf>(3)  関数とに似ているが、 出力文字列を (終端のヌルバイト (\\(aq\\e0\\(aq) も含めて)  保持するのに十分な大きさのメモリを確保し、 最初の引数にその文字列へのポインタを返す。 このポインタは、不要になったら B<free>(3)  に渡し、割り当てられた記憶領域を解放すべきである。"
185
186 #. type: SH
187 #: build/C/man3/asprintf.3:53 build/C/man3/ctermid.3:59
188 #: build/C/man3/fclose.3:59 build/C/man3/fcloseall.3:50
189 #: build/C/man3/fflush.3:74 build/C/man3/fgetc.3:99 build/C/man3/fgetwc.3:55
190 #: build/C/man3/flockfile.3:120 build/C/man3/fmemopen.3:180
191 #: build/C/man3/fmtmsg.3:152 build/C/man3/fopen.3:189
192 #: build/C/man3/fopencookie.3:238 build/C/man3/fpurge.3:58
193 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/fseek.3:121
194 #: build/C/man3/fseeko.3:88 build/C/man3/getline.3:112 build/C/man3/gets.3:50
195 #: build/C/man3/getw.3:73 build/C/man2/link.2:187 build/C/man2/llseek.2:62
196 #: build/C/man2/lseek.2:179 build/C/man2/open.2:774
197 #: build/C/man2/open_by_handle_at.2:245 build/C/man2/pipe.2:133
198 #: build/C/man3/popen.3:123 build/C/man3/puts.3:84 build/C/man2/read.2:81
199 #: build/C/man2/readlink.2:153 build/C/man2/readv.2:177
200 #: build/C/man3/remove.3:60 build/C/man2/rename.2:203 build/C/man2/rmdir.2:40
201 #: build/C/man3/scanf.3:530 build/C/man3/setbuf.3:152
202 #: build/C/man2/symlink.2:140 build/C/man3/tempnam.3:94
203 #: build/C/man3/tmpfile.3:47 build/C/man3/tmpnam.3:79
204 #: build/C/man2/unlink.2:153 build/C/man3/wprintf.3:203
205 #: build/C/man2/write.2:89
206 #, no-wrap
207 msgid "RETURN VALUE"
208 msgstr "返り値"
209
210 #. type: Plain text
211 #: build/C/man3/asprintf.3:61
212 msgid "When successful, these functions return the number of bytes printed, just like B<sprintf>(3).  If memory allocation wasn't possible, or some other error occurs, these functions will return -1, and the contents of I<strp> is undefined."
213 msgstr "成功すると、これらの関数は出力されたバイト数を (B<sprintf>(3)  のように) 返す。 メモリの割り当てができなかったり、 その他エラーが生じると、 これらの関数は -1 を返し、 I<strp> の内容は未定義となる。"
214
215 #. type: SH
216 #: build/C/man3/asprintf.3:61 build/C/man3/ctermid.3:67
217 #: build/C/man3/dprintf.3:69 build/C/man3/fclose.3:90
218 #: build/C/man3/fcloseall.3:60 build/C/man3/ferror.3:115
219 #: build/C/man3/fflush.3:98 build/C/man3/fgetc.3:124 build/C/man3/fgetwc.3:70
220 #: build/C/man3/flockfile.3:135 build/C/man3/fmemopen.3:199
221 #: build/C/man3/fmtmsg.3:237 build/C/man3/fopen.3:246
222 #: build/C/man3/fopencookie.3:245 build/C/man3/fpurge.3:70
223 #: build/C/man3/fputwc.3:68 build/C/man3/fread.3:103 build/C/man3/fseek.3:169
224 #: build/C/man3/fseeko.3:102 build/C/man3/getline.3:137 build/C/man3/gets.3:58
225 #: build/C/man3/getw.3:80 build/C/man2/link.2:338 build/C/man2/llseek.2:81
226 #: build/C/man2/lseek.2:217 build/C/man2/open.2:1020
227 #: build/C/man2/open_by_handle_at.2:352 build/C/man3/perror.3:111
228 #: build/C/man2/pipe.2:159 build/C/man3/popen.3:172 build/C/man3/printf.3:825
229 #: build/C/man3/puts.3:103 build/C/man2/read.2:173 build/C/man2/readlink.2:216
230 #: build/C/man2/readv.2:216 build/C/man3/remove.3:75 build/C/man2/rename.2:405
231 #: build/C/man2/rmdir.2:127 build/C/man3/scanf.3:577 build/C/man3/setbuf.3:173
232 #: build/C/man3/stdin.3:113 build/C/man3/stdio.3:246
233 #: build/C/man2/symlink.2:228 build/C/man3/tempnam.3:105
234 #: build/C/man3/tmpfile.3:78 build/C/man3/tmpnam.3:96
235 #: build/C/man2/unlink.2:273 build/C/man3/unlocked_stdio.3:113
236 #: build/C/man3/wprintf.3:211 build/C/man2/write.2:189
237 #, no-wrap
238 msgid "CONFORMING TO"
239 msgstr "準拠"
240
241 #. type: Plain text
242 #: build/C/man3/asprintf.3:67
243 msgid "These functions are GNU extensions, not in C or POSIX.  They are also available under *BSD.  The FreeBSD implementation sets I<strp> to NULL on error."
244 msgstr "これらの関数は GNU の拡張であり、C や POSIX のものではない。 これらは *BSD でも利用できる。 FreeBSD の実装では、エラーの際には I<strp> を NULL にセットする。"
245
246 #. type: SH
247 #: build/C/man3/asprintf.3:67 build/C/man3/ctermid.3:77
248 #: build/C/man3/dprintf.3:95 build/C/man3/fclose.3:102
249 #: build/C/man3/fcloseall.3:62 build/C/man3/ferror.3:126
250 #: build/C/man3/fflush.3:113 build/C/man3/fgetc.3:133 build/C/man3/fgetwc.3:87
251 #: build/C/man3/flockfile.3:141 build/C/man3/fmemopen.3:345
252 #: build/C/man3/fmtmsg.3:309 build/C/man3/fopen.3:348
253 #: build/C/man3/fopencookie.3:437 build/C/man3/fpurge.3:80
254 #: build/C/man3/fputwc.3:85 build/C/man3/fread.3:105 build/C/man3/fseek.3:171
255 #: build/C/man3/fseeko.3:106 build/C/man3/getline.3:172 build/C/man3/gets.3:90
256 #: build/C/man3/getw.3:87 build/C/man2/link.2:411 build/C/man2/llseek.2:87
257 #: build/C/man2/lseek.2:267 build/C/man3/lseek64.3:161
258 #: build/C/man2/open.2:1503 build/C/man2/open_by_handle_at.2:720
259 #: build/C/man3/perror.3:139 build/C/man2/pipe.2:232 build/C/man3/popen.3:201
260 #: build/C/man3/printf.3:1106 build/C/man3/puts.3:112 build/C/man2/read.2:226
261 #: build/C/man2/readlink.2:328 build/C/man2/readv.2:320
262 #: build/C/man3/remove.3:86 build/C/man2/rename.2:443 build/C/man2/rmdir.2:132
263 #: build/C/man3/scanf.3:738 build/C/man3/setbuf.3:209 build/C/man3/stdin.3:154
264 #: build/C/man3/stdio.3:250 build/C/man3/stdio_ext.3:151
265 #: build/C/man2/symlink.2:260 build/C/man7/symlink.7:512
266 #: build/C/man3/tempnam.3:168 build/C/man3/tmpfile.3:97
267 #: build/C/man3/tmpnam.3:172 build/C/man2/unlink.2:300
268 #: build/C/man3/unlocked_stdio.3:136 build/C/man3/wprintf.3:251
269 #: build/C/man2/write.2:254
270 #, no-wrap
271 msgid "SEE ALSO"
272 msgstr "関連項目"
273
274 #. type: Plain text
275 #: build/C/man3/asprintf.3:71
276 msgid "B<free>(3), B<malloc>(3), B<printf>(3)"
277 msgstr "B<free>(3), B<malloc>(3), B<printf>(3)"
278
279 #. type: SH
280 #: build/C/man3/asprintf.3:71 build/C/man3/ctermid.3:79
281 #: build/C/man3/dprintf.3:97 build/C/man3/fclose.3:108
282 #: build/C/man3/fcloseall.3:68 build/C/man3/ferror.3:131
283 #: build/C/man3/fflush.3:121 build/C/man3/fgetc.3:150 build/C/man3/fgetwc.3:92
284 #: build/C/man3/flockfile.3:143 build/C/man3/fmemopen.3:348
285 #: build/C/man3/fmtmsg.3:312 build/C/man3/fopen.3:354
286 #: build/C/man3/fopencookie.3:442 build/C/man3/fpurge.3:85
287 #: build/C/man3/fputwc.3:89 build/C/man3/fread.3:111 build/C/man3/fseek.3:174
288 #: build/C/man3/fseeko.3:108 build/C/man3/getline.3:178
289 #: build/C/man3/gets.3:108 build/C/man3/getw.3:93 build/C/man2/link.2:420
290 #: build/C/man2/llseek.2:90 build/C/man2/lseek.2:274
291 #: build/C/man3/lseek64.3:164 build/C/man2/open.2:1525
292 #: build/C/man2/open_by_handle_at.2:736 build/C/man3/perror.3:144
293 #: build/C/man2/pipe.2:239 build/C/man3/popen.3:211 build/C/man3/printf.3:1115
294 #: build/C/man3/puts.3:124 build/C/man2/read.2:239 build/C/man2/readlink.2:336
295 #: build/C/man2/readv.2:324 build/C/man3/remove.3:97 build/C/man2/rename.2:451
296 #: build/C/man2/rmdir.2:141 build/C/man3/scanf.3:745 build/C/man3/setbuf.3:217
297 #: build/C/man3/stdin.3:160 build/C/man3/stdio.3:257
298 #: build/C/man3/stdio_ext.3:154 build/C/man2/symlink.2:271
299 #: build/C/man7/symlink.7:530 build/C/man3/tempnam.3:173
300 #: build/C/man3/tmpfile.3:103 build/C/man3/tmpnam.3:177
301 #: build/C/man2/unlink.2:312 build/C/man3/unlocked_stdio.3:139
302 #: build/C/man3/wprintf.3:258 build/C/man2/write.2:266
303 #, no-wrap
304 msgid "COLOPHON"
305 msgstr "この文書について"
306
307 #. type: Plain text
308 #: build/C/man3/asprintf.3:79 build/C/man3/ctermid.3:87
309 #: build/C/man3/dprintf.3:105 build/C/man3/fclose.3:116
310 #: build/C/man3/fcloseall.3:76 build/C/man3/ferror.3:139
311 #: build/C/man3/fflush.3:129 build/C/man3/fgetc.3:158
312 #: build/C/man3/fgetwc.3:100 build/C/man3/flockfile.3:151
313 #: build/C/man3/fmemopen.3:356 build/C/man3/fmtmsg.3:320
314 #: build/C/man3/fopen.3:362 build/C/man3/fopencookie.3:450
315 #: build/C/man3/fpurge.3:93 build/C/man3/fputwc.3:97 build/C/man3/fread.3:119
316 #: build/C/man3/fseek.3:182 build/C/man3/fseeko.3:116
317 #: build/C/man3/getline.3:186 build/C/man3/gets.3:116 build/C/man3/getw.3:101
318 #: build/C/man2/link.2:428 build/C/man2/llseek.2:98 build/C/man2/lseek.2:282
319 #: build/C/man3/lseek64.3:172 build/C/man2/open.2:1533
320 #: build/C/man2/open_by_handle_at.2:744 build/C/man3/perror.3:152
321 #: build/C/man2/pipe.2:247 build/C/man3/popen.3:219 build/C/man3/printf.3:1123
322 #: build/C/man3/puts.3:132 build/C/man2/read.2:247 build/C/man2/readlink.2:344
323 #: build/C/man2/readv.2:332 build/C/man3/remove.3:105
324 #: build/C/man2/rename.2:459 build/C/man2/rmdir.2:149 build/C/man3/scanf.3:753
325 #: build/C/man3/setbuf.3:225 build/C/man3/stdin.3:168 build/C/man3/stdio.3:265
326 #: build/C/man3/stdio_ext.3:162 build/C/man2/symlink.2:279
327 #: build/C/man7/symlink.7:538 build/C/man3/tempnam.3:181
328 #: build/C/man3/tmpfile.3:111 build/C/man3/tmpnam.3:185
329 #: build/C/man2/unlink.2:320 build/C/man3/unlocked_stdio.3:147
330 #: build/C/man3/wprintf.3:266 build/C/man2/write.2:274
331 msgid "This page is part of release 3.78 of the Linux I<man-pages> project.  A description of the project, information about reporting bugs, and the latest version of this page, can be found at \\%http://www.kernel.org/doc/man-pages/."
332 msgstr ""
333 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
334 "である。プロジェクトの説明とバグ報告に関する情報は\n"
335 "http://www.kernel.org/doc/man-pages/ に書かれている。"
336
337 #. type: TH
338 #: build/C/man3/ctermid.3:26
339 #, no-wrap
340 msgid "CTERMID"
341 msgstr "CTERMID"
342
343 #. type: TH
344 #: build/C/man3/ctermid.3:26
345 #, no-wrap
346 msgid "2013-07-04"
347 msgstr "2013-07-04"
348
349 #. type: Plain text
350 #: build/C/man3/ctermid.3:29
351 msgid "ctermid - get controlling terminal name"
352 msgstr "ctermid - 制御端末名の取得"
353
354 #. type: Plain text
355 #: build/C/man3/ctermid.3:34 build/C/man3/fgetc.3:33 build/C/man3/fgetwc.3:24
356 #: build/C/man3/flockfile.3:31 build/C/man3/fmemopen.3:16
357 #: build/C/man3/fopen.3:50 build/C/man3/fputwc.3:22 build/C/man3/fread.3:51
358 #: build/C/man3/fseeko.3:31 build/C/man3/getline.3:32 build/C/man3/gets.3:35
359 #: build/C/man3/getw.3:31 build/C/man3/popen.3:46 build/C/man3/puts.3:32
360 #: build/C/man2/rename.2:39 build/C/man3/scanf.3:58 build/C/man3/setbuf.3:54
361 #: build/C/man3/stdin.3:19 build/C/man3/tempnam.3:31 build/C/man3/tmpfile.3:37
362 #: build/C/man3/tmpnam.3:33 build/C/man3/unlocked_stdio.3:32
363 #, no-wrap
364 msgid "B<#include E<lt>stdio.hE<gt>>\n"
365 msgstr "B<#include E<lt>stdio.hE<gt>>\n"
366
367 #. type: Plain text
368 #: build/C/man3/ctermid.3:36
369 #, no-wrap
370 msgid "B<char *ctermid(char *>I<s>B<);>\n"
371 msgstr "B<char *ctermid(char *>I<s>B<);>\n"
372
373 #. type: Plain text
374 #: build/C/man3/ctermid.3:41 build/C/man3/dprintf.3:39
375 #: build/C/man3/ferror.3:61 build/C/man3/flockfile.3:42
376 #: build/C/man3/fmemopen.3:29 build/C/man3/fopen.3:61 build/C/man3/fseeko.3:41
377 #: build/C/man3/getline.3:42 build/C/man3/getw.3:40 build/C/man2/link.2:51
378 #: build/C/man2/open.2:73 build/C/man3/perror.3:50 build/C/man3/popen.3:55
379 #: build/C/man3/printf.3:63 build/C/man2/readlink.2:64 build/C/man2/readv.2:53
380 #: build/C/man2/rename.2:56 build/C/man3/scanf.3:73 build/C/man3/setbuf.3:68
381 #: build/C/man2/symlink.2:52 build/C/man3/tempnam.3:38
382 #: build/C/man2/unlink.2:51 build/C/man3/unlocked_stdio.3:68
383 #: build/C/man3/wprintf.3:39
384 msgid "Feature Test Macro Requirements for glibc (see B<feature_test_macros>(7)):"
385 msgstr "glibc 向けの機能検査マクロの要件 (B<feature_test_macros>(7)  参照):"
386
387 #.  From <unistd.h>: _XOPEN_SOURCE
388 #. type: Plain text
389 #: build/C/man3/ctermid.3:46
390 msgid "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
391 msgstr "B<ctermid>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
392
393 #. type: Plain text
394 #: build/C/man3/ctermid.3:59
395 msgid "B<ctermid>()  returns a string which is the pathname for the current controlling terminal for this process.  If I<s> is NULL, a static buffer is used, otherwise I<s> points to a buffer used to hold the terminal pathname.  The symbolic constant B<L_ctermid> is the maximum number of characters in the returned pathname."
396 msgstr "B<ctermid>()  はプロセスの現在の制御端末のパス名を返す。 I<s> が NULL の場合、静的なバッファを用いる。それ以外の場合、 I<s> は端末パス名を保持するのに使用されるバッファへのポインタとなる。 シンボル定数 B<L_ctermid> は返されるパス名の最大文字数である。"
397
398 #. type: Plain text
399 #: build/C/man3/ctermid.3:61
400 msgid "The pointer to the pathname."
401 msgstr "パス名へのポインタ。"
402
403 #. type: SH
404 #: build/C/man3/ctermid.3:61 build/C/man3/fcloseall.3:55
405 #: build/C/man3/ferror.3:106 build/C/man3/fflush.3:93
406 #: build/C/man3/flockfile.3:127 build/C/man3/fmtmsg.3:225
407 #: build/C/man3/lseek64.3:156 build/C/man3/remove.3:70
408 #: build/C/man3/setbuf.3:164 build/C/man3/stdio_ext.3:132
409 #: build/C/man3/tmpnam.3:86
410 #, no-wrap
411 msgid "ATTRIBUTES"
412 msgstr "属性"
413
414 #. type: SS
415 #: build/C/man3/ctermid.3:62 build/C/man3/fcloseall.3:56
416 #: build/C/man3/ferror.3:107 build/C/man3/fflush.3:94
417 #: build/C/man3/flockfile.3:128 build/C/man3/fmtmsg.3:226
418 #: build/C/man3/lseek64.3:157 build/C/man3/remove.3:71
419 #: build/C/man3/setbuf.3:165 build/C/man3/stdio_ext.3:133
420 #: build/C/man3/tmpnam.3:87
421 #, no-wrap
422 msgid "Multithreading (see pthreads(7))"
423 msgstr "マルチスレッディング (pthreads(7) 参照)"
424
425 #. type: Plain text
426 #: build/C/man3/ctermid.3:67
427 msgid "The B<ctermid>()  function is thread-safe with exceptions.  It is not thread-safe if called with a NULL parameter."
428 msgstr "B<ctermid>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出された場合はスレッドセーフではない。"
429
430 #. type: Plain text
431 #: build/C/man3/ctermid.3:69
432 msgid "Svr4, POSIX.1-2001."
433 msgstr "SVr4, POSIX.1-2001."
434
435 #. type: SH
436 #: build/C/man3/ctermid.3:69 build/C/man3/fmemopen.3:217
437 #: build/C/man3/fopen.3:331 build/C/man3/gets.3:72 build/C/man3/getw.3:83
438 #: build/C/man2/link.2:405 build/C/man2/open.2:1484 build/C/man3/popen.3:178
439 #: build/C/man3/printf.3:951 build/C/man3/puts.3:105 build/C/man2/read.2:187
440 #: build/C/man2/readv.2:294 build/C/man3/remove.3:83 build/C/man2/rename.2:432
441 #: build/C/man2/rmdir.2:129 build/C/man3/scanf.3:669 build/C/man3/setbuf.3:179
442 #: build/C/man3/tempnam.3:165 build/C/man3/tmpnam.3:165
443 #: build/C/man2/unlink.2:297 build/C/man2/write.2:215
444 #, no-wrap
445 msgid "BUGS"
446 msgstr "バグ"
447
448 #. type: Plain text
449 #: build/C/man3/ctermid.3:73
450 msgid "The path returned may not uniquely identify the controlling terminal; it may, for example, be I</dev/tty>."
451 msgstr "返されたパスはたぶん制御端末を一意には特定できない。 たとえば I</dev/tty> のように。"
452
453 #.  in glibc 2.3.x, x >= 4, the glibc headers threw an error
454 #.  if ctermid() was given an argument; fixed in 2.4.
455 #. type: Plain text
456 #: build/C/man3/ctermid.3:77
457 msgid "It is not assured that the program can open the terminal."
458 msgstr "プログラムが端末をオープンできることは保証されていない。"
459
460 #. type: Plain text
461 #: build/C/man3/ctermid.3:79
462 msgid "B<ttyname>(3)"
463 msgstr "B<ttyname>(3)"
464
465 #. type: TH
466 #: build/C/man3/dprintf.3:26
467 #, no-wrap
468 msgid "DPRINTF"
469 msgstr "DPRINTF"
470
471 #. type: TH
472 #: build/C/man3/dprintf.3:26
473 #, no-wrap
474 msgid "2010-09-15"
475 msgstr "2010-09-15"
476
477 #. type: Plain text
478 #: build/C/man3/dprintf.3:29
479 msgid "dprintf, vdprintf - print to a file descriptor"
480 msgstr "dprintf, vdprintf - ファイルディスクリプタに文字出力する"
481
482 #. type: Plain text
483 #: build/C/man3/dprintf.3:33
484 msgid "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
485 msgstr "B<int dprintf(int >I<fd>B<, const char *>I<format>B<, ...);>"
486
487 #. type: Plain text
488 #: build/C/man3/dprintf.3:35
489 msgid "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
490 msgstr "B<int vdprintf(int >I<fd>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
491
492 #. type: Plain text
493 #: build/C/man3/dprintf.3:43
494 msgid "B<dprintf>(), B<vdprintf>():"
495 msgstr "B<dprintf>(), B<vdprintf>():"
496
497 #. type: TP
498 #: build/C/man3/dprintf.3:46 build/C/man3/fmemopen.3:37
499 #: build/C/man3/getline.3:49 build/C/man2/link.2:57 build/C/man2/open.2:79
500 #: build/C/man2/readlink.2:77 build/C/man2/rename.2:62
501 #: build/C/man2/symlink.2:65 build/C/man2/unlink.2:57
502 #, no-wrap
503 msgid "Since glibc 2.10:"
504 msgstr "glibc 2.10 以降:"
505
506 #. type: Plain text
507 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40 build/C/man2/link.2:60
508 #: build/C/man2/open.2:82 build/C/man2/readlink.2:80 build/C/man2/rename.2:65
509 #: build/C/man2/symlink.2:68 build/C/man2/unlink.2:60
510 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
511 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 700 || _POSIX_C_SOURCE\\ E<gt>=\\ 200809L"
512
513 #. type: TP
514 #: build/C/man3/dprintf.3:49 build/C/man3/fmemopen.3:40
515 #: build/C/man3/getline.3:52 build/C/man2/link.2:60 build/C/man2/open.2:82
516 #: build/C/man2/readlink.2:80 build/C/man2/rename.2:65
517 #: build/C/man2/symlink.2:68 build/C/man2/unlink.2:60
518 #, no-wrap
519 msgid "Before glibc 2.10:"
520 msgstr "glibc 2.10 より前:"
521
522 #. type: Plain text
523 #: build/C/man3/dprintf.3:52 build/C/man3/fmemopen.3:43
524 #: build/C/man3/getline.3:55 build/C/man3/unlocked_stdio.3:104
525 msgid "_GNU_SOURCE"
526 msgstr "_GNU_SOURCE"
527
528 #. type: Plain text
529 #: build/C/man3/dprintf.3:69
530 msgid "The functions B<dprintf>()  and B<vdprintf>()  (as found in the glibc2 library) are exact analogs of B<fprintf>(3)  and B<vfprintf>(3), except that they output to a file descriptor I<fd> instead of to a I<stdio> stream."
531 msgstr "(glibc2 ライブラリにおける)  B<dprintf>()  関数と B<vdprintf>()  関数とは、それぞれ B<fprintf>(3)  関数と B<vfprintf>(3)  関数とにちょうど対応するが、 これらは I<stdio> ストリームではなくファイルディスクリプタ I<fd> に対して出力を行う。"
532
533 #.  .SH NOTES
534 #.  These functions are GNU extensions, not in C or POSIX.
535 #.  Clearly, the names were badly chosen.
536 #.  Many systems (like MacOS) have incompatible functions called
537 #.  .BR dprintf (),
538 #.  usually some debugging version of
539 #.  .BR printf (3),
540 #.  perhaps with a prototype like
541 #.  .BI "void dprintf(int level, const char *" format ", ...);"
542 #.  where the first argument is a debugging level (and output is to
543 #.  .IR stderr ).
544 #.  Moreover,
545 #.  .BR dprintf ()
546 #.  (or
547 #.  .BR DPRINTF )
548 #.  is also a popular macro name for a debugging printf.
549 #.  So, probably, it is better to avoid this function in programs
550 #.  intended to be portable.
551 #.  A better name would have been
552 #.  .BR fdprintf ().
553 #. type: Plain text
554 #: build/C/man3/dprintf.3:95
555 msgid "These functions are GNU extensions that are nowadays specified in POSIX.1-2008."
556 msgstr "これらの関数は GNU による拡張であり、 現在では POSIX.1-2008 で規定されている。"
557
558 #. type: Plain text
559 #: build/C/man3/dprintf.3:97
560 msgid "B<printf>(3)"
561 msgstr "B<printf>(3)"
562
563 #. type: TH
564 #: build/C/man3/fclose.3:44
565 #, no-wrap
566 msgid "FCLOSE"
567 msgstr "FCLOSE"
568
569 #. type: TH
570 #: build/C/man3/fclose.3:44 build/C/man3/fmemopen.3:10
571 #: build/C/man3/fopencookie.3:26 build/C/man3/getline.3:26
572 #: build/C/man2/open.2:51 build/C/man2/readv.2:32 build/C/man2/write.2:39
573 #, no-wrap
574 msgid "2015-01-22"
575 msgstr "2015-01-22"
576
577 #. type: Plain text
578 #: build/C/man3/fclose.3:47
579 msgid "fclose - close a stream"
580 msgstr "fclose - ストリームを閉じる"
581
582 #. type: Plain text
583 #: build/C/man3/fclose.3:51
584 msgid "B<int fclose(FILE *>I<stream>B<);>"
585 msgstr "B<int fclose(FILE *>I<stream>B<);>"
586
587 #. type: Plain text
588 #: build/C/man3/fclose.3:59
589 msgid "The B<fclose>()  function flushes the stream pointed to by I<stream> (writing any buffered output data using B<fflush>(3))  and closes the underlying file descriptor."
590 msgstr ""
591 "B<fclose>() 関数は、 I<stream> が指すストリームを (バッファリングされて\n"
592 "いた全ての出力データを B<fflush>(3) を用いて書き込んで) フラッシュし、\n"
593 "対応するファイルディスクリプタをクローズする。"
594
595 #. type: Plain text
596 #: build/C/man3/fclose.3:70
597 msgid "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and I<errno> is set to indicate the error.  In either case any further access (including another call to B<fclose>())  to the stream results in undefined behavior."
598 msgstr "関数が正常に終了すると 0 が返される。 正常に終了しなかった場合には B<EOF> が返され、 I<errno> がエラーを示すために設定される。 どちらの場合も、そのストリームに対する (B<fclose>()  へのさらなる呼び出しを含む) それ以上のアクセスは 未定義の動作を生じさせる。"
599
600 #. type: SH
601 #: build/C/man3/fclose.3:70 build/C/man3/ferror.3:96 build/C/man3/fflush.3:81
602 #: build/C/man3/fgetwc.3:64 build/C/man3/flockfile.3:125
603 #: build/C/man3/fopen.3:201 build/C/man3/fpurge.3:65 build/C/man3/fputwc.3:63
604 #: build/C/man3/fseek.3:136 build/C/man3/fseeko.3:97
605 #: build/C/man3/getline.3:127 build/C/man2/link.2:192 build/C/man2/llseek.2:69
606 #: build/C/man2/lseek.2:187 build/C/man2/open.2:783
607 #: build/C/man2/open_by_handle_at.2:256 build/C/man2/pipe.2:138
608 #: build/C/man3/popen.3:146 build/C/man2/read.2:95 build/C/man2/readlink.2:159
609 #: build/C/man2/readv.2:188 build/C/man3/remove.3:65 build/C/man2/rename.2:208
610 #: build/C/man2/rmdir.2:45 build/C/man3/scanf.3:547 build/C/man2/symlink.2:145
611 #: build/C/man3/tempnam.3:101 build/C/man3/tmpfile.3:56
612 #: build/C/man3/tmpnam.3:84 build/C/man2/unlink.2:158 build/C/man2/write.2:107
613 #, no-wrap
614 msgid "ERRORS"
615 msgstr "エラー"
616
617 #. type: TP
618 #: build/C/man3/fclose.3:71 build/C/man3/fflush.3:82 build/C/man3/fpurge.3:66
619 #: build/C/man3/fseek.3:137 build/C/man2/link.2:276 build/C/man2/llseek.2:70
620 #: build/C/man2/lseek.2:188 build/C/man2/open.2:1006
621 #: build/C/man2/open_by_handle_at.2:317 build/C/man2/read.2:114
622 #: build/C/man2/readlink.2:202 build/C/man2/rename.2:349
623 #: build/C/man3/scanf.3:553 build/C/man2/symlink.2:208
624 #: build/C/man2/unlink.2:248 build/C/man2/write.2:126
625 #, no-wrap
626 msgid "B<EBADF>"
627 msgstr "B<EBADF>"
628
629 #.   This error cannot occur unless you are mixing ANSI C stdio operations and
630 #.   low-level file operations on the same stream. If you do get this error,
631 #.   you must have closed the stream's low-level file descriptor using
632 #.   something like close(fileno(stream)).
633 #. type: Plain text
634 #: build/C/man3/fclose.3:80
635 msgid "The file descriptor underlying I<stream> is not valid."
636 msgstr "I<stream> の基となるファイルディスクリプタが不正である。"
637
638 #. type: Plain text
639 #: build/C/man3/fclose.3:90
640 msgid "The B<fclose>()  function may also fail and set I<errno> for any of the errors specified for the routines B<close>(2), B<write>(2)  or B<fflush>(3)."
641 msgstr "B<fclose>()  関数はこれ以外にも B<close>(2), B<write>(2), B<fflush>(3)  のルーチンで失敗することがある。その場合は I<errno> が、失敗したルーチンで設定された値に設定される。"
642
643 #. type: Plain text
644 #: build/C/man3/fclose.3:92 build/C/man3/fseek.3:171 build/C/man3/puts.3:105
645 msgid "C89, C99."
646 msgstr "C89, C99."
647
648 #. type: SH
649 #: build/C/man3/fclose.3:92 build/C/man3/fflush.3:104 build/C/man3/fgetwc.3:72
650 #: build/C/man3/fmemopen.3:211 build/C/man3/fmtmsg.3:252
651 #: build/C/man3/fopen.3:255 build/C/man3/fpurge.3:78 build/C/man3/fputwc.3:70
652 #: build/C/man3/fseeko.3:104 build/C/man2/link.2:347 build/C/man2/llseek.2:84
653 #: build/C/man2/lseek.2:227 build/C/man2/open.2:1064
654 #: build/C/man2/open_by_handle_at.2:359 build/C/man3/perror.3:124
655 #: build/C/man3/printf.3:889 build/C/man2/read.2:175
656 #: build/C/man2/readlink.2:225 build/C/man2/readv.2:228
657 #: build/C/man2/rename.2:414 build/C/man3/scanf.3:608 build/C/man3/stdin.3:122
658 #: build/C/man2/symlink.2:238 build/C/man3/tempnam.3:110
659 #: build/C/man3/tmpfile.3:80 build/C/man3/tmpnam.3:101
660 #: build/C/man2/unlink.2:281 build/C/man3/wprintf.3:213
661 #: build/C/man2/write.2:198
662 #, no-wrap
663 msgid "NOTES"
664 msgstr "注意"
665
666 #. type: Plain text
667 #: build/C/man3/fclose.3:102
668 msgid "Note that B<fclose>()  only flushes the user-space buffers provided by the C library.  To ensure that the data is physically stored on disk the kernel buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
669 msgstr "B<fclose>()  は C ライブラリで提供されたユーザー空間バッファをフラッシュするだけで ある点に注意すること。 データを確実に物理的にディスクに記録するためには カーネルバッファも (B<sync>(2)  や B<fsync>(2)  を用いて) フラッシュしなければならない。"
670
671 #. type: Plain text
672 #: build/C/man3/fclose.3:108
673 msgid "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
674 msgstr "B<close>(2), B<fcloseall>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
675
676 #. type: TH
677 #: build/C/man3/fcloseall.3:25
678 #, no-wrap
679 msgid "FCLOSEALL"
680 msgstr "FCLOSEALL"
681
682 #. type: Plain text
683 #: build/C/man3/fcloseall.3:28
684 msgid "fcloseall - close all open streams"
685 msgstr "fcloseall - 開いているすべてのストリームを閉じる"
686
687 #. type: Plain text
688 #: build/C/man3/fcloseall.3:32 build/C/man3/fopencookie.3:33
689 #, no-wrap
690 msgid ""
691 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
692 "B<#include E<lt>stdio.hE<gt>>\n"
693 msgstr ""
694 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
695 "B<#include E<lt>stdio.hE<gt>>\n"
696
697 #. type: Plain text
698 #: build/C/man3/fcloseall.3:34
699 #, no-wrap
700 msgid "B<int fcloseall(void);>\n"
701 msgstr "B<int fcloseall(void);>\n"
702
703 #. type: Plain text
704 #: build/C/man3/fcloseall.3:43
705 msgid "The B<fcloseall>()  function closes all of the calling process's open streams.  Buffered output for each stream is written before it is closed (as for B<fflush>(3)); buffered input is discarded."
706 msgstr "B<fcloseall>()  関数は、呼び出し元プロセスが開いているすべてのストリームを閉じる。 ストリームを閉じる前に、 (B<fflush>(3)  と同じように) 各ストリームのバッファに溜っている出力データは書き出される。 入力バッファ内のデータは破棄される。"
707
708 #. type: Plain text
709 #: build/C/man3/fcloseall.3:50
710 msgid "The standard streams, I<stdin>, I<stdout>, and I<stderr> are also closed."
711 msgstr "標準入出力 I<stdin>, I<stdout>, I<stderr> も閉じられる。"
712
713 #. type: Plain text
714 #: build/C/man3/fcloseall.3:55
715 msgid "This function returns 0 if all files were successfully closed; on error, B<EOF> is returned."
716 msgstr "この関数は、すべてのファイルが正常に閉じられた場合 0 を返す。 エラーの場合、 B<EOF> を返す。"
717
718 #. type: Plain text
719 #: build/C/man3/fcloseall.3:60
720 msgid "The B<fcloseall>()  function does not lock the streams, so it is not thread-safe."
721 msgstr "B<fcloseall>() 関数はストリームのロックを行わない。そのため、スレッドセーフではない。"
722
723 #. type: Plain text
724 #: build/C/man3/fcloseall.3:62
725 msgid "This function is a GNU extension."
726 msgstr "この関数は GNU 拡張である。"
727
728 #. type: Plain text
729 #: build/C/man3/fcloseall.3:68
730 msgid "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
731 msgstr "B<close>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<setbuf>(3)"
732
733 #. type: TH
734 #: build/C/man3/ferror.3:44
735 #, no-wrap
736 msgid "FERROR"
737 msgstr "FERROR"
738
739 #. type: TH
740 #: build/C/man3/ferror.3:44
741 #, no-wrap
742 msgid "2014-01-15"
743 msgstr "2014-01-15"
744
745 #. type: Plain text
746 #: build/C/man3/ferror.3:47
747 msgid "clearerr, feof, ferror, fileno - check and reset stream status"
748 msgstr "clearerr, feof, ferror, fileno - ストリームステータスのチェックとリセット"
749
750 #. type: Plain text
751 #: build/C/man3/ferror.3:51
752 msgid "B<void clearerr(FILE *>I<stream>B<);>"
753 msgstr "B<void clearerr(FILE *>I<stream>B<);>"
754
755 #. type: Plain text
756 #: build/C/man3/ferror.3:53
757 msgid "B<int feof(FILE *>I<stream>B<);>"
758 msgstr "B<int feof(FILE *>I<stream>B<);>"
759
760 #. type: Plain text
761 #: build/C/man3/ferror.3:55
762 msgid "B<int ferror(FILE *>I<stream>B<);>"
763 msgstr "B<int ferror(FILE *>I<stream>B<);>"
764
765 #. type: Plain text
766 #: build/C/man3/ferror.3:57
767 msgid "B<int fileno(FILE *>I<stream>B<);>"
768 msgstr "B<int fileno(FILE *>I<stream>B<);>"
769
770 #. type: Plain text
771 #: build/C/man3/ferror.3:65
772 msgid "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
773 msgstr "B<fileno>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
774
775 #. type: Plain text
776 #: build/C/man3/ferror.3:70
777 msgid "The function B<clearerr>()  clears the end-of-file and error indicators for the stream pointed to by I<stream>."
778 msgstr "関数 B<clearerr>()  は I<stream> で示されるストリームの EOF(end-of-file) 指示子とエラー指示子をクリアする。"
779
780 #. type: Plain text
781 #: build/C/man3/ferror.3:78
782 msgid "The function B<feof>()  tests the end-of-file indicator for the stream pointed to by I<stream>, returning nonzero if it is set.  The end-of-file indicator can be cleared only by the function B<clearerr>()."
783 msgstr "関数 B<feof>()  は I<stream> で示されるストリームの EOF 指示子をテストし、 セットされていれば 0 以外の数を返す。 EOF 指示子は、関数 B<clearerr>()  によってのみクリアすることができる。"
784
785 #. type: Plain text
786 #: build/C/man3/ferror.3:87
787 msgid "The function B<ferror>()  tests the error indicator for the stream pointed to by I<stream>, returning nonzero if it is set.  The error indicator can be reset only by the B<clearerr>()  function."
788 msgstr "関数 B<ferror>()  は I<stream> で示されるストリームのエラー指示子をテストし、 セットされていれば 0 以外の数を返す。 エラー指示子は、関数 B<clearerr>()  によってのみリセットすることができる。"
789
790 #. type: Plain text
791 #: build/C/man3/ferror.3:93
792 msgid "The function B<fileno>()  examines the argument I<stream> and returns its integer descriptor."
793 msgstr "関数 B<fileno>()  は、引数 I<stream> を調べ、その整数のディスクリプタを返す。"
794
795 #. type: Plain text
796 #: build/C/man3/ferror.3:96 build/C/man3/fgetc.3:99 build/C/man3/fgetwc.3:55
797 #: build/C/man3/fputwc.3:54 build/C/man3/fread.3:83 build/C/man3/puts.3:84
798 msgid "For nonlocking counterparts, see B<unlocked_stdio>(3)."
799 msgstr "これらの処理を停止せずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
800
801 #. type: Plain text
802 #: build/C/man3/ferror.3:106
803 msgid "These functions should not fail and do not set the external variable I<errno>.  (However, in case B<fileno>()  detects that its argument is not a valid stream, it must return -1 and set I<errno> to B<EBADF>.)"
804 msgstr "これらの関数は失敗すべきではなく、また、外部変数 I<errno> に値をセットしない。 (しかし、 B<fileno>()  関数の場合で、引数が有効なストリームでなかった場合、 関数は -1 を返し、 I<errno> に B<EBADF> を設定しなければならない。)"
805
806 #. type: Plain text
807 #: build/C/man3/ferror.3:115
808 msgid "The B<clearerr>(), B<feof>(), B<ferror>(), and B<fileno>()  functions are thread-safe."
809 msgstr "関数 B<clearerr>(), B<feof>(), B<ferror>(), B<fileno>() はスレッドセーフである。"
810
811 #. type: Plain text
812 #: build/C/man3/ferror.3:122
813 msgid "The functions B<clearerr>(), B<feof>(), and B<ferror>()  conform to C89, C99, POSIX.1-2001, and POSIX.1-2008."
814 msgstr "関数 B<clearerr>(), B<feof>(), B<ferror>()  は C89, C99, POSIX.1-2001, POSIX.1-2008 に準拠している。"
815
816 #. type: Plain text
817 #: build/C/man3/ferror.3:126
818 msgid "The function B<fileno>()  conforms to POSIX.1-2001 and POSIX.1-2008."
819 msgstr "関数 B<fileno>() は POSIX.1-2001 と POSIX.1-2008 に準拠している。"
820
821 #. type: Plain text
822 #: build/C/man3/ferror.3:131
823 msgid "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
824 msgstr "B<open>(2), B<fdopen>(3), B<stdio>(3), B<unlocked_stdio>(3)"
825
826 #. type: TH
827 #: build/C/man3/fflush.3:45
828 #, no-wrap
829 msgid "FFLUSH"
830 msgstr "FFLUSH"
831
832 #. type: TH
833 #: build/C/man3/fflush.3:45
834 #, no-wrap
835 msgid "2013-07-15"
836 msgstr "2013-07-15"
837
838 #. type: Plain text
839 #: build/C/man3/fflush.3:48
840 msgid "fflush - flush a stream"
841 msgstr "fflush - ストリームの内容を強制的に出力(フラッシュ)する"
842
843 #. type: Plain text
844 #: build/C/man3/fflush.3:52
845 msgid "B<int fflush(FILE *>I<stream>B<);>"
846 msgstr "B<int fflush(FILE *>I<stream>B<);>"
847
848 #. type: Plain text
849 #: build/C/man3/fflush.3:63
850 msgid "For output streams, B<fflush>()  forces a write of all user-space buffered data for the given output or update I<stream> via the stream's underlying write function.  For input streams, B<fflush>()  discards any buffered data that has been fetched from the underlying file, but has not been consumed by the application.  The open status of the stream is unaffected."
851 msgstr "出力ストリームに関しては、 B<fflush>()  は、ユーザー空間でバッファリングされているすべてのデータを 指定された出力に書き出す (フラッシュする)、 もしくはストリーム I<stream> の下位にある書き込み関数を用いてこのストリームを更新する。 入力ストリームに関しては、 B<fflush>()  は、対応するファイルから取得されたが、アプリケーションからは 読み出されていないバッファデータを全て破棄する。 ストリームは開いた状態のままであり、 この関数によって何の影響も受けない。"
852
853 #. type: Plain text
854 #: build/C/man3/fflush.3:71
855 msgid "If the I<stream> argument is NULL, B<fflush>()  flushes I<all> open output streams."
856 msgstr "I<stream> 引数が NULL ならば、 B<fflush>()  は開いているI<すべての>出力ストリームをフラッシュする。"
857
858 #. type: Plain text
859 #: build/C/man3/fflush.3:74
860 msgid "For a nonlocking counterpart, see B<unlocked_stdio>(3)."
861 msgstr "これらの処理をロックせずに行いたいときは、 B<unlocked_stdio>(3)  を参照のこと。"
862
863 #. type: Plain text
864 #: build/C/man3/fflush.3:81
865 msgid "Upon successful completion 0 is returned.  Otherwise, B<EOF> is returned and I<errno> is set to indicate the error."
866 msgstr "成功すると 0 が返される。 その他の場合には B<EOF> が返され、 I<errno> が、エラーに対応した値に設定される。"
867
868 #. type: Plain text
869 #: build/C/man3/fflush.3:86
870 msgid "I<Stream> is not an open stream, or is not open for writing."
871 msgstr "I<Stream> は開いているストリームではない。 あるいはストリームは書き込み用ではない。"
872
873 #. type: Plain text
874 #: build/C/man3/fflush.3:93
875 msgid "The function B<fflush>()  may also fail and set I<errno> for any of the errors specified for B<write>(2)."
876 msgstr "B<fflush>()  関数は B<write>(2)  に関して規定されているエラーで失敗することもある。 この場合 I<errno> もその値に設定される。"
877
878 #. type: Plain text
879 #: build/C/man3/fflush.3:98
880 msgid "The B<fflush>()  function is thread-safe."
881 msgstr "関数 B<fflush>() はスレッドセーフである。"
882
883 #. type: Plain text
884 #: build/C/man3/fflush.3:100
885 msgid "C89, C99, POSIX.1-2001, POSIX.1-2008."
886 msgstr "C89, C99, POSIX.1-2001, POSIX.1-2008."
887
888 #.  Verified on: Solaris 8.
889 #. type: Plain text
890 #: build/C/man3/fflush.3:104
891 msgid "The standards do not specify the behavior for input streams.  Most other implementations behave the same as Linux."
892 msgstr "標準では、入力ストリームに対する動作は規定されていない。 他のほとんどの実装は Linux と同じ動作をする。"
893
894 #. type: Plain text
895 #: build/C/man3/fflush.3:113
896 msgid "Note that B<fflush>()  only flushes the user-space buffers provided by the C library.  To ensure that the data is physically stored on disk the kernel buffers must be flushed too, for example, with B<sync>(2)  or B<fsync>(2)."
897 msgstr "B<fflush>()  は、 C ライブラリが与えているユーザー空間のバッファしかフラッシュしない。 データが物理的にディスクに保存されることを保証したければ、 カーネルバッファもフラッシュしなければならない。 これには例えば B<sync>(2)  や B<fsync>(2)  を用いる。"
898
899 #. type: Plain text
900 #: build/C/man3/fflush.3:121
901 msgid "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>(3), B<unlocked_stdio>(3)"
902 msgstr "B<fsync>(2), B<sync>(2), B<write>(2), B<fclose>(3), B<fopen>(3), B<setbuf>(3), B<unlocked_stdio>(3)"
903
904 #. type: TH
905 #: build/C/man3/fgetc.3:27
906 #, no-wrap
907 msgid "FGETC"
908 msgstr "FGETC"
909
910 #. type: TH
911 #: build/C/man3/fgetc.3:27
912 #, no-wrap
913 msgid "2013-12-31"
914 msgstr "2013-12-31"
915
916 #. type: Plain text
917 #: build/C/man3/fgetc.3:30
918 msgid "fgetc, fgets, getc, getchar, ungetc - input of characters and strings"
919 msgstr "fgetc, fgets, getc, getchar, ungetc - 文字と文字列の入力"
920
921 #. type: Plain text
922 #: build/C/man3/fgetc.3:35
923 #, no-wrap
924 msgid "B<int fgetc(FILE *>I<stream>B<);>\n"
925 msgstr "B<int fgetc(FILE *>I<stream>B<);>\n"
926
927 #. type: Plain text
928 #: build/C/man3/fgetc.3:37
929 #, no-wrap
930 msgid "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
931 msgstr "B<char *fgets(char *>I<s>B<, int >I<size>B<, FILE *>I<stream>B<);>\n"
932
933 #. type: Plain text
934 #: build/C/man3/fgetc.3:39
935 #, no-wrap
936 msgid "B<int getc(FILE *>I<stream>B<);>\n"
937 msgstr "B<int getc(FILE *>I<stream>B<);>\n"
938
939 #. type: Plain text
940 #: build/C/man3/fgetc.3:41
941 #, no-wrap
942 msgid "B<int getchar(void);>\n"
943 msgstr "B<int getchar(void);>\n"
944
945 #. type: Plain text
946 #: build/C/man3/fgetc.3:43
947 #, no-wrap
948 msgid "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
949 msgstr "B<int ungetc(int >I<c>B<, FILE *>I<stream>B<);>\n"
950
951 #. type: Plain text
952 #: build/C/man3/fgetc.3:55
953 msgid "B<fgetc>()  reads the next character from I<stream> and returns it as an I<unsigned char> cast to an I<int>, or B<EOF> on end of file or error."
954 msgstr "B<fgetc>()  は、 I<stream> から次の文字を I<unsigned char> として読み、 I<int> にキャストして返す。ファイルの終わりやエラーとなった場合は B<EOF> を返す。"
955
956 #. type: Plain text
957 #: build/C/man3/fgetc.3:62
958 msgid "B<getc>()  is equivalent to B<fgetc>()  except that it may be implemented as a macro which evaluates I<stream> more than once."
959 msgstr "B<getc>()  は B<fgetc>()  と同様だが、 I<stream> を複数回評価するマクロとして実装されているかもしれない。"
960
961 #. type: Plain text
962 #: build/C/man3/fgetc.3:66
963 msgid "B<getchar>()  is equivalent to B<getc(>I<stdin>B<)>."
964 msgstr "B<getchar>()  は B<getc(>I<stdin>B<)> と同じである。"
965
966 #. type: Plain text
967 #: build/C/man3/fgetc.3:80
968 msgid "B<fgets>()  reads in at most one less than I<size> characters from I<stream> and stores them into the buffer pointed to by I<s>.  Reading stops after an B<EOF> or a newline.  If a newline is read, it is stored into the buffer.  A terminating null byte (\\(aq\\e0\\(aq)  is stored after the last character in the buffer."
969 msgstr "B<fgets>()  は I<stream> から最大で I<size> - 1 個の文字を読み込み、 I<s> が指すバッファに格納する。読み込みは B<EOF> または改行文字を読み込んだ後で停止する。 読み込まれた改行文字はバッファに格納される。 終端のヌルバイト (\\(aq\\e0\\(aq)  が一つバッファの中の最後の文字の後に書き込まれる。"
970
971 #. type: Plain text
972 #: build/C/man3/fgetc.3:91
973 msgid "B<ungetc>()  pushes I<c> back to I<stream>, cast to I<unsigned char>, where it is available for subsequent read operations.  Pushed-back characters will be returned in reverse order; only one pushback is guaranteed."
974 msgstr "B<ungetc>()  は、後の read 操作で読めるように、 I<c> を I<unsigned char> にキャストして I<stream> に書き戻す。 書き戻された文字は逆順に戻される; 書き戻しとして保証されているのは、一文字だけである。"
975
976 #. type: Plain text
977 #: build/C/man3/fgetc.3:96
978 msgid "Calls to the functions described here can be mixed with each other and with calls to other input functions from the I<stdio> library for the same input stream."
979 msgstr "ここで述べた関数や I<stdio> ライブラリの入力関数を同じ入力ストリームに対して互いに混ぜて使うことができる。"
980
981 #. type: Plain text
982 #: build/C/man3/fgetc.3:111
983 msgid "B<fgetc>(), B<getc>()  and B<getchar>()  return the character read as an I<unsigned char> cast to an I<int> or B<EOF> on end of file or error."
984 msgstr "B<fgetc>(), B<getc>(), B<getchar>()  は、文字を I<unsigned char> として読んで I<int> にキャストして返す。ファイルの終わりやエラーの場合は B<EOF> を返す。"
985
986 #. type: Plain text
987 #: build/C/man3/fgetc.3:117
988 msgid "B<fgets>()  returns I<s> on success, and NULL on error or when end of file occurs while no characters have been read."
989 msgstr "B<fgets>() は、成功すると I<s> を返し、エラーや 1 文字も読み込んでいないのにファイルの終わりになった 場合に NULL を返す。"
990
991 #. type: Plain text
992 #: build/C/man3/fgetc.3:124
993 msgid "B<ungetc>()  returns I<c> on success, or B<EOF> on error."
994 msgstr "B<ungetc>()  は成功すると I<c> を返し、エラーの場合は B<EOF> を返す。"
995
996 #. type: Plain text
997 #: build/C/man3/fgetc.3:126 build/C/man3/gets.3:60
998 msgid "C89, C99, POSIX.1-2001."
999 msgstr "C89, C99, POSIX.1-2001."
1000
1001 #. type: Plain text
1002 #: build/C/man3/fgetc.3:133
1003 msgid "It is not advisable to mix calls to input functions from the I<stdio> library with low-level calls to B<read>(2)  for the file descriptor associated with the input stream; the results will be undefined and very probably not what you want."
1004 msgstr "入力ストリームのファイルディスクリプタに対して、 I<stdio> ライブラリの入力関数と、低レベル呼び出しの B<read>(2)  を混ぜて呼び出す事は勧められない。 結果がどうなるかは分からず、おそらくあなたの 望んでいる結果にはならないだろう。"
1005
1006 #. type: Plain text
1007 #: build/C/man3/fgetc.3:150
1008 msgid "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<gets>(3), B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
1009 msgstr "B<read>(2), B<write>(2), B<ferror>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<gets>(3), B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
1010
1011 #. type: TH
1012 #: build/C/man3/fgetwc.3:18
1013 #, no-wrap
1014 msgid "FGETWC"
1015 msgstr "FGETWC"
1016
1017 #. type: TH
1018 #: build/C/man3/fgetwc.3:18 build/C/man3/fputwc.3:16 build/C/man3/popen.3:40
1019 #, no-wrap
1020 msgid "2013-04-19"
1021 msgstr "2013-04-19"
1022
1023 #. type: Plain text
1024 #: build/C/man3/fgetwc.3:21
1025 msgid "fgetwc, getwc - read a wide character from a FILE stream"
1026 msgstr "fgetwc, getwc - ワイド文字を FILE ストリームから読み込む"
1027
1028 #. type: Plain text
1029 #: build/C/man3/fgetwc.3:26 build/C/man3/fmemopen.3:22
1030 #: build/C/man3/fputwc.3:24 build/C/man3/unlocked_stdio.3:54
1031 #, no-wrap
1032 msgid "B<#include E<lt>wchar.hE<gt>>\n"
1033 msgstr "B<#include E<lt>wchar.hE<gt>>\n"
1034
1035 #. type: Plain text
1036 #: build/C/man3/fgetwc.3:29
1037 #, no-wrap
1038 msgid ""
1039 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1040 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1041 msgstr ""
1042 "B<wint_t fgetwc(FILE *>I<stream>B<);>\n"
1043 "B<wint_t getwc(FILE *>I<stream>B<);>\n"
1044
1045 #. type: Plain text
1046 #: build/C/man3/fgetwc.3:44
1047 msgid "The B<fgetwc>()  function is the wide-character equivalent of the B<fgetc>(3)  function.  It reads a wide character from I<stream> and returns it.  If the end of stream is reached, or if I<ferror(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>."
1048 msgstr "B<fgetwc>()  関数は、 B<fgetc>(3)  に対応するワイド文字関数である。 この関数は I<stream> からワイド文字を 1 文字読み込み、これを返す。 ストリームの終端に達するか、I<ferror(stream)> が真になった場合には、 この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。"
1049
1050 #. type: Plain text
1051 #: build/C/man3/fgetwc.3:52
1052 msgid "The B<getwc>()  function or macro functions identically to B<fgetwc>().  It may be implemented as a macro, and may evaluate its argument more than once.  There is no reason ever to use it."
1053 msgstr "B<getwc>()  関数あるいはマクロは、 B<fgetwc>()  と全く同じ動作をする。 この関数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれない。この関数を使う理由はもはや存在しない。"
1054
1055 #. type: Plain text
1056 #: build/C/man3/fgetwc.3:64
1057 msgid "The B<fgetwc>()  function returns the next wide-character from the stream, or B<WEOF>.  In the event of an error, I<errno> is set to indicate the cause."
1058 msgstr "B<fgetwc>()  関数はストリームの次のワイド文字か、あるいは B<WEOF> を返す。 エラーが起こった場合、 I<errno> にエラーの原因を示す値が設定される。"
1059
1060 #. type: Plain text
1061 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65
1062 msgid "Apart from the usual ones, there is"
1063 msgstr "通常のエラーに加えて、以下のエラーがある:"
1064
1065 #. type: TP
1066 #: build/C/man3/fgetwc.3:66 build/C/man3/fputwc.3:65 build/C/man3/scanf.3:558
1067 #, no-wrap
1068 msgid "B<EILSEQ>"
1069 msgstr "B<EILSEQ>"
1070
1071 #. type: Plain text
1072 #: build/C/man3/fgetwc.3:70
1073 msgid "The data obtained from the input stream does not form a valid character."
1074 msgstr "入力ストリームから取得したデータが、正しい文字でない。"
1075
1076 #. type: Plain text
1077 #: build/C/man3/fgetwc.3:72 build/C/man3/fputwc.3:70
1078 msgid "C99, POSIX.1-2001."
1079 msgstr "C99, POSIX.1-2001."
1080
1081 #. type: Plain text
1082 #: build/C/man3/fgetwc.3:79
1083 msgid "The behavior of B<fgetwc>()  depends on the B<LC_CTYPE> category of the current locale."
1084 msgstr "B<fgetwc>()  の動作は、現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
1085
1086 #. type: Plain text
1087 #: build/C/man3/fgetwc.3:87
1088 msgid "In the absence of additional information passed to the B<fopen>(3)  call, it is reasonable to expect that B<fgetwc>()  will actually read a multibyte sequence from the stream and then convert it to a wide character."
1089 msgstr "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fgetwc>()  が実際 にはマルチバイトシーケンスをストリームから読み込み、これをワイド文字に 変換すると期待することは適切である。"
1090
1091 #. type: Plain text
1092 #: build/C/man3/fgetwc.3:92
1093 msgid "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1094 msgstr "B<fgetws>(3), B<fputwc>(3), B<ungetwc>(3), B<unlocked_stdio>(3)"
1095
1096 #. type: TH
1097 #: build/C/man3/flockfile.3:25
1098 #, no-wrap
1099 msgid "FLOCKFILE"
1100 msgstr "FLOCKFILE"
1101
1102 #. type: TH
1103 #: build/C/man3/flockfile.3:25 build/C/man2/link.2:32
1104 #: build/C/man3/lseek64.3:25 build/C/man3/remove.3:31 build/C/man2/rename.2:33
1105 #: build/C/man3/setbuf.3:48 build/C/man2/symlink.2:33 build/C/man2/unlink.2:33
1106 #, no-wrap
1107 msgid "2014-08-19"
1108 msgstr "2014-08-19"
1109
1110 #. type: Plain text
1111 #: build/C/man3/flockfile.3:28
1112 msgid "flockfile, ftrylockfile, funlockfile - lock FILE for stdio"
1113 msgstr "flockfile, ftrylockfile, funlockfile - 標準入出力 FILE のロックを行う"
1114
1115 #. type: Plain text
1116 #: build/C/man3/flockfile.3:33
1117 #, no-wrap
1118 msgid "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1119 msgstr "B<void flockfile(FILE *>I<filehandle>B<);>\n"
1120
1121 #. type: Plain text
1122 #: build/C/man3/flockfile.3:35
1123 #, no-wrap
1124 msgid "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1125 msgstr "B<int ftrylockfile(FILE *>I<filehandle>B<);>\n"
1126
1127 #. type: Plain text
1128 #: build/C/man3/flockfile.3:37
1129 #, no-wrap
1130 msgid "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1131 msgstr "B<void funlockfile(FILE *>I<filehandle>B<);>\n"
1132
1133 #. type: Plain text
1134 #: build/C/man3/flockfile.3:46 build/C/man3/wprintf.3:43
1135 msgid "All functions shown above:"
1136 msgstr "上記の全ての関数:"
1137
1138 #. type: Plain text
1139 #: build/C/man3/flockfile.3:49
1140 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || _POSIX_SOURCE"
1141 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE || _POSIX_SOURCE"
1142
1143 #. type: Plain text
1144 #: build/C/man3/flockfile.3:63
1145 msgid "The stdio functions are thread-safe.  This is achieved by assigning to each I<FILE> object a lockcount and (if the lockcount is nonzero)  an owning thread.  For each library call, these functions wait until the I<FILE> object is no longer locked by a different thread, then lock it, do the requested I/O, and unlock the object again."
1146 msgstr "標準入出力関数はスレッドセーフである。これは、各 I<FILE> オブジェクトに対し、ロック数 (lockcount) と (ロック数が 0 でない場合は) 所有者スレッド (owner thread)  を管理することで実現される。 ライブラリの呼び出しが行われる毎に、標準入出力関数は I<FILE> オブジェクトが他のスレッドによってロックされていない状態になるまで待ち、 I<FILE> オブジェクトをロックし、要求されて入出力を行い、 オブジェクトのロックを解除する。"
1147
1148 #. type: Plain text
1149 #: build/C/man3/flockfile.3:69
1150 msgid "(Note: this locking has nothing to do with the file locking done by functions like B<flock>(2)  and B<lockf>(3).)"
1151 msgstr "(注: このロックは、 B<flock>(2)  や B<lockf>(3)  といった関数が行うロックとは全く無関係である。)"
1152
1153 #. type: Plain text
1154 #: build/C/man3/flockfile.3:77
1155 msgid "All this is invisible to the C-programmer, but there may be two reasons to wish for more detailed control.  On the one hand, maybe a series of I/O actions by one thread belongs together, and should not be interrupted by the I/O of some other thread.  On the other hand, maybe the locking overhead should be avoided for greater efficiency."
1156 msgstr "これらのことはすべて C プログラマには見えない部分で行われるが、 より細かい制御ができた方がよい理由が2つあるだろう。一つは、一つのスレッドが 行う一連の入出力動作は一緒に行われ、他のスレッドの入出力によって中断されない 方がよいということであろう。もう一つは、効率を大きく上げるためには ロックのオーバヘッドを避ける必要があるということであろう。"
1157
1158 #. type: Plain text
1159 #: build/C/man3/flockfile.3:94
1160 msgid "To this end, a thread can explicitly lock the I<FILE> object, then do its series of I/O actions, then unlock.  This prevents other threads from coming in between.  If the reason for doing this was to achieve greater efficiency, one does the I/O with the nonlocking versions of the stdio functions: with B<getc_unlocked>(3)  and B<putc_unlocked>(3)  instead of B<getc>(3)  and B<putc>(3)."
1161 msgstr "この目的を実現するために、 I<FILE> オブジェクトのロック、一連の入出力動作の実行、 ロックの解除をスレッドが明示的に指示することができる。 これにより、他のスレッドが途中で入出力を行うのを防止する。 このようなことを行う理由が効率の向上であるならば、 ロックを行わないバージョンの標準入出力関数を使うこともできる。 例えば、 B<getc>(3)  や B<putc>(3)  の代わりに B<getc_unlocked>(3)  や B<putc_unlocked>(3)  を使用する。"
1162
1163 #. type: Plain text
1164 #: build/C/man3/flockfile.3:105
1165 msgid "The B<flockfile>()  function waits for I<*filehandle> to be no longer locked by a different thread, then makes the current thread owner of I<*filehandle>, and increments the lockcount."
1166 msgstr "B<flockfile>()  関数は、I<*filehandle> が他のスレッドにロックされていな い状態になるまで待ったのち、現在のスレッドを I<*filehandle> のオーナに設 定し、ロック数を加算する。"
1167
1168 #. type: Plain text
1169 #: build/C/man3/flockfile.3:109
1170 msgid "The B<funlockfile>()  function decrements the lock count."
1171 msgstr "B<funlockfile>()  関数は、ロック数を減算する。"
1172
1173 #. type: Plain text
1174 #: build/C/man3/flockfile.3:120
1175 msgid "The B<ftrylockfile>()  function is a nonblocking version of B<flockfile>().  It does nothing in case some other thread owns I<*filehandle>, and it obtains ownership and increments the lockcount otherwise."
1176 msgstr "B<ftrylockfile>()  関数は B<flockfile>()  のブロッキングを行わない バージョンである。他のスレッドが I<*filehandle> をロックしている時は 何も行わず、そうでない場合は I<*filehandle> の所有権を獲得し、 ロック数を加算する。"
1177
1178 #. type: Plain text
1179 #: build/C/man3/flockfile.3:125
1180 msgid "The B<ftrylockfile>()  function returns zero for success (the lock was obtained), and nonzero for failure."
1181 msgstr "B<ftrylockfile>()  関数はロックに成功すると 0 を返し、 失敗した場合は 0 以外の値を返す。"
1182
1183 #. type: Plain text
1184 #: build/C/man3/flockfile.3:127
1185 msgid "None."
1186 msgstr "なし。"
1187
1188 #. type: Plain text
1189 #: build/C/man3/flockfile.3:135
1190 msgid "The B<flockfile>(), B<ftrylockfile>(), and B<funlockfile>()  functions are thread-safe."
1191 msgstr "関数 B<flockfile>(), B<ftrylockfile>(), B<funlockfile>() はスレッドセーフである。"
1192
1193 #. type: Plain text
1194 #: build/C/man3/flockfile.3:137 build/C/man3/popen.3:174
1195 msgid "POSIX.1-2001."
1196 msgstr "POSIX.1-2001."
1197
1198 #. type: SH
1199 #: build/C/man3/flockfile.3:137
1200 #, no-wrap
1201 msgid "AVAILABILITY"
1202 msgstr "可用性"
1203
1204 #. type: Plain text
1205 #: build/C/man3/flockfile.3:141
1206 msgid "These functions are available when B<_POSIX_THREAD_SAFE_FUNCTIONS> is defined."
1207 msgstr "B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されているときにこれらの関数を使用することができる。"
1208
1209 #. type: Plain text
1210 #: build/C/man3/flockfile.3:143
1211 msgid "B<unlocked_stdio>(3)"
1212 msgstr "B<unlocked_stdio>(3)"
1213
1214 #. type: TH
1215 #: build/C/man3/fmemopen.3:10
1216 #, no-wrap
1217 msgid "FMEMOPEN"
1218 msgstr "FMEMOPEN"
1219
1220 #. type: Plain text
1221 #: build/C/man3/fmemopen.3:13
1222 msgid "fmemopen, open_memstream, open_wmemstream - open memory as stream"
1223 msgstr "fmemopen, open_memstream, open_wmemstream - メモリをストリームとしてオープンする"
1224
1225 #. type: Plain text
1226 #: build/C/man3/fmemopen.3:18
1227 #, no-wrap
1228 msgid "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1229 msgstr "B<FILE *fmemopen(void *>I<buf>B<, size_t >I<size>B<, const char *>I<mode>B<);>\n"
1230
1231 #. type: Plain text
1232 #: build/C/man3/fmemopen.3:20
1233 #, no-wrap
1234 msgid "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1235 msgstr "B<FILE *open_memstream(char **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1236
1237 #. type: Plain text
1238 #: build/C/man3/fmemopen.3:24
1239 #, no-wrap
1240 msgid "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1241 msgstr "B<FILE *open_wmemstream(wchar_t **>I<ptr>B<, size_t *>I<sizeloc>B<);>\n"
1242
1243 #. type: Plain text
1244 #: build/C/man3/fmemopen.3:34
1245 msgid "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1246 msgstr "B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>():"
1247
1248 #. type: Plain text
1249 #: build/C/man3/fmemopen.3:57
1250 msgid "The B<fmemopen>()  function opens a stream that permits the access specified by I<mode>.  The stream allows I/O to be performed on the string or memory buffer pointed to by I<buf>.  This buffer must be at least I<size> bytes long."
1251 msgstr "B<fmemopen>()  関数は、ストリームをオープンし、そのストリームに I<mode> で指定されたアクセス許可を設定する。 そのストリームを通じて、 I<buf> で指定された文字列やメモリバッファへの読み書きができる。 このバッファは少なくとも I<size> バイトの長さでなければならない。"
1252
1253 #. type: Plain text
1254 #: build/C/man3/fmemopen.3:77
1255 msgid "The argument I<mode> is the same as for B<fopen>(3).  If I<mode> specifies an append mode, then the initial file position is set to the location of the first null byte (\\(aq\\e0\\(aq) in the buffer; otherwise the initial file position is set to the start of the buffer.  Since glibc 2.9, the letter \\(aqb\\(aq may be specified as the second character in I<mode>.  This provides \"binary\" mode: writes don't implicitly add a terminating null byte, and B<fseek>(3)  B<SEEK_END> is relative to the end of the buffer (i.e., the value specified by the I<size> argument), rather than the current string length."
1256 msgstr ""
1257 "引き数 I<mode> は B<fopen>(3) の場合と同じである。 I<mode> で追記モード\n"
1258 "(append mode) が指定された場合、ファイル位置の初期値は バッファ中の\n"
1259 "最初のヌルバイト (\\(aq\\e0\\(aq) の位置に設定される。\n"
1260 "それ以外の場合は、ファイル位置の初期値はバッファの先頭になる。 \n"
1261 "glibc 2.9 以降では、文字 \\(aqb\\(aq を I<mode> の二番目の文字として指定\n"
1262 "することができる。 この文字は「バイナリ」モードを指定するものである。\n"
1263 "このモードでは、書き込み時に文字列終端のヌルバイトが黙って追加 される\n"
1264 "ことはない。また、 B<fseek>(3) B<SEEK_END> は、文字列の長さからの相対値\n"
1265 "ではなく、バッファの末尾 (I<size> で指定した値) からの相対値となる。"
1266
1267 #. type: Plain text
1268 #: build/C/man3/fmemopen.3:89
1269 msgid "When a stream that has been opened for writing is flushed (B<fflush>(3))  or closed (B<fclose>(3)), a null byte is written at the end of the buffer if there is space.  The caller should ensure that an extra byte is available in the buffer (and that I<size> counts that byte)  to allow for this."
1270 msgstr "書き込み用にオープンされたストリームをフラッシュ (B<fflush>(3))  やクローズ (B<fclose>(3))  した時に、 (バッファに空きがあれば) ヌルバイトがバッファの末尾に書き込まれる。 このようにするためには、呼び出し元は バッファに 1バイト余裕を作る (I<size> にこの 1バイトを含めた値を指定する) 必要がある。"
1271
1272 #. type: Plain text
1273 #: build/C/man3/fmemopen.3:98
1274 msgid "Attempts to write more than I<size> bytes to the buffer result in an error.  (By default, such errors will be visible only when the I<stdio> buffer is flushed.  Disabling buffering with the following call may be useful to detect errors at the time of an output operation:"
1275 msgstr "バッファに I<size> バイトよりたくさん書き込もうとした場合には、エラーとなる。 (デフォルトでは、このようなエラーが見えるのは I<stdio> バッファがフラッシュされた時だけである。 以下の呼び出しを使ってバッファリングを無効にする方法は、 出力操作を行った時点でエラーを検出するのに役立つ。"
1276
1277 #. type: Plain text
1278 #: build/C/man3/fmemopen.3:100
1279 #, no-wrap
1280 msgid "    setbuf(stdream, NULL);\n"
1281 msgstr "    setbuf(stdream, NULL);\n"
1282
1283 #. type: Plain text
1284 #: build/C/man3/fmemopen.3:105
1285 msgid "Alternatively, the caller can explicitly set I<buf> as the stdio stream buffer, at the same time informing stdio of the buffer's size, using:"
1286 msgstr "別の方法としては、 以下のように、 呼び出し側が明示的に stdio ストリームバッファとして I<buf> を指定し、バッファの指定時にバッファのサイズを stdio に教える方法がある。"
1287
1288 #. type: Plain text
1289 #: build/C/man3/fmemopen.3:107
1290 #, no-wrap
1291 msgid "    setbuffer(stream, buf, size);\n"
1292 msgstr "    setbuffer(stream, buf, size);\n"
1293
1294 #. type: Plain text
1295 #: build/C/man3/fmemopen.3:119
1296 msgid "In a stream opened for reading, null bytes (\\(aq\\e0\\(aq) in the buffer do not cause read operations to return an end-of-file indication.  A read from the buffer will only indicate end-of-file when the file pointer advances I<size> bytes past the start of the buffer."
1297 msgstr "読み出し用にオープンされたストリームでは、 バッファ内にヌルバイト (\\(aq\\e0\\(aq) があっても 読み出し操作がファイル末尾 (end-of-file) を返すことはない。 バッファからの読み出しでファイル末尾が返るのは、 ファイルポインタがバッファの先頭から I<size> バイトを越えて先に進もうとした場合だけである。"
1298
1299 #. type: Plain text
1300 #: build/C/man3/fmemopen.3:134
1301 msgid "If I<buf> is specified as NULL, then B<fmemopen>()  dynamically allocates a buffer I<size> bytes long.  This is useful for an application that wants to write data to a temporary buffer and then read it back again.  The buffer is automatically freed when the stream is closed.  Note that the caller has no way to obtain a pointer to the temporary buffer allocated by this call (but see B<open_memstream>()  below)."
1302 msgstr "I<buf> に NULL が指定された場合、 B<fmemopen>()  は動的に I<size> バイトの長さのバッファを確保する。 この方法は、一時バッファにデータの書き込みを行ってから、 その内容を再度読み出すようなアプリケーションで有用である。 このバッファはストリームがクローズされるときに自動的に解放される。 呼び出し元からはこの関数が割り当てた一時バッファへのポインタ値を 知る方法は存在しない点に注意 (下記の B<open_memstream>()  も参照)。"
1303
1304 #. type: Plain text
1305 #: build/C/man3/fmemopen.3:145
1306 msgid "The B<open_memstream>()  function opens a stream for writing to a buffer.  The buffer is dynamically allocated (as with B<malloc>(3)), and automatically grows as required.  After closing the stream, the caller should B<free>(3)  this buffer."
1307 msgstr "B<open_memstream>()  関数は、バッファへの書き込み用にストリームをオープンする。 バッファは (B<malloc>(3)  を使って) 動的に割り当てられ、必要に応じて自動的に伸長する。 ストリームをクローズした後で、呼び出し元はこのバッファを B<free>(3)  すべきである。"
1308
1309 #. type: Plain text
1310 #: build/C/man3/fmemopen.3:160
1311 msgid "When the stream is closed (B<fclose>(3))  or flushed (B<fflush>(3)), the locations pointed to by I<ptr> and I<sizeloc> are updated to contain, respectively, a pointer to the buffer and the current size of the buffer.  These values remain valid only as long as the caller performs no further output on the stream.  If further output is performed, then the stream must again be flushed before trying to access these variables."
1312 msgstr "このストリームが クローズ (B<fclose>(3))  されたりフラッシュ (B<fflush>(3))  された時に、 I<ptr> と I<sizeloc> の値はそれぞれバッファへのポインタとそのサイズに更新される。 これらの値は、呼び出し元がそのストリームに新たな書き込みを 行わない場合に限り有効である。 ストリームに書き込みを行った際には、これらの変数を参照する前に ストリームを再度フラッシュしなければならない。"
1313
1314 #. type: Plain text
1315 #: build/C/man3/fmemopen.3:166
1316 msgid "A null byte is maintained at the end of the buffer.  This byte is I<not> included in the size value stored at I<sizeloc>."
1317 msgstr "バッファ末尾のヌルバイトは保持される。 このヌルバイトは I<sizeloc> に格納されるサイズには「含まれない」。"
1318
1319 #. type: Plain text
1320 #: build/C/man3/fmemopen.3:174
1321 msgid "The stream's file position can be changed with B<fseek>(3)  or B<fseeko>(3).  Moving the file position past the end of the data already written fills the intervening space with zeros."
1322 msgstr "ストリームのファイル位置は B<fseek>(3)  や B<fseeko>(3)  で変更できる。 すでにデータが書き込まれた領域の末尾より先にファイル位置を動かすと、 その間の領域は 0 で埋められる。"
1323
1324 #. type: Plain text
1325 #: build/C/man3/fmemopen.3:180
1326 msgid "The B<open_wmemstream>()  is similar to B<open_memstream>(), but operates on wide characters instead of bytes."
1327 msgstr "B<open_wmemstream>()  は B<open_memstream>()  と同様だが、バイトではなくワイド文字に対して操作を行う点が異なる。"
1328
1329 #. type: Plain text
1330 #: build/C/man3/fmemopen.3:192
1331 msgid "Upon successful completion B<fmemopen>(), B<open_memstream>()  and B<open_wmemstream>()  return a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to indicate the error."
1332 msgstr "成功して終了した場合には、 B<fmemopen>(), B<open_memstream>(), B<open_wmemstream>()  は I<FILE> ポインタを返す。 失敗した場合は、 NULL を返し、 I<errno> にエラーを示す値をセットする。"
1333
1334 #. type: SH
1335 #: build/C/man3/fmemopen.3:192 build/C/man3/fmtmsg.3:222
1336 #: build/C/man3/fseeko.3:100 build/C/man2/link.2:334 build/C/man2/open.2:1016
1337 #: build/C/man2/open_by_handle_at.2:349 build/C/man2/pipe.2:154
1338 #: build/C/man2/readlink.2:212 build/C/man2/readv.2:211
1339 #: build/C/man2/rename.2:397 build/C/man2/symlink.2:224
1340 #: build/C/man2/unlink.2:269
1341 #, no-wrap
1342 msgid "VERSIONS"
1343 msgstr "バージョン"
1344
1345 #. type: Plain text
1346 #: build/C/man3/fmemopen.3:199
1347 msgid "B<fmemopen>()  and B<open_memstream>()  were already available in glibc 1.0.x.  B<open_wmemstream>()  is available since glibc 2.4."
1348 msgstr "B<fmemopen>()  と B<open_memstream>()  は glibc 1.0.x ですでに利用可能であった。 B<open_wmemstream>()  は glibc 2.4 以降で利用可能である。"
1349
1350 #. type: Plain text
1351 #: build/C/man3/fmemopen.3:203
1352 msgid "POSIX.1-2008.  These functions are not specified in POSIX.1-2001, and are not widely available on other systems."
1353 msgstr "POSIX.1-2008.  これらの関数は POSIX.1-2001 では規定れていないが、 Linux 以外のシステムで広く利用可能である。"
1354
1355 #.  http://austingroupbugs.net/view.php?id=396
1356 #. type: Plain text
1357 #: build/C/man3/fmemopen.3:211
1358 msgid "POSIX.1-2008 specifies that \\(aqb\\(aq in I<mode> shall be ignored.  However, Technical Corrigendum 1 adjusts the standard to allow implementation-specific treatment for this case, thus permitting the glibc treatment of \\(aqb\\(aq."
1359 msgstr ""
1360 "POSIX.1-2008 では I<mode> の \\(aqb\\(aq は無視されるべきだと規定されて\n"
1361 "いる。一方、Technical Corrigendum (正誤表) 1 では、I<mode> の\n"
1362 "\\(aqb\\(aq が指定された場合の扱いは実装依存であることを許容するように\n"
1363 "標準規格が修正されており、glibc の \\(aqb\\(aq の扱いは許されている。"
1364
1365 #. type: Plain text
1366 #: build/C/man3/fmemopen.3:217
1367 msgid "There is no file descriptor associated with the file stream returned by these functions (i.e., B<fileno>(3)  will return an error if called on the returned stream)."
1368 msgstr "これらの関数が返すファイルストリームに対応するファイル ディスクリプタはない (つまり、返されたストリームに対して B<fileno>(3)  を呼び出すとエラーが返ることになる)。"
1369
1370 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=1996
1371 #. type: Plain text
1372 #: build/C/man3/fmemopen.3:224
1373 msgid "In glibc before version 2.7, seeking past the end of a stream created by B<open_memstream>()  does not enlarge the buffer; instead the B<fseek>(3)  call fails, returning -1."
1374 msgstr "バージョン 2.7 より前の glibc では、 B<open_memstream>()  で作成されたストリームの末尾より先にファイル位置を動かしても、 バッファが伸長されず、 B<fseek>(3)  が失敗し -1 が返る。"
1375
1376 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=11216
1377 #. type: Plain text
1378 #: build/C/man3/fmemopen.3:235
1379 msgid "If I<size> is specified as zero, B<fmemopen>()  fails with the error B<EINVAL>.  It would be more consistent if this case successfully created a stream that then returned end of file on the first attempt at reading.  Furthermore, POSIX.1-2008 does not specify a failure for this case."
1380 msgstr ""
1381 "I<size> に 0 が指定された場合、 B<fmemopen>() はエラー B<EINVAL> で失敗\n"
1382 "する。この場合にはストリームの作成に成功して、最初の読み出しを行った際に\n"
1383 "EOF (end of file) が返される方が、ストリームの扱いの一貫性が増すだろう。\n"
1384 "また、 POSIX.1-2008 ではこの場合のエラーは規定されていない。"
1385
1386 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=13152
1387 #. type: Plain text
1388 #: build/C/man3/fmemopen.3:243
1389 msgid "Specifying append mode (\"a\" or \"a+\") for B<fmemopen>()  sets the initial file position to the first null byte, but (if the file offset is reset to a location other than the end of the stream)  does not force subsequent writes to append at the end of the stream."
1390 msgstr ""
1391 "B<fmemopen>() に追記モード (\"a\" や \"a+\") を指定すると、\n"
1392 "ファイル位置の初期値は最初のヌルバイトに設定されるが、(ファイル\n"
1393 "オフセットをストリームの末尾以外の位置に再設定した場合)それ以降の\n"
1394 "書き込みではストリームの末尾への追記が行われる訳ではない。"
1395
1396 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=13151
1397 #. type: Plain text
1398 #: build/C/man3/fmemopen.3:259
1399 msgid "If the I<mode> argument to B<fmemopen>()  specifies append (\"a\" or \"a+\"), and the I<size> argument does not cover a null byte in I<buf>, then, according to POSIX.1-2008, the initial file position should be set to the next byte after the end of the buffer.  However, in this case the glibc B<fmemopen>()  sets the file position to -1."
1400 msgstr ""
1401 "B<fmemopen>() の I<mode> 引き数に追記モード (\"a\" や \"a+\") を指定し、\n"
1402 "I<size> 引き数で指定した範囲の I<buf> 内にヌルバイトがない場合、\n"
1403 "POSIX.1-2008 では、ファイル位置の初期値はバッファの末尾の直後の\n"
1404 "バイトに設定すべきとされている。しかし、glibc の B<fmemopen>() では\n"
1405 "この場合ファイル位置は -1 に設定される。"
1406
1407 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12836
1408 #. type: Plain text
1409 #: build/C/man3/fmemopen.3:272
1410 msgid "To specify binary mode for B<fmemopen>()  the \\(aqb\\(aq must be the I<second> character in I<mode>.  Thus, for example, \"wb+\" has the desired effect, but \"w+b\" does not.  This is inconsistent with the treatment of I<mode> by B<fopen>(3)."
1411 msgstr ""
1412 "B<fmemopen>() でバイナリモードを指定するには、\n"
1413 "\\(aqb\\(aq は I<mode> の I<2 文字目> でなければならない。\n"
1414 "例えば、 \"wb+\" は意図通りの効果になるが、 \"w+b\" はそうではない。\n"
1415 "これは B<fopen>(3) の I<mode> の扱いとは異なる。"
1416
1417 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=6544
1418 #. type: Plain text
1419 #: build/C/man3/fmemopen.3:280
1420 msgid "The glibc 2.9 addition of \"binary\" mode for B<fmemopen>()  silently changed the ABI: previously, B<fmemopen>()  ignored \\(aqb\\(aq in I<mode>."
1421 msgstr ""
1422 "glibc 2.9 での B<fmemopen>() の「バイナリ」モードの追加は、\n"
1423 "ABI (Application Binary Interface) が黙って変更された。\n"
1424 "それ以前の B<fmemopen>() では I<mode> 内の \\(aqb\\(aq は無視されていた。"
1425
1426 #. type: SH
1427 #: build/C/man3/fmemopen.3:280 build/C/man3/fmtmsg.3:256
1428 #: build/C/man3/fopencookie.3:247 build/C/man3/getline.3:144
1429 #: build/C/man2/open_by_handle_at.2:439 build/C/man2/pipe.2:165
1430 #: build/C/man3/printf.3:995 build/C/man2/readlink.2:269
1431 #: build/C/man2/readv.2:301 build/C/man3/scanf.3:704
1432 #, no-wrap
1433 msgid "EXAMPLE"
1434 msgstr "例"
1435
1436 #. type: Plain text
1437 #: build/C/man3/fmemopen.3:290
1438 msgid "The program below uses B<fmemopen>()  to open an input buffer, and B<open_memstream>()  to open a dynamically sized output buffer.  The program scans its input string (taken from the program's first command-line argument) reading integers, and writes the squares of these integers to the output buffer.  An example of the output produced by this program is the following:"
1439 msgstr "このプログラムは B<fmemopen>()  を使って出力バッファをオープンし、 B<open_memstream>()  を使って動的にサイズが変化する出力バッファをオープンしている。 (プログラムの第一コマンドライン引き数から取った) 入力文字列を スキャンして整数を読み込み、これらの整数の二乗を出力バッファに書き出す。 このプログラムの実行例は以下のようになる。"
1440
1441 #. type: Plain text
1442 #: build/C/man3/fmemopen.3:295
1443 #, no-wrap
1444 msgid ""
1445 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1446 "size=11; ptr=1 529 1849\n"
1447 msgstr ""
1448 "$B< ./a.out \\(aq1 23 43\\(aq>\n"
1449 "size=11; ptr=1 529 1849\n"
1450
1451 #. type: SS
1452 #: build/C/man3/fmemopen.3:297 build/C/man3/fopencookie.3:271
1453 #: build/C/man2/pipe.2:181
1454 #, no-wrap
1455 msgid "Program source"
1456 msgstr "プログラムのソース"
1457
1458 #. type: Plain text
1459 #: build/C/man3/fmemopen.3:304
1460 #, no-wrap
1461 msgid ""
1462 "#define _GNU_SOURCE\n"
1463 "#include E<lt>string.hE<gt>\n"
1464 "#include E<lt>stdio.hE<gt>\n"
1465 "#include E<lt>stdlib.hE<gt>\n"
1466 msgstr ""
1467 "#define _GNU_SOURCE\n"
1468 "#include E<lt>string.hE<gt>\n"
1469 "#include E<lt>stdio.hE<gt>\n"
1470 "#include E<lt>stdlib.hE<gt>\n"
1471
1472 #. type: Plain text
1473 #: build/C/man3/fmemopen.3:307
1474 #, no-wrap
1475 msgid ""
1476 "#define handle_error(msg) \\e\n"
1477 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1478 msgstr ""
1479 "#define handle_error(msg) \\e\n"
1480 "    do { perror(msg); exit(EXIT_FAILURE); } while (0)\n"
1481
1482 #. type: Plain text
1483 #: build/C/man3/fmemopen.3:315
1484 #, no-wrap
1485 msgid ""
1486 "int\n"
1487 "main(int argc, char *argv[])\n"
1488 "{\n"
1489 "    FILE *out, *in;\n"
1490 "    int v, s;\n"
1491 "    size_t size;\n"
1492 "    char *ptr;\n"
1493 msgstr ""
1494 "int\n"
1495 "main(int argc, char *argv[])\n"
1496 "{\n"
1497 "    FILE *out, *in;\n"
1498 "    int v, s;\n"
1499 "    size_t size;\n"
1500 "    char *ptr;\n"
1501
1502 #. type: Plain text
1503 #: build/C/man3/fmemopen.3:320
1504 #, no-wrap
1505 msgid ""
1506 "    if (argc != 2) {\n"
1507 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1508 "        exit(EXIT_FAILURE);\n"
1509 "    }\n"
1510 msgstr ""
1511 "    if (argc != 2) {\n"
1512 "        fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\en\", argv[0]);\n"
1513 "        exit(EXIT_FAILURE);\n"
1514 "    }\n"
1515
1516 #. type: Plain text
1517 #: build/C/man3/fmemopen.3:324
1518 #, no-wrap
1519 msgid ""
1520 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1521 "    if (in == NULL)\n"
1522 "        handle_error(\"fmemopen\");\n"
1523 msgstr ""
1524 "    in = fmemopen(argv[1], strlen(argv[1]), \"r\");\n"
1525 "    if (in == NULL)\n"
1526 "        handle_error(\"fmemopen\");\n"
1527
1528 #. type: Plain text
1529 #: build/C/man3/fmemopen.3:328
1530 #, no-wrap
1531 msgid ""
1532 "    out = open_memstream(&ptr, &size);\n"
1533 "    if (out == NULL)\n"
1534 "        handle_error(\"open_memstream\");\n"
1535 msgstr ""
1536 "    out = open_memstream(&ptr, &size);\n"
1537 "    if (out == NULL)\n"
1538 "        handle_error(\"open_memstream\");\n"
1539
1540 #. type: Plain text
1541 #: build/C/man3/fmemopen.3:333
1542 #, no-wrap
1543 msgid ""
1544 "    for (;;) {\n"
1545 "        s = fscanf(in, \"%d\", &v);\n"
1546 "        if (s E<lt>= 0)\n"
1547 "            break;\n"
1548 msgstr ""
1549 "    for (;;) {\n"
1550 "        s = fscanf(in, \"%d\", &v);\n"
1551 "        if (s E<lt>= 0)\n"
1552 "            break;\n"
1553
1554 #. type: Plain text
1555 #: build/C/man3/fmemopen.3:344
1556 #, no-wrap
1557 msgid ""
1558 "        s = fprintf(out, \"%d \", v * v);\n"
1559 "        if (s == -1)\n"
1560 "            handle_error(\"fprintf\");\n"
1561 "    }\n"
1562 "    fclose(in);\n"
1563 "    fclose(out);\n"
1564 "    printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n"
1565 "    free(ptr);\n"
1566 "    exit(EXIT_SUCCESS);\n"
1567 "}\n"
1568 msgstr ""
1569 "        s = fprintf(out, \"%d \", v * v);\n"
1570 "        if (s == -1)\n"
1571 "            handle_error(\"fprintf\");\n"
1572 "    }\n"
1573 "    fclose(in);\n"
1574 "    fclose(out);\n"
1575 "    printf(\"size=%zu; ptr=%s\\en\", size, ptr);\n"
1576 "    free(ptr);\n"
1577 "    exit(EXIT_SUCCESS);\n"
1578 "}\n"
1579
1580 #. type: Plain text
1581 #: build/C/man3/fmemopen.3:348
1582 msgid "B<fopen>(3), B<fopencookie>(3)"
1583 msgstr "B<fopen>(3), B<fopencookie>(3)"
1584
1585 #. type: TH
1586 #: build/C/man3/fmtmsg.3:13
1587 #, no-wrap
1588 msgid "FMTMSG"
1589 msgstr "FMTMSG"
1590
1591 #. type: Plain text
1592 #: build/C/man3/fmtmsg.3:16
1593 msgid "fmtmsg - print formatted error messages"
1594 msgstr "fmtmsg - 整形されたエラーメッセージを表示する"
1595
1596 #. type: Plain text
1597 #: build/C/man3/fmtmsg.3:19
1598 #, no-wrap
1599 msgid "B<#include E<lt>fmtmsg.hE<gt>>\n"
1600 msgstr "B<#include E<lt>fmtmsg.hE<gt>>\n"
1601
1602 #. type: Plain text
1603 #: build/C/man3/fmtmsg.3:21
1604 #, no-wrap
1605 msgid "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1606 msgstr "B<int fmtmsg(long >I<classification>B<, const char *>I<label>B<,>\n"
1607
1608 #. type: Plain text
1609 #: build/C/man3/fmtmsg.3:23
1610 #, no-wrap
1611 msgid "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1612 msgstr "B<           int >I<severity>B<, const char *>I<text>B<,>\n"
1613
1614 #. type: Plain text
1615 #: build/C/man3/fmtmsg.3:25
1616 #, no-wrap
1617 msgid "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1618 msgstr "B<           const char *>I<action>B<, const char *>I<tag>B<);>\n"
1619
1620 #. type: Plain text
1621 #: build/C/man3/fmtmsg.3:36
1622 msgid "This function displays a message described by its arguments on the device(s)  specified in the I<classification> argument.  For messages written to I<stderr>, the format depends on the B<MSGVERB> environment variable."
1623 msgstr "この関数は、引き数で記述されたメッセージを、 I<classification> 引き数で指定されたデバイス上に表示する。 I<stderr> に書き出されるメッセージのフォーマットは、 B<MSGVERB> 環境変数に依存する。"
1624
1625 #. type: Plain text
1626 #: build/C/man3/fmtmsg.3:43
1627 msgid "The I<label> argument identifies the source of the message.  The string must consist of two colon separated parts where the first part has not more than 10 and the second part not more than 14 characters."
1628 msgstr "I<label> 引き数はメッセージの発生源を識別する。 この文字列はコロンで区切られた 2 つの部分から構成されていなければならない。 1 つ目の部分は 10 文字以内でなければならず、 2 つ目の部分は 14 文字以内でなければならない。"
1629
1630 #. type: Plain text
1631 #: build/C/man3/fmtmsg.3:47
1632 msgid "The I<text> argument describes the condition of the error."
1633 msgstr "I<text> 引き数にはエラー条件を記述する。"
1634
1635 #. type: Plain text
1636 #: build/C/man3/fmtmsg.3:52
1637 msgid "The I<action> argument describes possible steps to recover from the error.  If it is printed, it is prefixed by \"TO FIX: \"."
1638 msgstr "I<action> 引き数にはエラーから回復するために利用可能なステップを記述する。 これが表示される場合、\"TO FIX: \" が前に付く。"
1639
1640 #. type: Plain text
1641 #: build/C/man3/fmtmsg.3:60
1642 msgid "The I<tag> argument is a reference to the online documentation where more information can be found.  It should contain the I<label> value and a unique identification number."
1643 msgstr "I<tag> 引き数はより多くの情報を見つけるためのオンラインドキュメントへの参照である。 これは I<label> 値とユニークな識別番号を含んでいるべきである。"
1644
1645 #. type: SS
1646 #: build/C/man3/fmtmsg.3:60
1647 #, no-wrap
1648 msgid "Dummy arguments"
1649 msgstr "ダミー引き数"
1650
1651 #. type: Plain text
1652 #: build/C/man3/fmtmsg.3:79
1653 msgid "Each of the arguments can have a dummy value.  The dummy classification value B<MM_NULLMC> (0L) does not specify any output, so nothing is printed.  The dummy severity value B<NO_SEV> (0) says that no severity is supplied.  The values B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> are synonyms for I<((char\\ *)\\ 0)>, the empty string, and B<MM_NULLSEV> is a synonym for B<NO_SEV>."
1654 msgstr "各引き数にはダミーの値を入れることができる。 ダミーの I<classification> 値 B<MM_NULLMC> (0L) は出力を何も指定しない。そのため何も表示されない。 ダミーの I<severity> 値 B<NO_SEV> (0) は重大度 (severity) が与えられていないことを表す。 値 B<MM_NULLLBL>, B<MM_NULLTXT>, B<MM_NULLACT>, B<MM_NULLTAG> は I<((char\\ *)\\ 0)> と空文字列の別名であり、 B<MM_NULLSEV> は B<NO_SEV> の別名である。"
1655
1656 #. type: SS
1657 #: build/C/man3/fmtmsg.3:79
1658 #, no-wrap
1659 msgid "The classification argument"
1660 msgstr "classification 引き数"
1661
1662 #. type: Plain text
1663 #: build/C/man3/fmtmsg.3:83
1664 msgid "The I<classification> argument is the sum of values describing 4 types of information."
1665 msgstr "I<classification> 引き数は 4 種類の情報を記述する値の和である。"
1666
1667 #. type: Plain text
1668 #: build/C/man3/fmtmsg.3:86
1669 msgid "The first value defines the output channel."
1670 msgstr "最初の値は出力チャンネルを定義する。"
1671
1672 #. type: TP
1673 #: build/C/man3/fmtmsg.3:86
1674 #, no-wrap
1675 msgid "B<MM_PRINT>"
1676 msgstr "B<MM_PRINT>"
1677
1678 #. type: Plain text
1679 #: build/C/man3/fmtmsg.3:90
1680 msgid "Output to I<stderr>."
1681 msgstr "I<stderr> に出力する。"
1682
1683 #. type: TP
1684 #: build/C/man3/fmtmsg.3:90
1685 #, no-wrap
1686 msgid "B<MM_CONSOLE>"
1687 msgstr "B<MM_CONSOLE>"
1688
1689 #. type: Plain text
1690 #: build/C/man3/fmtmsg.3:93
1691 msgid "Output to the system console."
1692 msgstr "システムコンソールに出力する。"
1693
1694 #. type: TP
1695 #: build/C/man3/fmtmsg.3:93
1696 #, no-wrap
1697 msgid "B<MM_PRINT | MM_CONSOLE>"
1698 msgstr "B<MM_PRINT | MM_CONSOLE>"
1699
1700 #. type: Plain text
1701 #: build/C/man3/fmtmsg.3:96
1702 msgid "Output to both."
1703 msgstr "両方に出力する。"
1704
1705 #. type: Plain text
1706 #: build/C/man3/fmtmsg.3:98
1707 msgid "The second value is the source of the error:"
1708 msgstr "2 番目の値はエラーの発生源である:"
1709
1710 #. type: TP
1711 #: build/C/man3/fmtmsg.3:98
1712 #, no-wrap
1713 msgid "B<MM_HARD>"
1714 msgstr "B<MM_HARD>"
1715
1716 #. type: Plain text
1717 #: build/C/man3/fmtmsg.3:101
1718 msgid "A hardware error occurred."
1719 msgstr "ハードウェアエラーが起こった。"
1720
1721 #. type: TP
1722 #: build/C/man3/fmtmsg.3:101
1723 #, no-wrap
1724 msgid "B<MM_FIRM>"
1725 msgstr "B<MM_FIRM>"
1726
1727 #. type: Plain text
1728 #: build/C/man3/fmtmsg.3:104
1729 msgid "A firmware error occurred."
1730 msgstr "ファームウェアエラーが起こった。"
1731
1732 #. type: TP
1733 #: build/C/man3/fmtmsg.3:104
1734 #, no-wrap
1735 msgid "B<MM_SOFT>"
1736 msgstr "B<MM_SOFT>"
1737
1738 #. type: Plain text
1739 #: build/C/man3/fmtmsg.3:107
1740 msgid "A software error occurred."
1741 msgstr "ソフトウェアエラーが起こった。"
1742
1743 #. type: Plain text
1744 #: build/C/man3/fmtmsg.3:109
1745 msgid "The third value encodes the detector of the problem:"
1746 msgstr "3 番目の値は問題の検知を行ったものをエンコードする:"
1747
1748 #. type: TP
1749 #: build/C/man3/fmtmsg.3:109
1750 #, no-wrap
1751 msgid "B<MM_APPL>"
1752 msgstr "B<MM_APPL>"
1753
1754 #. type: Plain text
1755 #: build/C/man3/fmtmsg.3:112
1756 msgid "It is detected by an application."
1757 msgstr "アプリケーションによって検知された。"
1758
1759 #. type: TP
1760 #: build/C/man3/fmtmsg.3:112
1761 #, no-wrap
1762 msgid "B<MM_UTIL>"
1763 msgstr "B<MM_UTIL>"
1764
1765 #. type: Plain text
1766 #: build/C/man3/fmtmsg.3:115
1767 msgid "It is detected by a utility."
1768 msgstr "ユーティリティによって検知された。"
1769
1770 #. type: TP
1771 #: build/C/man3/fmtmsg.3:115
1772 #, no-wrap
1773 msgid "B<MM_OPSYS>"
1774 msgstr "B<MM_OPSYS>"
1775
1776 #. type: Plain text
1777 #: build/C/man3/fmtmsg.3:118
1778 msgid "It is detected by the operating system."
1779 msgstr "オペレーティングシステムによって検知された。"
1780
1781 #. type: Plain text
1782 #: build/C/man3/fmtmsg.3:120
1783 msgid "The fourth value shows the severity of the incident:"
1784 msgstr "4 番目の値は問題の重大度を表す:"
1785
1786 #. type: TP
1787 #: build/C/man3/fmtmsg.3:120
1788 #, no-wrap
1789 msgid "B<MM_RECOVER>"
1790 msgstr "B<MM_RECOVER>"
1791
1792 #. type: Plain text
1793 #: build/C/man3/fmtmsg.3:123
1794 msgid "It is a recoverable error."
1795 msgstr "回復可能なエラーである。"
1796
1797 #. type: TP
1798 #: build/C/man3/fmtmsg.3:123
1799 #, no-wrap
1800 msgid "B<MM_NRECOV>"
1801 msgstr "B<MM_NRECOV>"
1802
1803 #. type: Plain text
1804 #: build/C/man3/fmtmsg.3:126
1805 msgid "It is a nonrecoverable error."
1806 msgstr "回復不可能なエラーである。"
1807
1808 #. type: SS
1809 #: build/C/man3/fmtmsg.3:126
1810 #, no-wrap
1811 msgid "The severity argument"
1812 msgstr "severity 引き数"
1813
1814 #. type: Plain text
1815 #: build/C/man3/fmtmsg.3:130
1816 msgid "The I<severity> argument can take one of the following values:"
1817 msgstr "I<severity> 引き数は以下の 1 つの値をとることができる。"
1818
1819 #. type: TP
1820 #: build/C/man3/fmtmsg.3:130
1821 #, no-wrap
1822 msgid "B<MM_NOSEV>"
1823 msgstr "B<MM_NOSEV>"
1824
1825 #. type: Plain text
1826 #: build/C/man3/fmtmsg.3:133
1827 msgid "No severity is printed."
1828 msgstr "重大度は表示されない。"
1829
1830 #. type: TP
1831 #: build/C/man3/fmtmsg.3:133
1832 #, no-wrap
1833 msgid "B<MM_HALT>"
1834 msgstr "B<MM_HALT>"
1835
1836 #. type: Plain text
1837 #: build/C/man3/fmtmsg.3:136
1838 msgid "This value is printed as HALT."
1839 msgstr "この値は HALT として表示される。"
1840
1841 #. type: TP
1842 #: build/C/man3/fmtmsg.3:136
1843 #, no-wrap
1844 msgid "B<MM_ERROR>"
1845 msgstr "B<MM_ERROR>"
1846
1847 #. type: Plain text
1848 #: build/C/man3/fmtmsg.3:139
1849 msgid "This value is printed as ERROR."
1850 msgstr "この値は ERROR として表示される。"
1851
1852 #. type: TP
1853 #: build/C/man3/fmtmsg.3:139
1854 #, no-wrap
1855 msgid "B<MM_WARNING>"
1856 msgstr "B<MM_WARNING>"
1857
1858 #. type: Plain text
1859 #: build/C/man3/fmtmsg.3:142
1860 msgid "This value is printed as WARNING."
1861 msgstr "この値は WARNING として表示される。"
1862
1863 #. type: TP
1864 #: build/C/man3/fmtmsg.3:142
1865 #, no-wrap
1866 msgid "B<MM_INFO>"
1867 msgstr "B<MM_INFO>"
1868
1869 #. type: Plain text
1870 #: build/C/man3/fmtmsg.3:145
1871 msgid "This value is printed as INFO."
1872 msgstr "この値は INFO として表示される。"
1873
1874 #. type: Plain text
1875 #: build/C/man3/fmtmsg.3:152
1876 msgid "The numeric values are between 0 and 4.  Using B<addseverity>(3)  or the environment variable B<SEV_LEVEL> you can add more levels and strings to print."
1877 msgstr "数値の場合は 0 から 4 である。 B<addseverity>(3)  または環境変数 B<SEV_LEVEL> を使うことにより、表示するレベルと文字列を更に追加できる。"
1878
1879 #. type: Plain text
1880 #: build/C/man3/fmtmsg.3:154
1881 msgid "The function can return 4 values:"
1882 msgstr "関数は 4 つの値を返す:"
1883
1884 #. type: TP
1885 #: build/C/man3/fmtmsg.3:154
1886 #, no-wrap
1887 msgid "B<MM_OK>"
1888 msgstr "B<MM_OK>"
1889
1890 #. type: Plain text
1891 #: build/C/man3/fmtmsg.3:157
1892 msgid "Everything went smooth."
1893 msgstr "全てがうまくいった。"
1894
1895 #. type: TP
1896 #: build/C/man3/fmtmsg.3:157
1897 #, no-wrap
1898 msgid "B<MM_NOTOK>"
1899 msgstr "B<MM_NOTOK>"
1900
1901 #. type: Plain text
1902 #: build/C/man3/fmtmsg.3:160
1903 msgid "Complete failure."
1904 msgstr "完全に失敗した。"
1905
1906 #. type: TP
1907 #: build/C/man3/fmtmsg.3:160
1908 #, no-wrap
1909 msgid "B<MM_NOMSG>"
1910 msgstr "B<MM_NOMSG>"
1911
1912 #. type: Plain text
1913 #: build/C/man3/fmtmsg.3:164
1914 msgid "Error writing to I<stderr>."
1915 msgstr "I<stderr> に書き込むときにエラーが起こった。"
1916
1917 #. type: TP
1918 #: build/C/man3/fmtmsg.3:164
1919 #, no-wrap
1920 msgid "B<MM_NOCON>"
1921 msgstr "B<MM_NOCON>"
1922
1923 #. type: Plain text
1924 #: build/C/man3/fmtmsg.3:167
1925 msgid "Error writing to the console."
1926 msgstr "コンソールに書き込むときにエラーが起こった。"
1927
1928 #. type: SH
1929 #: build/C/man3/fmtmsg.3:167
1930 #, no-wrap
1931 msgid "ENVIRONMENT"
1932 msgstr "環境変数"
1933
1934 #. type: Plain text
1935 #: build/C/man3/fmtmsg.3:178
1936 msgid "The environment variable B<MSGVERB> (\"message verbosity\") can be used to suppress parts of the output to I<stderr>.  (It does not influence output to the console.)  When this variable is defined, is non-NULL, and is a colon-separated list of valid keywords, then only the parts of the message corresponding to these keywords is printed.  Valid keywords are \"label\", \"severity\", \"text\", \"action\" and \"tag\"."
1937 msgstr "環境変数 B<MSGVERB> (\"message verbosity\") は I<stderr> への出力の一部を抑制するのに使うことができる。 (コンソールへの出力には影響しない。)  この変数が定義されて、NULL でなく、 コロンで区切られた有効なキーワードのリストである場合、 キーワードに対応するメッセージの一部のみが表示される。 有効なキーワードは \"label\", \"severity\", \"text\", \"action\", \"tag\" である。"
1938
1939 #. type: Plain text
1940 #: build/C/man3/fmtmsg.3:190
1941 msgid "The environment variable B<SEV_LEVEL> can be used to introduce new severity levels.  By default, only the five severity levels described above are available.  Any other numeric value would make B<fmtmsg>()  print nothing.  If the user puts B<SEV_LEVEL> with a format like"
1942 msgstr "環境変数 B<SEV_LEVEL> は新しい重大度レベルを導入するのに使用できる。 デフォルトでは、上記の 5 つの重大度レベルのみが利用可能である。 他の数値の場合、 B<fmtmsg>()  は何も表示しない。 B<fmtmsg>()  を初めて呼び出す前に、ユーザが B<SEV_LEVEL> を"
1943
1944 #. type: Plain text
1945 #: build/C/man3/fmtmsg.3:193
1946 msgid "SEV_LEVEL=[description[:description[:...]]]"
1947 msgstr "SEV_LEVEL=[description[:description[:...]]]"
1948
1949 #. type: Plain text
1950 #: build/C/man3/fmtmsg.3:198
1951 msgid "in the environment of the process before the first call to B<fmtmsg>(), where each description is of the form"
1952 msgstr "のような形式でプロセスの環境に設定すると、 B<fmtmsg>()  は (標準のレベル 0-4 に加えて) level に指定された値も受け付け、 そのようなレベルの問題が発生すると指定された printstring を表示する。 各 description は"
1953
1954 #. type: Plain text
1955 #: build/C/man3/fmtmsg.3:201
1956 msgid "severity-keyword,level,printstring"
1957 msgstr "severity-keyword,level,printstring"
1958
1959 #. type: Plain text
1960 #: build/C/man3/fmtmsg.3:208
1961 msgid "then B<fmtmsg>()  will also accept the indicated values for the level (in addition to the standard levels 0-4), and use the indicated printstring when such a level occurs."
1962 msgstr "という形式である。"
1963
1964 #. type: Plain text
1965 #: build/C/man3/fmtmsg.3:222
1966 msgid "The severity-keyword part is not used by B<fmtmsg>()  but it has to be present.  The level part is a string representation of a number.  The numeric value must be a number greater than 4.  This value must be used in the severity argument of B<fmtmsg>()  to select this class.  It is not possible to overwrite any of the predefined classes.  The printstring is the string printed when a message of this class is processed by B<fmtmsg>()."
1967 msgstr "severity-keyword 部は B<fmtmsg>()  に使用されないが、存在しなければならない。 level 部は数値を文字列で表したものである。 数値は 4 より大きい値でなければならない。 この値は B<fmtmsg>()  の severity 引き数で使用されなければならず、この重大度を選択する。 前もって宣言された重大度を上書きすることはできない。 printstring は、 この重大度のメッセージが B<fmtmsg>()  によって生成された場合に表示される文字列である。"
1968
1969 #. type: Plain text
1970 #: build/C/man3/fmtmsg.3:225
1971 msgid "B<fmtmsg>()  is provided in glibc since version 2.1."
1972 msgstr "B<fmtmsg>()  は、バージョン 2.1 以降の glibc で提供されている。"
1973
1974 #. type: Plain text
1975 #: build/C/man3/fmtmsg.3:231
1976 msgid "Before glibc 2.16, the B<fmtmsg>()  function uses a static variable that is not protected, so it is not thread-safe."
1977 msgstr "glibc 2.16 より前のバージョンでは、 B<fmtmsg>() 関数は、 保護されていない静的な変数を使うため、 スレッドセーフではない。"
1978
1979 #.  Modified in commit 7724defcf8873116fe4efab256596861eef21a94
1980 #. type: Plain text
1981 #: build/C/man3/fmtmsg.3:237
1982 msgid "Since glibc 2.16, the B<fmtmsg>()  function uses a lock to protect the static variable, so it is thread-safe."
1983 msgstr "glibc 2.16 以降では、 B<fmtmsg>() 関数はロックを使って静的な変数を保護しており、 スレッドセーフである。"
1984
1985 #. type: Plain text
1986 #: build/C/man3/fmtmsg.3:252
1987 msgid "The functions B<fmtmsg>()  and B<addseverity>(3), and environment variables B<MSGVERB> and B<SEV_LEVEL> come from System V.  The function B<fmtmsg>()  and the environment variable B<MSGVERB> are described in POSIX.1-2001."
1988 msgstr "関数 B<fmtmsg>()  と B<addseverity>(3)  と環境変数 B<MSGVERB> と B<SEV_LEVEL> は System V に由来している。 関数 B<fmtmsg>()  と環境変数 B<MSGVERB> は POSIX.1-2001 に記述されている。"
1989
1990 #. type: Plain text
1991 #: build/C/man3/fmtmsg.3:256
1992 msgid "System V and UnixWare man pages tell us that these functions have been replaced by \"pfmt() and addsev()\" or by \"pfmt(), vpfmt(), lfmt(), and vlfmt()\", and will be removed later."
1993 msgstr "System V と UnixWare の man ページには、 「これらの関数は \"pfmt() と addsev()\" または \"pfmt(), vpfmt(), lfmt(), vlfmt()\" で置き換えられており、 将来は削除される予定である」と書かれている。"
1994
1995 #. type: Plain text
1996 #: build/C/man3/fmtmsg.3:261
1997 #, no-wrap
1998 msgid ""
1999 "#include E<lt>stdio.hE<gt>\n"
2000 "#include E<lt>stdlib.hE<gt>\n"
2001 "#include E<lt>fmtmsg.hE<gt>\n"
2002 msgstr ""
2003 "#include E<lt>stdio.hE<gt>\n"
2004 "#include E<lt>stdlib.hE<gt>\n"
2005 "#include E<lt>fmtmsg.hE<gt>\n"
2006
2007 #. type: Plain text
2008 #: build/C/man3/fmtmsg.3:267
2009 #, no-wrap
2010 msgid ""
2011 "int\n"
2012 "main(void)\n"
2013 "{\n"
2014 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2015 "    int err;\n"
2016 msgstr ""
2017 "int\n"
2018 "main(void)\n"
2019 "{\n"
2020 "    long class = MM_PRINT | MM_SOFT | MM_OPSYS | MM_RECOVER;\n"
2021 "    int err;\n"
2022
2023 #. type: Plain text
2024 #: build/C/man3/fmtmsg.3:288
2025 #, no-wrap
2026 msgid ""
2027 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2028 "                \"unknown mount option\", \"See mount(8).\",\n"
2029 "                \"util-linux:mount:017\");\n"
2030 "    switch (err) {\n"
2031 "    case MM_OK:\n"
2032 "        break;\n"
2033 "    case MM_NOTOK:\n"
2034 "        printf(\"Nothing printed\\en\");\n"
2035 "        break;\n"
2036 "    case MM_NOMSG:\n"
2037 "        printf(\"Nothing printed to stderr\\en\");\n"
2038 "        break;\n"
2039 "    case MM_NOCON:\n"
2040 "        printf(\"No console output\\en\");\n"
2041 "        break;\n"
2042 "    default:\n"
2043 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2044 "    }\n"
2045 "    exit(EXIT_SUCCESS);\n"
2046 "}\n"
2047 msgstr ""
2048 "    err = fmtmsg(class, \"util-linux:mount\", MM_ERROR,\n"
2049 "                \"unknown mount option\", \"See mount(8).\",\n"
2050 "                \"util-linux:mount:017\");\n"
2051 "    switch (err) {\n"
2052 "    case MM_OK:\n"
2053 "      break;\n"
2054 "    case MM_NOTOK:\n"
2055 "        printf(\"Nothing printed\\en\");\n"
2056 "        break;\n"
2057 "    case MM_NOMSG:\n"
2058 "        printf(\"Nothing printed to stderr\\en\");\n"
2059 "        break;\n"
2060 "    case MM_NOCON:\n"
2061 "        printf(\"No console output\\en\");\n"
2062 "        break;\n"
2063 "    default:\n"
2064 "        printf(\"Unknown error from fmtmsg()\\en\");\n"
2065 "    }\n"
2066 "    exit(EXIT_SUCCESS);\n"
2067 "}\n"
2068
2069 #. type: Plain text
2070 #: build/C/man3/fmtmsg.3:291
2071 msgid "The output should be:"
2072 msgstr "出力は"
2073
2074 #. type: Plain text
2075 #: build/C/man3/fmtmsg.3:295
2076 #, no-wrap
2077 msgid ""
2078 "    util-linux:mount: ERROR: unknown mount option\n"
2079 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2080 msgstr ""
2081 "    util-linux:mount: ERROR: unknown mount option\n"
2082 "    TO FIX: See mount(8).  util-linux:mount:017\n"
2083
2084 #. type: Plain text
2085 #: build/C/man3/fmtmsg.3:298
2086 msgid "and after"
2087 msgstr "のようになり、"
2088
2089 #. type: Plain text
2090 #: build/C/man3/fmtmsg.3:301
2091 #, no-wrap
2092 msgid "    MSGVERB=text:action; export MSGVERB\n"
2093 msgstr "    MSGVERB=text:action; export MSGVERB\n"
2094
2095 #. type: Plain text
2096 #: build/C/man3/fmtmsg.3:304
2097 msgid "the output becomes:"
2098 msgstr "を実行すると、次のようになる。"
2099
2100 #. type: Plain text
2101 #: build/C/man3/fmtmsg.3:308
2102 #, no-wrap
2103 msgid ""
2104 "    unknown mount option\n"
2105 "    TO FIX: See mount(8).\n"
2106 msgstr ""
2107 "    unknown mount option\n"
2108 "    TO FIX: See mount(8).\n"
2109
2110 #. type: Plain text
2111 #: build/C/man3/fmtmsg.3:312
2112 msgid "B<addseverity>(3), B<perror>(3)"
2113 msgstr "B<addseverity>(3), B<perror>(3)"
2114
2115 #. type: TH
2116 #: build/C/man3/fopen.3:44
2117 #, no-wrap
2118 msgid "FOPEN"
2119 msgstr "FOPEN"
2120
2121 #. type: TH
2122 #: build/C/man3/fopen.3:44
2123 #, no-wrap
2124 msgid "2012-04-22"
2125 msgstr "2012-04-22"
2126
2127 #. type: Plain text
2128 #: build/C/man3/fopen.3:47
2129 msgid "fopen, fdopen, freopen - stream open functions"
2130 msgstr "fopen, fdopen, freopen - ストリームを開く関数"
2131
2132 #. type: Plain text
2133 #: build/C/man3/fopen.3:52
2134 #, no-wrap
2135 msgid "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2136 msgstr "B<FILE *fopen(const char *>I<path>B<, const char *>I<mode>B<);>\n"
2137
2138 #. type: Plain text
2139 #: build/C/man3/fopen.3:54
2140 #, no-wrap
2141 msgid "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2142 msgstr "B<FILE *fdopen(int >I<fd>B<, const char *>I<mode>B<);>\n"
2143
2144 #. type: Plain text
2145 #: build/C/man3/fopen.3:56
2146 #, no-wrap
2147 msgid "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2148 msgstr "B<FILE *freopen(const char *>I<path>B<, const char *>I<mode>B<, FILE *>I<stream>B<);>\n"
2149
2150 #. type: Plain text
2151 #: build/C/man3/fopen.3:65
2152 msgid "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2153 msgstr "B<fdopen>(): _POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE"
2154
2155 #. type: Plain text
2156 #: build/C/man3/fopen.3:71
2157 msgid "The B<fopen>()  function opens the file whose name is the string pointed to by I<path> and associates a stream with it."
2158 msgstr "B<fopen>()  関数は、 I<path> で指定された名前のファイルを開き、ストリームと結びつける。"
2159
2160 #. type: Plain text
2161 #: build/C/man3/fopen.3:76
2162 msgid "The argument I<mode> points to a string beginning with one of the following sequences (possibly followed by additional characters, as described below):"
2163 msgstr ""
2164 "引数 I<mode> は、以下に続く文字のひとつから始まる文字列へのポインタであ\n"
2165 "る (以下の述べる、追加の文字が後に続くこともある):"
2166
2167 #. type: TP
2168 #: build/C/man3/fopen.3:76
2169 #, no-wrap
2170 msgid "B<r>"
2171 msgstr "B<r>"
2172
2173 #. type: Plain text
2174 #: build/C/man3/fopen.3:80
2175 msgid "Open text file for reading.  The stream is positioned at the beginning of the file."
2176 msgstr "テキストファイルを読み出すために開く。 ストリームはファイルの先頭に位置される。"
2177
2178 #. type: TP
2179 #: build/C/man3/fopen.3:80
2180 #, no-wrap
2181 msgid "B<r+>"
2182 msgstr "B<r+>"
2183
2184 #. type: Plain text
2185 #: build/C/man3/fopen.3:84
2186 msgid "Open for reading and writing.  The stream is positioned at the beginning of the file."
2187 msgstr "読み出しおよび書き込みするために開く。 ストリームはファイルの先頭に位置される。"
2188
2189 #. type: TP
2190 #: build/C/man3/fopen.3:84
2191 #, no-wrap
2192 msgid "B<w>"
2193 msgstr "B<w>"
2194
2195 #. type: Plain text
2196 #: build/C/man3/fopen.3:88
2197 msgid "Truncate file to zero length or create text file for writing.  The stream is positioned at the beginning of the file."
2198 msgstr "ファイルを書き込みのために開く。 ファイルが既に存在する場合には長さゼロに切り詰める。 ファイルがなかった場合には新たに作成する。 ストリームはファイルの先頭に位置される。"
2199
2200 #. type: TP
2201 #: build/C/man3/fopen.3:88
2202 #, no-wrap
2203 msgid "B<w+>"
2204 msgstr "B<w+>"
2205
2206 #. type: Plain text
2207 #: build/C/man3/fopen.3:94
2208 msgid "Open for reading and writing.  The file is created if it does not exist, otherwise it is truncated.  The stream is positioned at the beginning of the file."
2209 msgstr "読み出しおよび書き込みのために開く。 ファイルが存在していない場合には新たに作成する。 存在している場合には長さゼロに切り詰められる。 ストリームはファイルの先頭に位置される。"
2210
2211 #. type: TP
2212 #: build/C/man3/fopen.3:94 build/C/man3/scanf.3:447
2213 #, no-wrap
2214 msgid "B<a>"
2215 msgstr "B<a>"
2216
2217 #. type: Plain text
2218 #: build/C/man3/fopen.3:99
2219 msgid "Open for appending (writing at end of file).  The file is created if it does not exist.  The stream is positioned at the end of the file."
2220 msgstr "追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合には新たに作成する。 ストリームはファイルの最後に位置される。"
2221
2222 #. type: TP
2223 #: build/C/man3/fopen.3:99
2224 #, no-wrap
2225 msgid "B<a+>"
2226 msgstr "B<a+>"
2227
2228 #. type: Plain text
2229 #: build/C/man3/fopen.3:105
2230 msgid "Open for reading and appending (writing at end of file).  The file is created if it does not exist.  The initial file position for reading is at the beginning of the file, but output is always appended to the end of the file."
2231 msgstr "読み出しおよび追加 (ファイルの最後に書き込む) のために開く。 ファイルが存在していない場合には新たに作成する。 読み出しの初期ファイル位置はファイルの先頭であるが、 書き込みは常にファイルの最後に追加される。"
2232
2233 #. type: Plain text
2234 #: build/C/man3/fopen.3:118
2235 msgid "The I<mode> string can also include the letter \\(aqb\\(aq either as a last character or as a character between the characters in any of the two-character strings described above.  This is strictly for compatibility with C89 and has no effect; the \\(aqb\\(aq is ignored on all POSIX conforming systems, including Linux.  (Other systems may treat text files and binary files differently, and adding the \\(aqb\\(aq may be a good idea if you do I/O to a binary file and expect that your program may be ported to non-UNIX environments.)"
2236 msgstr "I<mode> 文字列には文字 \\(aqb\\(aq を追加指定することができ、 I<mode> 文字列の最後の文字として指定する。 上記のうち 2 文字のモードの場合には 2 つの文字の間に指定することもできる。 これは C89 との互換性のためだけに用意された ものであり、関数の実行に対してはいかなる影響も持たない。 すなわち、Linux を含む全ての POSIX 準拠システムでは、 この \\(aqb\\(aq は無視される。 (その他のシステムではテキストファイルとバイナリファイルを別々に扱うものもあるので、 もしバイナリファイルの入出力を行い、 そのプログラムが非 UNIX 環境へ移植されると予測するなら、 \\(aqb\\(aqを付けておくのは良い考えである)"
2237
2238 #. type: Plain text
2239 #: build/C/man3/fopen.3:121
2240 msgid "See NOTES below for details of glibc extensions for I<mode>."
2241 msgstr "I<mode> の glibc による拡張の詳細については下記の「注意」を参照。"
2242
2243 #. type: Plain text
2244 #: build/C/man3/fopen.3:126
2245 msgid "Any created files will have mode B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666), as modified by the process's umask value (see B<umask>(2))."
2246 msgstr "すべての生成されたファイルは、 B<S_IRUSR> | B<S_IWUSR> | B<S_IRGRP> | B<S_IWGRP> | B<S_IROTH> | B<S_IWOTH> (0666) のモードを そのプロセスの umask 値によって修正したモードを持つ (B<umask>(2)  を見よ)。"
2247
2248 #. type: Plain text
2249 #: build/C/man3/fopen.3:141
2250 msgid "Reads and writes may be intermixed on read/write streams in any order.  Note that ANSI C requires that a file positioning function intervene between output and input, unless an input operation encounters end-of-file.  (If this condition is not met, then a read is allowed to return the result of writes other than the most recent.)  Therefore it is good practice (and indeed sometimes necessary under Linux) to put an B<fseek>(3)  or B<fgetpos>(3)  operation between write and read operations on such a stream.  This operation may be an apparent no-op (as in I<fseek(..., 0L, SEEK_CUR)> called for its synchronizing side effect)."
2251 msgstr "読み出し/書き込みストリームに対しては任意の順序で読み書きを行うことができる。 ただし ANSI C では、 (入力操作がファイルの末尾に到達した場合を除いて)  出力と入力の間にはファイルの位置決め関数を 挟まなければならないことになっていることに注意されたい (この条件を満足しない場合には、読み込み操作は、 最後に書き込まれたものでなく、以前に書き込まれた 値を返すことを許されている)。 したがって、このようなストリームでの読み書き操作の間には B<fseek>(3)  または B<fgetpos>(3)  操作を挟んでおくと良いだろう (Linux では本当に必要となることもときどきある)。 この操作は見かけ上何もしない操作 (no-op) でも良い (例えば I<fseek(..., 0L, SEEK_CUR)> を その副次的効果である同期のためだけに呼べば良い)。"
2252
2253 #. type: Plain text
2254 #: build/C/man3/fopen.3:146
2255 msgid "Opening a file in append mode (B<a> as the first character of I<mode>)  causes all subsequent write operations to this stream to occur at end-of-file, as if preceded the call:"
2256 msgstr ""
2257 "ファイルを追加モード (I<mode> の最初の文字を B<a> にする) で開くと、\n"
2258 "このストリームに対する書き込み操作は全て (先に以下の呼び出しを行った\n"
2259 "かのように) ファイルの末尾で行われる。"
2260
2261 #. type: Plain text
2262 #: build/C/man3/fopen.3:149
2263 #, no-wrap
2264 msgid "    fseek(stream, 0, SEEK_END);\n"
2265 msgstr "    fseek(stream, 0, SEEK_END);\n"
2266
2267 #. type: Plain text
2268 #: build/C/man3/fopen.3:171
2269 msgid "The B<fdopen>()  function associates a stream with the existing file descriptor, I<fd>.  The I<mode> of the stream (one of the values \"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\")  must be compatible with the mode of the file descriptor.  The file position indicator of the new stream is set to that belonging to I<fd>, and the error and end-of-file indicators are cleared.  Modes \"w\" or \"w+\" do not cause truncation of the file.  The file descriptor is not dup'ed, and will be closed when the stream created by B<fdopen>()  is closed.  The result of applying B<fdopen>()  to a shared memory object is undefined."
2270 msgstr "B<fdopen>()  関数は、既存のファイル記述子 I<fd> にストリームを結びつける。 ストリームの I<mode> (\"r\", \"r+\", \"w\", \"w+\", \"a\", \"a+\" のいずれか) は ファイル記述子のモードと互換のものでなければならない。 新しいストリームのファイル位置指示子は I<fd> に属している値に設定される。 error と end-of-file の各指示子はクリアされる。 \"w\" および \"w+\" モードでのファイルの切り詰めは行われない。 ファイル記述子の複製は行なわれない。 B<fdopen>()  で作成されたストリームが閉じられたときにファイル記述子も 閉じられる。 共有メモリのオブジェクトへ B<fdopen>()  を行ったときの結果は定義されていない。"
2271
2272 #. type: Plain text
2273 #: build/C/man3/fopen.3:189
2274 msgid "The B<freopen>()  function opens the file whose name is the string pointed to by I<path> and associates the stream pointed to by I<stream> with it.  The original stream (if it exists) is closed.  The I<mode> argument is used just as in the B<fopen>()  function.  The primary use of the B<freopen>()  function is to change the file associated with a standard text stream (I<stderr>, I<stdin>, or I<stdout>)."
2275 msgstr "B<freopen>()  関数は I<path> で名前が指定されたファイルを開き、 I<stream> で指定されたストリームに、そのファイルを結びつける。 もとのストリームは (もし存在する場合には) 閉じられる。 I<mode> 引数は B<fopen>()  関数と同じ形で使われる。 B<freopen>()  関数の主な用途は、標準テキストストリーム (I<stderr>, I<stdin>, I<stdout>)  と対応付けられているファイルを変更することである。"
2276
2277 #. type: Plain text
2278 #: build/C/man3/fopen.3:201
2279 msgid "Upon successful completion B<fopen>(), B<fdopen>()  and B<freopen>()  return a I<FILE> pointer.  Otherwise, NULL is returned and I<errno> is set to indicate the error."
2280 msgstr "B<fopen>(), B<fdopen>(), B<freopen>()  は成功すると I<FILE> 型のポインタを返す。 失敗すると NULL が返され、 I<errno> がエラーを示す値にセットされる。"
2281
2282 #. type: TP
2283 #: build/C/man3/fopen.3:202 build/C/man3/fseek.3:142
2284 #: build/C/man3/getline.3:128 build/C/man2/link.2:282 build/C/man2/llseek.2:77
2285 #: build/C/man2/lseek.2:192 build/C/man2/open.2:825 build/C/man2/open.2:833
2286 #: build/C/man2/open.2:838 build/C/man2/open_by_handle_at.2:273
2287 #: build/C/man2/open_by_handle_at.2:277 build/C/man2/open_by_handle_at.2:325
2288 #: build/C/man2/pipe.2:143 build/C/man2/read.2:126 build/C/man2/read.2:137
2289 #: build/C/man2/readlink.2:169 build/C/man2/readlink.2:178
2290 #: build/C/man2/readv.2:200 build/C/man2/readv.2:207 build/C/man2/rename.2:251
2291 #: build/C/man2/rename.2:376 build/C/man2/rename.2:385 build/C/man2/rmdir.2:67
2292 #: build/C/man3/scanf.3:565 build/C/man2/unlink.2:252 build/C/man2/write.2:154
2293 #, no-wrap
2294 msgid "B<EINVAL>"
2295 msgstr "B<EINVAL>"
2296
2297 #. type: Plain text
2298 #: build/C/man3/fopen.3:212
2299 msgid "The I<mode> provided to B<fopen>(), B<fdopen>(), or B<freopen>()  was invalid."
2300 msgstr "B<fopen>(), B<fdopen>(), B<freopen>()  で与えられた I<mode> が不適切である。"
2301
2302 #. type: Plain text
2303 #: build/C/man3/fopen.3:222
2304 msgid "The B<fopen>(), B<fdopen>()  and B<freopen>()  functions may also fail and set I<errno> for any of the errors specified for the routine B<malloc>(3)."
2305 msgstr "B<fopen>(), B<fdopen>(), B<freopen>()  関数は B<malloc>(3)  ルーチンで規定されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセットする。"
2306
2307 #. type: Plain text
2308 #: build/C/man3/fopen.3:229
2309 msgid "The B<fopen>()  function may also fail and set I<errno> for any of the errors specified for the routine B<open>(2)."
2310 msgstr "B<fopen>()  関数は B<open>(2)  ルーチンで規定されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセットする。"
2311
2312 #. type: Plain text
2313 #: build/C/man3/fopen.3:236
2314 msgid "The B<fdopen>()  function may also fail and set I<errno> for any of the errors specified for the routine B<fcntl>(2)."
2315 msgstr "B<fdopen>()  関数は B<fcntl>(2)  ルーチンで規定されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセットする。"
2316
2317 #. type: Plain text
2318 #: build/C/man3/fopen.3:246
2319 msgid "The B<freopen>()  function may also fail and set I<errno> for any of the errors specified for the routines B<open>(2), B<fclose>(3), and B<fflush>(3)."
2320 msgstr "B<freopen>()  関数は B<open>(2), B<fclose>(3), B<fflush>(3)  各ルーチンで規定されているエラーでも失敗することがあり、 その時は対応する値に I<errno> をセットする。"
2321
2322 #. type: Plain text
2323 #: build/C/man3/fopen.3:255
2324 msgid "The B<fopen>()  and B<freopen>()  functions conform to C89.  The B<fdopen>()  function conforms to POSIX.1-1990."
2325 msgstr "B<fopen>()  関数と B<freopen>()  関数は C89に準拠している。 B<fdopen>()  関数は POSIX.1-1990 に準拠している。"
2326
2327 #. type: SS
2328 #: build/C/man3/fopen.3:256 build/C/man2/link.2:385
2329 #: build/C/man2/readlink.2:256 build/C/man2/rename.2:415
2330 #: build/C/man2/symlink.2:247 build/C/man2/unlink.2:282
2331 #, no-wrap
2332 msgid "Glibc notes"
2333 msgstr "glibc での注意"
2334
2335 #. type: Plain text
2336 #: build/C/man3/fopen.3:259
2337 msgid "The GNU C library allows the following extensions for the string specified in I<mode>:"
2338 msgstr "GNU C ライブラリでは、 I<mode> に指定できる文字列として、以下の拡張が行われている:"
2339
2340 #. type: TP
2341 #: build/C/man3/fopen.3:259
2342 #, no-wrap
2343 msgid "B<c> (since glibc 2.3.3)"
2344 msgstr "B<c> (glibc 2.3.3 以降)"
2345
2346 #. type: Plain text
2347 #: build/C/man3/fopen.3:266
2348 msgid "Do not make the open operation, or subsequent read and write operations, thread cancellation points.  This flag is ignored for B<fdopen>()."
2349 msgstr ""
2350 "open 操作、それに続く read/write 操作の、 スレッドの取り消しポイント\n"
2351 "(cancellation points) を作成しない。\n"
2352 "このフラグは B<fdopen>() では無視される。"
2353
2354 #. type: TP
2355 #: build/C/man3/fopen.3:266
2356 #, no-wrap
2357 msgid "B<e> (since glibc 2.7)"
2358 msgstr "B<e> (glibc 2.7 以降)"
2359
2360 #. type: Plain text
2361 #: build/C/man3/fopen.3:276
2362 msgid "Open the file with the B<O_CLOEXEC> flag.  See B<open>(2)  for more information.  This flag is ignored for B<fdopen>()."
2363 msgstr ""
2364 "B<O_CLOEXEC> フラグを有効にしてファイルをオープンする。詳細は\n"
2365 "B<open>(2) を参照。このフラグは B<fdopen>() では無視される。"
2366
2367 #. type: TP
2368 #: build/C/man3/fopen.3:276
2369 #, no-wrap
2370 msgid "B<m> (since glibc 2.3)"
2371 msgstr "B<m> (glibc 2.3 以降)"
2372
2373 #.  As at glibc 2.4:
2374 #. type: Plain text
2375 #: build/C/man3/fopen.3:288
2376 msgid "Attempt to access the file using B<mmap>(2), rather than I/O system calls (B<read>(2), B<write>(2)).  Currently, use of B<mmap>(2)  is attempted only for a file opened for reading."
2377 msgstr "I/O システムコール (B<read>(2), B<write>(2))  ではなく、 B<mmap>(2)  を使ってファイルにアクセスしようとする。 B<mmap>(2)  を使おうとするのは、読み出し用にオープンするファイルについてだけである。"
2378
2379 #. type: TP
2380 #: build/C/man3/fopen.3:288 build/C/man3/scanf.3:421
2381 #, no-wrap
2382 msgid "B<x>"
2383 msgstr "B<x>"
2384
2385 #.  Since glibc 2.0?
2386 #.  FIXME . C11 specifies this flag
2387 #. type: Plain text
2388 #: build/C/man3/fopen.3:305
2389 msgid "Open the file exclusively (like the B<O_EXCL> flag of B<open>(2)).  If the file already exists, B<fopen>()  fails, and sets I<errno> to B<EEXIST>.  This flag is ignored for B<fdopen>()."
2390 msgstr "ファイルを排他的にオープンする (B<open>(2)  の B<O_EXCL> フラグと同様)。 ファイルがすでに存在する場合、 B<fopen>()  は失敗し、 I<errno> に B<EEXIST> がセットされる。 このフラグは B<fdopen>()  では無視される。"
2391
2392 #. type: Plain text
2393 #: build/C/man3/fopen.3:313
2394 msgid "In addition to the above characters, B<fopen>()  and B<freopen>()  support the following syntax in I<mode>:"
2395 msgstr ""
2396 "上記の文字に加えて、\n"
2397 "B<fopen>() と B<freopen>() では I<mode> に\n"
2398 "以下の書式を 指定することができる。"
2399
2400 #. type: Plain text
2401 #: build/C/man3/fopen.3:315
2402 msgid "B< ,ccs=>I<string>"
2403 msgstr "B< ,ccs=>I<string>"
2404
2405 #. type: Plain text
2406 #: build/C/man3/fopen.3:331
2407 msgid "The given I<string> is taken as the name of a coded character set and the stream is marked as wide-oriented.  Thereafter, internal conversion functions convert I/O to and from the character set I<string>.  If the B<,ccs=>I<string> syntax is not specified, then the wide-orientation of the stream is determined by the first file operation.  If that operation is a wide-character operation, the stream is marked wide-oriented, and functions to convert to the coded character set are loaded."
2408 msgstr ""
2409 "指定された I<string> は、符号化文字集合の名前と解釈され、\n"
2410 "ストリームではワイド文字のストリームとして扱われる。\n"
2411 "内部変換関数で入出力時に文字集合 I<string> との変換が行われる。\n"
2412 "書式 B<,ccs=>I<string> が指定されない場合は、\n"
2413 "ストリームをワイド文字のストリームとして扱うかは\n"
2414 "最初のファイル操作時に決定される。\n"
2415 "最初のファイル操作がワイド文字操作であった場合は、\n"
2416 "そのストリームはワイド文字のストリームとして扱われ、\n"
2417 "符号化文字集合との変換を行う関数が読み込まれる。"
2418
2419 #.  FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12685
2420 #. type: Plain text
2421 #: build/C/man3/fopen.3:348
2422 msgid "When parsing for individual flag characters in I<mode> (i.e., the characters preceding the \"ccs\" specification), the glibc implementation of B<fopen>()  and B<freopen>()  limits the number of characters examined in I<mode> to 7 (or, in glibc versions before 2.14, to 6, which was not enough to include possible specifications such as \"rb+cmxe\").  The current implementation of B<fdopen>()  parses at most 5 characters in I<mode>."
2423 msgstr ""
2424 "I<mode> の個々のフラグ文字 (\"ccs\" 指定の前の文字) を解釈する際に、\n"
2425 "glibc の B<fopen>() と B<freopen>() の実装では、\n"
2426 "I<mode> の確認を最大 7 文字しか行わないという制限がある\n"
2427 "(バージョン 2.14 より前の glibc では最大 6 文字だが、\n"
2428 "6 文字では \"rb+cmxe\" などの指定を行うには不十分であった)。\n"
2429 "B<fdopen>() の現在の実装では最大 5 文字の I<mode> しか解釈されない。"
2430
2431 #. type: Plain text
2432 #: build/C/man3/fopen.3:354
2433 msgid "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2434 msgstr "B<open>(2), B<fclose>(3), B<fileno>(3), B<fmemopen>(3), B<fopencookie>(3)"
2435
2436 #. type: TH
2437 #: build/C/man3/fopencookie.3:26
2438 #, no-wrap
2439 msgid "FOPENCOOKIE"
2440 msgstr "FOPENCOOKIE"
2441
2442 #. type: TH
2443 #: build/C/man3/fopencookie.3:26 build/C/man2/link.2:32
2444 #: build/C/man2/llseek.2:28 build/C/man2/lseek.2:47 build/C/man3/lseek64.3:25
2445 #: build/C/man2/open.2:51 build/C/man2/open_by_handle_at.2:25
2446 #: build/C/man2/pipe.2:36 build/C/man2/read.2:35 build/C/man2/readlink.2:44
2447 #: build/C/man2/readv.2:32 build/C/man2/rename.2:33 build/C/man2/rmdir.2:30
2448 #: build/C/man3/setbuf.3:48 build/C/man3/stdin.3:13 build/C/man2/symlink.2:33
2449 #: build/C/man7/symlink.7:37 build/C/man2/unlink.2:33 build/C/man2/write.2:39
2450 #, no-wrap
2451 msgid "Linux"
2452 msgstr "Linux"
2453
2454 #. type: Plain text
2455 #: build/C/man3/fopencookie.3:29
2456 msgid "fopencookie - opening a custom stream"
2457 msgstr "fopencookie - 独自のストリームをオープンする"
2458
2459 #. type: Plain text
2460 #: build/C/man3/fopencookie.3:36
2461 #, no-wrap
2462 msgid ""
2463 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2464 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2465 msgstr ""
2466 "B<FILE *fopencookie(void *>I<cookie>B<, const char *>I<mode>B<,>\n"
2467 "B<                  cookie_io_functions_t >I<io_funcs>B<);>\n"
2468
2469 #. type: Plain text
2470 #: build/C/man3/fopencookie.3:49
2471 msgid "The B<fopencookie>()  function allows the programmer to create a custom implementation for a standard I/O stream.  This implementation can store the stream's data at a location of its own choosing; for example, B<fopencookie>()  is used to implement B<fmemopen>(3), which provides a stream interface to data that is stored in a buffer in memory."
2472 msgstr ""
2473 "B<fopencookie>() を使うと、 プログラマーは標準 I/O ストリームの独自の実装を作成することができる。\n"
2474 "この実装はストリームのデータを自分が選んだ場所に格納することができる。 例えば、 B<fopencookie>() は B<fmemopen>(3) を実装するのに使用されている。 B<fmemopen>(3) はメモリー上のバッファーに格納されたデータに対するストリームインターフェースを提供している。"
2475
2476 #. type: Plain text
2477 #: build/C/man3/fopencookie.3:51
2478 msgid "In order to create a custom stream the programmer must:"
2479 msgstr "独自のストリームを作成するためには、 プログラマーは以下を行う必要がある。"
2480
2481 #. type: IP
2482 #: build/C/man3/fopencookie.3:51 build/C/man3/fopencookie.3:54
2483 #: build/C/man3/fopencookie.3:65 build/C/man2/lseek.2:168
2484 #: build/C/man2/lseek.2:170 build/C/man2/lseek.2:173 build/C/man2/lseek.2:175
2485 #: build/C/man2/lseek.2:177 build/C/man2/open.2:527 build/C/man2/open.2:535
2486 #: build/C/man2/open.2:541 build/C/man2/open.2:547 build/C/man2/open.2:553
2487 #: build/C/man2/open.2:566 build/C/man2/open.2:688 build/C/man2/open.2:696
2488 #: build/C/man2/open_by_handle_at.2:138 build/C/man2/open_by_handle_at.2:146
2489 #: build/C/man2/open_by_handle_at.2:157 build/C/man2/open_by_handle_at.2:170
2490 #: build/C/man2/pipe.2:95 build/C/man2/pipe.2:105 build/C/man2/pipe.2:115
2491 #: build/C/man3/scanf.3:658 build/C/man3/scanf.3:663
2492 #: build/C/man7/symlink.7:290 build/C/man7/symlink.7:300
2493 #: build/C/man7/symlink.7:330 build/C/man7/symlink.7:390
2494 #: build/C/man7/symlink.7:419 build/C/man7/symlink.7:448
2495 #: build/C/man7/symlink.7:479 build/C/man7/symlink.7:492
2496 #, no-wrap
2497 msgid "*"
2498 msgstr "*"
2499
2500 #. type: Plain text
2501 #: build/C/man3/fopencookie.3:54
2502 msgid "Implement four \"hook\" functions that are used internally by the standard I/O library when performing I/O on the stream."
2503 msgstr "ストリームに対する I/O を実行する際に標準 I/O ライブラリが内部で使用する 4 つの \"フック\" 関数を実装する。"
2504
2505 #. type: Plain text
2506 #: build/C/man3/fopencookie.3:65
2507 msgid "Define a \"cookie\" data type, a structure that provides bookkeeping information (e.g., where to store data) used by the aforementioned hook functions.  The standard I/O package knows nothing about the contents of this cookie (thus it is typed as I<void\\ *> when passed to B<fopencookie>()), but automatically supplies the cookie as the first argument when calling the hook functions."
2508 msgstr "\"cookie\" データ型を定義する。 \"cookie\" データ型は、上記のフック関数が使用する管理情報 (例えば、データを格納する場所など) を提供する構造体である。 標準の I/O パッケージにはこの cookie の内容に関する情報を持たないが (したがって B<fopencookie>() に渡される際の型は I<void\\ *> である)、 フック関数が呼び出される際に第一引き数として cookie が渡される。"
2509
2510 #. type: Plain text
2511 #: build/C/man3/fopencookie.3:70
2512 msgid "Call B<fopencookie>()  to open a new stream and associate the cookie and hook functions with that stream."
2513 msgstr "B<fopencookie>() を呼び出して、新しいストリームをオープンし、 そのストリームに cookie とフック関数を関連付ける。"
2514
2515 #. type: Plain text
2516 #: build/C/man3/fopencookie.3:78
2517 msgid "The B<fopencookie>()  function serves a purpose similar to B<fopen>(3): it opens a new stream and returns a pointer to a I<FILE> object that is used to operate on that stream."
2518 msgstr "B<fopencookie>() 関数は B<fopen>(3) と同様の機能を持つ。 新しいストリームをオープンし、 そのストリームに対して操作を行うのに使用する I<FILE> オブジェクトへのポインターを返す。"
2519
2520 #. type: Plain text
2521 #: build/C/man3/fopencookie.3:85
2522 msgid "The I<cookie> argument is a pointer to the caller's cookie structure that is to be associated with the new stream.  This pointer is supplied as the first argument when the standard I/O library invokes any of the hook functions described below."
2523 msgstr "I<cookie> 引き数は、 新しいストリームに関連付けられる呼び出し元の cookie 構造体へのポインターである。 このポインターは、 標準 I/O ライブラリが以下で説明するフック関数のいずれかを呼び出す際に第 1 引き数として渡される。"
2524
2525 #. type: Plain text
2526 #: build/C/man3/fopencookie.3:101
2527 msgid "The I<mode> argument serves the same purpose as for B<fopen>(3).  The following modes are supported: I<r>, I<w>, I<a>, I<r+>, I<w+>, and I<a+>.  See B<fopen>(3)  for details."
2528 msgstr "I<mode> 引き数は B<fopen>(3) と同じ意味を持つ。 指定できるモードは I<r>, I<w>, I<a>, I<r+>, I<w+>, I<a+> である。 詳細は B<fopen>(3) を参照。"
2529
2530 #. type: Plain text
2531 #: build/C/man3/fopencookie.3:107
2532 msgid "The I<io_funcs> argument is a structure that contains four fields pointing to the programmer-defined hook functions that are used to implement this stream.  The structure is defined as follows"
2533 msgstr "I<io_funcs> 引き数は、 このストリームを実装するのに使用されるプログラマーが定義した関数を指す 4 つのフィールドを持つ構造体である。 この構造体は以下のように定義されている。"
2534
2535 #. type: Plain text
2536 #: build/C/man3/fopencookie.3:116
2537 #, no-wrap
2538 msgid ""
2539 "typedef struct {\n"
2540 "    cookie_read_function_t  *read;\n"
2541 "    cookie_write_function_t *write;\n"
2542 "    cookie_seek_function_t  *seek;\n"
2543 "    cookie_close_function_t *close;\n"
2544 "} cookie_io_functions_t;\n"
2545 msgstr ""
2546 "typedef struct {\n"
2547 "    cookie_read_function_t  *read;\n"
2548 "    cookie_write_function_t *write;\n"
2549 "    cookie_seek_function_t  *seek;\n"
2550 "    cookie_close_function_t *close;\n"
2551 "} cookie_io_functions_t;\n"
2552
2553 #. type: Plain text
2554 #: build/C/man3/fopencookie.3:120
2555 msgid "The four fields are as follows:"
2556 msgstr "4 つのフィールドの詳細は以下のとおりである。"
2557
2558 #. type: TP
2559 #: build/C/man3/fopencookie.3:120
2560 #, no-wrap
2561 msgid "I<cookie_read_function_t *read>"
2562 msgstr "I<cookie_read_function_t *read>"
2563
2564 #. type: Plain text
2565 #: build/C/man3/fopencookie.3:124
2566 msgid "This function implements read operations for the stream.  When called, it receives three arguments:"
2567 msgstr "この関数はストリームに対する read 操作を実装する。 呼び出される際、 3 つの引き数を受け取る。"
2568
2569 #. type: Plain text
2570 #: build/C/man3/fopencookie.3:126
2571 #, no-wrap
2572 msgid "    ssize_t read(void *cookie, char *buf, size_t size);\n"
2573 msgstr "    ssize_t read(void *cookie, char *buf, size_t size);\n"
2574
2575 #. type: Plain text
2576 #: build/C/man3/fopencookie.3:141
2577 msgid "The I<buf> and I<size> arguments are, respectively, a buffer into which input data can be placed and the size of that buffer.  As its function result, the I<read> function should return the number of bytes copied into I<buf>, 0 on end of file, or -1 on error.  The I<read> function should update the stream offset appropriately."
2578 msgstr "引き数 I<buf> と I<size> は、 それぞれ、 入力データを配置できるバッファーとそのバッファーのサイズである。 関数の結果として、 I<read> 関数は I<buf> にコピーされたバイト数を、 ファイル末尾の場合は 0 を、 エラーの場合は -1 を返す。 I<read> 関数はストリームのオフセットを適切に更新すべきである。"
2579
2580 #. type: Plain text
2581 #: build/C/man3/fopencookie.3:146
2582 msgid "If I<*read> is a null pointer, then reads from the custom stream always return end of file."
2583 msgstr "I<*read> がヌルポインターの場合、 独自のストリームからの読み出しは常にファイル末尾 (end of file) を返す。"
2584
2585 #. type: TP
2586 #: build/C/man3/fopencookie.3:146
2587 #, no-wrap
2588 msgid "I<cookie_write_function_t *write>"
2589 msgstr "I<cookie_write_function_t *write>"
2590
2591 #. type: Plain text
2592 #: build/C/man3/fopencookie.3:150
2593 msgid "This function implements write operations for the stream.  When called, it receives three arguments:"
2594 msgstr "この関数はストリームに対する write 操作を実装する。 呼び出される際、 3 つの引き数を受け取る。"
2595
2596 #. type: Plain text
2597 #: build/C/man3/fopencookie.3:152
2598 #, no-wrap
2599 msgid "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
2600 msgstr "    ssize_t write(void *cookie, const char *buf, size_t size);\n"
2601
2602 #. type: Plain text
2603 #: build/C/man3/fopencookie.3:168
2604 msgid "The I<buf> and I<size> arguments are, respectively, a buffer of data to be output to the stream and the size of that buffer.  As its function result, the I<write> function should return the number of bytes copied from I<buf>, or 0 on error.  (The function must not return a negative value.)  The I<write> function should update the stream offset appropriately."
2605 msgstr "引き数 I<buf> と I<size> は、 それぞれ、 ストリームへの出力するデータが入ったバッファーとそのバッファーのサイズである。 関数の結果として、 I<write> 関数は I<buf> からコピーされたバイト数を返し、 エラーの場合は -1 を返す。 (この関数は負の値を返してはならない。) I<write> 関数はストリームのオフセットを適切に更新すべきである。"
2606
2607 #. type: Plain text
2608 #: build/C/man3/fopencookie.3:173
2609 msgid "If I<*write> is a null pointer, then output to the stream is discarded."
2610 msgstr "I<*write> がヌルポインターの場合、 このストリームへの出力は破棄される。"
2611
2612 #. type: TP
2613 #: build/C/man3/fopencookie.3:173
2614 #, no-wrap
2615 msgid "I<cookie_seek_function_t *seek>"
2616 msgstr "I<cookie_seek_function_t *seek>"
2617
2618 #. type: Plain text
2619 #: build/C/man3/fopencookie.3:177
2620 msgid "This function implements seek operations on the stream.  When called, it receives three arguments:"
2621 msgstr "この関数はストリームに対する seek 操作を実装する。 呼び出される際、 3 つの引き数を受け取る。"
2622
2623 #. type: Plain text
2624 #: build/C/man3/fopencookie.3:179
2625 #, no-wrap
2626 msgid "    int seek(void *cookie, off64_t *offset, int whence);\n"
2627 msgstr "    int seek(void *cookie, off64_t *offset, int whence);\n"
2628
2629 #. type: Plain text
2630 #: build/C/man3/fopencookie.3:185
2631 msgid "The I<*offset> argument specifies the new file offset depending on which of the following three values is supplied in I<whence>:"
2632 msgstr "I<*offset> 引き数は新しいファイルオフセットを指定する。 新しいオフセットは I<whence> に以下の値のどれが指定されたかに応じて決まる。"
2633
2634 #. type: TP
2635 #: build/C/man3/fopencookie.3:186 build/C/man2/lseek.2:67
2636 #, no-wrap
2637 msgid "B<SEEK_SET>"
2638 msgstr "B<SEEK_SET>"
2639
2640 #. type: Plain text
2641 #: build/C/man3/fopencookie.3:191
2642 msgid "The stream offset should be set I<*offset> bytes from the start of the stream."
2643 msgstr "ストリームオフセットを、ストリームの先頭から I<*offset> バイトの位置に設定する。"
2644
2645 #. type: TP
2646 #: build/C/man3/fopencookie.3:191 build/C/man2/lseek.2:72
2647 #, no-wrap
2648 msgid "B<SEEK_CUR>"
2649 msgstr "B<SEEK_CUR>"
2650
2651 #. type: Plain text
2652 #: build/C/man3/fopencookie.3:195
2653 msgid "I<*offset> should be added to the current stream offset."
2654 msgstr "ストリームの現在のオフセットに I<*offset> を加算する。"
2655
2656 #. type: TP
2657 #: build/C/man3/fopencookie.3:195 build/C/man2/lseek.2:77
2658 #, no-wrap
2659 msgid "B<SEEK_END>"
2660 msgstr "B<SEEK_END>"
2661
2662 #. type: Plain text
2663 #: build/C/man3/fopencookie.3:199
2664 msgid "The stream offset should be set to the size of the stream plus I<*offset>."
2665 msgstr "ストリームのオフセットを、ストリームのサイズに I<*offset> を足した場所に設定する。"
2666
2667 #. type: Plain text
2668 #: build/C/man3/fopencookie.3:206
2669 msgid "Before returning, the I<seek> function should update I<*offset> to indicate the new stream offset."
2670 msgstr "関数が返る前に、 I<seek> 関数はストリームの新しいオフセットを示すように I<*offset> を更新すべきである。"
2671
2672 #. type: Plain text
2673 #: build/C/man3/fopencookie.3:210
2674 msgid "As its function result, the I<seek> function should return 0 on success, and -1 on error."
2675 msgstr "関数の結果として、 I<seek> 関数は成功すると 0 を、 エラーの場合 -1 を返す。"
2676
2677 #. type: Plain text
2678 #: build/C/man3/fopencookie.3:215
2679 msgid "If I<*seek> is a null pointer, then it is not possible to perform seek operations on the stream."
2680 msgstr "I<*seek> がヌルポインターの場合、 このストリームに対して seek 操作を行うことができない。"
2681
2682 #. type: TP
2683 #: build/C/man3/fopencookie.3:215
2684 #, no-wrap
2685 msgid "I<cookie_close_function_t *close>"
2686 msgstr "I<cookie_close_function_t *close>"
2687
2688 #. type: Plain text
2689 #: build/C/man3/fopencookie.3:221
2690 msgid "This function closes the stream.  The hook function can do things such as freeing buffers allocated for the stream.  When called, it receives one argument:"
2691 msgstr "この関数はストリームをクローズする。 このフック関数では、 このストリームに割り当てられたバッファを解放するといったことができる。 呼び出される際、 1 つの引き数を受け取る。"
2692
2693 #. type: Plain text
2694 #: build/C/man3/fopencookie.3:223
2695 #, no-wrap
2696 msgid "    int close(void *cookie);\n"
2697 msgstr "    int close(void *cookie);\n"
2698
2699 #. type: Plain text
2700 #: build/C/man3/fopencookie.3:228
2701 msgid "The I<cookie> argument is the cookie that the programmer supplied when calling B<fopencookie>()."
2702 msgstr "I<cookie> 引き数は B<fopencookie>() の呼び出し時にプログラマーが渡した cookie である。"
2703
2704 #. type: Plain text
2705 #: build/C/man3/fopencookie.3:234
2706 msgid "As its function result, the I<close> function should return 0 on success, and B<EOF> on error."
2707 msgstr "関数の結果として、 I<close> 関数は成功すると 0 を、 エラーの場合 B<EOF> を返す。"
2708
2709 #. type: Plain text
2710 #: build/C/man3/fopencookie.3:238
2711 msgid "If I<*close> is NULL, then no special action is performed when the stream is closed."
2712 msgstr "I<*close> が NULL の場合、 ストリームがクローズされる際に特別な操作は何も行われない。"
2713
2714 #.  .SH ERRORS
2715 #.  It's not clear if errno ever gets set...
2716 #. type: Plain text
2717 #: build/C/man3/fopencookie.3:245
2718 msgid "On success B<fopencookie>()  returns a pointer to the new stream.  On error, NULL is returned."
2719 msgstr "成功すると B<fopencookie>() は新しいストリームへのポインターを返す。 エラーの場合、 NULL が返される。"
2720
2721 #. type: Plain text
2722 #: build/C/man3/fopencookie.3:247
2723 msgid "This function is a nonstandard GNU extension."
2724 msgstr "この関数は非標準の GNU 拡張である。"
2725
2726 #. type: Plain text
2727 #: build/C/man3/fopencookie.3:256
2728 msgid "The program below implements a custom stream whose functionality is similar (but not identical) to that available via B<fmemopen>(3).  It implements a stream whose data is stored in a memory buffer.  The program writes its command-line arguments to the stream, and then seeks through the stream reading two out of every five characters and writing them to standard output.  The following shell session demonstrates the use of the program:"
2729 msgstr "以下のプログラムは、 B<fmemopen>(3) で利用できるのと似た (同じではない) 機能を持つ独自のストリームを実装している。 データがメモリーバッファーに格納されるストリームを実装している。 このプログラムは、 コマンドライン引き数をストリームに書き込み、 それからストリームをたどって 5 文字ごとに 2 文字を読み出して、 それを標準出力に書き込む。 以下のシェルセッションはこのプログラムの使用例である。"
2730
2731 #. type: Plain text
2732 #: build/C/man3/fopencookie.3:264
2733 #, no-wrap
2734 msgid ""
2735 "$B< ./a.out \\(aqhello world\\(aq>\n"
2736 "/he/\n"
2737 "/ w/\n"
2738 "/d/\n"
2739 "Reached end of file\n"
2740 msgstr ""
2741 "$B< ./a.out \\(aqhello world\\(aq>\n"
2742 "/he/\n"
2743 "/ w/\n"
2744 "/d/\n"
2745 "Reached end of file\n"
2746
2747 #. type: Plain text
2748 #: build/C/man3/fopencookie.3:271
2749 msgid "Note that a more general version of the program below could be improved to more robustly handle various error situations (e.g., opening a stream with a cookie that already has an open stream; closing a stream that has already been closed)."
2750 msgstr "このプログラムを改良して様々なエラー状況に強くすることもできる (例えば、 オープン済みのストリームに対応する cookie でストリームをオープンしようとした、 すでにクローズされたストリームをクローズしようとした、など)。"
2751
2752 #. type: Plain text
2753 #: build/C/man3/fopencookie.3:280
2754 #, no-wrap
2755 msgid ""
2756 "#define _GNU_SOURCE\n"
2757 "#include E<lt>sys/types.hE<gt>\n"
2758 "#include E<lt>stdio.hE<gt>\n"
2759 "#include E<lt>stdlib.hE<gt>\n"
2760 "#include E<lt>unistd.hE<gt>\n"
2761 "#include E<lt>string.hE<gt>\n"
2762 msgstr ""
2763 "#define _GNU_SOURCE\n"
2764 "#include E<lt>sys/types.hE<gt>\n"
2765 "#include E<lt>stdio.hE<gt>\n"
2766 "#include E<lt>stdlib.hE<gt>\n"
2767 "#include E<lt>unistd.hE<gt>\n"
2768 "#include E<lt>string.hE<gt>\n"
2769
2770 #. type: Plain text
2771 #: build/C/man3/fopencookie.3:282
2772 #, no-wrap
2773 msgid "#define INIT_BUF_SIZE 4\n"
2774 msgstr "#define INIT_BUF_SIZE 4\n"
2775
2776 #. type: Plain text
2777 #: build/C/man3/fopencookie.3:289
2778 #, no-wrap
2779 msgid ""
2780 "struct memfile_cookie {\n"
2781 "    char   *buf;        /* Dynamically sized buffer for data */\n"
2782 "    size_t  allocated;  /* Size of buf */\n"
2783 "    size_t  endpos;     /* Number of characters in buf */\n"
2784 "    off_t   offset;     /* Current file offset in buf */\n"
2785 "};\n"
2786 msgstr ""
2787 "struct memfile_cookie {\n"
2788 "    char   *buf;        /* Dynamically sized buffer for data */\n"
2789 "    size_t  allocated;  /* Size of buf */\n"
2790 "    size_t  endpos;     /* Number of characters in buf */\n"
2791 "    off_t   offset;     /* Current file offset in buf */\n"
2792 "};\n"
2793
2794 #. type: Plain text
2795 #: build/C/man3/fopencookie.3:295
2796 #, no-wrap
2797 msgid ""
2798 "ssize_t\n"
2799 "memfile_write(void *c, const char *buf, size_t size)\n"
2800 "{\n"
2801 "    char *new_buff;\n"
2802 "    struct memfile_cookie *cookie = c;\n"
2803 msgstr ""
2804 "ssize_t\n"
2805 "memfile_write(void *c, const char *buf, size_t size)\n"
2806 "{\n"
2807 "    char *new_buff;\n"
2808 "    struct memfile_cookie *cookie = c;\n"
2809
2810 #. type: Plain text
2811 #: build/C/man3/fopencookie.3:297
2812 #, no-wrap
2813 msgid "    /* Buffer too small? Keep doubling size until big enough */\n"
2814 msgstr "    /* Buffer too small? Keep doubling size until big enough */\n"
2815
2816 #. type: Plain text
2817 #: build/C/man3/fopencookie.3:307
2818 #, no-wrap
2819 msgid ""
2820 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
2821 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
2822 "        if (new_buff == NULL) {\n"
2823 "            return -1;\n"
2824 "        } else {\n"
2825 "            cookie-E<gt>allocated *= 2;\n"
2826 "            cookie-E<gt>buf = new_buff;\n"
2827 "        }\n"
2828 "    }\n"
2829 msgstr ""
2830 "    while (size + cookie-E<gt>offset E<gt> cookie-E<gt>allocated) {\n"
2831 "        new_buff = realloc(cookie-E<gt>buf, cookie-E<gt>allocated * 2);\n"
2832 "        if (new_buff == NULL) {\n"
2833 "            return -1;\n"
2834 "        } else {\n"
2835 "            cookie-E<gt>allocated *= 2;\n"
2836 "            cookie-E<gt>buf = new_buff;\n"
2837 "        }\n"
2838 "    }\n"
2839
2840 #. type: Plain text
2841 #: build/C/man3/fopencookie.3:309
2842 #, no-wrap
2843 msgid "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
2844 msgstr "    memcpy(cookie-E<gt>buf + cookie-E<gt>offset, buf, size);\n"
2845
2846 #. type: Plain text
2847 #: build/C/man3/fopencookie.3:313
2848 #, no-wrap
2849 msgid ""
2850 "    cookie-E<gt>offset += size;\n"
2851 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
2852 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
2853 msgstr ""
2854 "    cookie-E<gt>offset += size;\n"
2855 "    if (cookie-E<gt>offset E<gt> cookie-E<gt>endpos)\n"
2856 "        cookie-E<gt>endpos = cookie-E<gt>offset;\n"
2857
2858 #. type: Plain text
2859 #: build/C/man3/fopencookie.3:316
2860 #, no-wrap
2861 msgid ""
2862 "    return size;\n"
2863 "}\n"
2864 msgstr ""
2865 "    return size;\n"
2866 "}\n"
2867
2868 #. type: Plain text
2869 #: build/C/man3/fopencookie.3:322
2870 #, no-wrap
2871 msgid ""
2872 "ssize_t\n"
2873 "memfile_read(void *c, char *buf, size_t size)\n"
2874 "{\n"
2875 "    ssize_t xbytes;\n"
2876 "    struct memfile_cookie *cookie = c;\n"
2877 msgstr ""
2878 "ssize_t\n"
2879 "memfile_read(void *c, char *buf, size_t size)\n"
2880 "{\n"
2881 "    ssize_t xbytes;\n"
2882 "    struct memfile_cookie *cookie = c;\n"
2883
2884 #. type: Plain text
2885 #: build/C/man3/fopencookie.3:324
2886 #, no-wrap
2887 msgid "    /* Fetch minimum of bytes requested and bytes available */\n"
2888 msgstr "    /* Fetch minimum of bytes requested and bytes available */\n"
2889
2890 #. type: Plain text
2891 #: build/C/man3/fopencookie.3:330
2892 #, no-wrap
2893 msgid ""
2894 "    xbytes = size;\n"
2895 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
2896 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
2897 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
2898 "       xbytes = 0;\n"
2899 msgstr ""
2900 "    xbytes = size;\n"
2901 "    if (cookie-E<gt>offset + size E<gt> cookie-E<gt>endpos)\n"
2902 "        xbytes = cookie-E<gt>endpos - cookie-E<gt>offset;\n"
2903 "    if (xbytes E<lt> 0)     /* offset may be past endpos */\n"
2904 "       xbytes = 0;\n"
2905
2906 #. type: Plain text
2907 #: build/C/man3/fopencookie.3:332
2908 #, no-wrap
2909 msgid "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
2910 msgstr "    memcpy(buf, cookie-E<gt>buf + cookie-E<gt>offset, xbytes);\n"
2911
2912 #. type: Plain text
2913 #: build/C/man3/fopencookie.3:336
2914 #, no-wrap
2915 msgid ""
2916 "    cookie-E<gt>offset += xbytes;\n"
2917 "    return xbytes;\n"
2918 "}\n"
2919 msgstr ""
2920 "    cookie-E<gt>offset += xbytes;\n"
2921 "    return xbytes;\n"
2922 "}\n"
2923
2924 #. type: Plain text
2925 #: build/C/man3/fopencookie.3:342
2926 #, no-wrap
2927 msgid ""
2928 "int\n"
2929 "memfile_seek(void *c, off64_t *offset, int whence)\n"
2930 "{\n"
2931 "    off64_t new_offset;\n"
2932 "    struct memfile_cookie *cookie = c;\n"
2933 msgstr ""
2934 "int\n"
2935 "memfile_seek(void *c, off64_t *offset, int whence)\n"
2936 "{\n"
2937 "    off64_t new_offset;\n"
2938 "    struct memfile_cookie *cookie = c;\n"
2939
2940 #. type: Plain text
2941 #: build/C/man3/fopencookie.3:351
2942 #, no-wrap
2943 msgid ""
2944 "    if (whence == SEEK_SET)\n"
2945 "        new_offset = *offset;\n"
2946 "    else if (whence == SEEK_END)\n"
2947 "        new_offset = cookie-E<gt>endpos + *offset;\n"
2948 "    else if (whence == SEEK_CUR)\n"
2949 "        new_offset = cookie-E<gt>offset + *offset;\n"
2950 "    else\n"
2951 "        return -1;\n"
2952 msgstr ""
2953 "    if (whence == SEEK_SET)\n"
2954 "        new_offset = *offset;\n"
2955 "    else if (whence == SEEK_END)\n"
2956 "        new_offset = cookie-E<gt>endpos + *offset;\n"
2957 "    else if (whence == SEEK_CUR)\n"
2958 "        new_offset = cookie-E<gt>offset + *offset;\n"
2959 "    else\n"
2960 "        return -1;\n"
2961
2962 #. type: Plain text
2963 #: build/C/man3/fopencookie.3:354
2964 #, no-wrap
2965 msgid ""
2966 "    if (new_offset E<lt> 0)\n"
2967 "        return -1;\n"
2968 msgstr ""
2969 "    if (new_offset E<lt> 0)\n"
2970 "        return -1;\n"
2971
2972 #. type: Plain text
2973 #: build/C/man3/fopencookie.3:359
2974 #, no-wrap
2975 msgid ""
2976 "    cookie-E<gt>offset = new_offset;\n"
2977 "    *offset = new_offset;\n"
2978 "    return 0;\n"
2979 "}\n"
2980 msgstr ""
2981 "    cookie-E<gt>offset = new_offset;\n"
2982 "    *offset = new_offset;\n"
2983 "    return 0;\n"
2984 "}\n"
2985
2986 #. type: Plain text
2987 #: build/C/man3/fopencookie.3:364
2988 #, no-wrap
2989 msgid ""
2990 "int\n"
2991 "memfile_close(void *c)\n"
2992 "{\n"
2993 "    struct memfile_cookie *cookie = c;\n"
2994 msgstr ""
2995 "int\n"
2996 "memfile_close(void *c)\n"
2997 "{\n"
2998 "    struct memfile_cookie *cookie = c;\n"
2999
3000 #. type: Plain text
3001 #: build/C/man3/fopencookie.3:368
3002 #, no-wrap
3003 msgid ""
3004 "    free(cookie-E<gt>buf);\n"
3005 "    cookie-E<gt>allocated = 0;\n"
3006 "    cookie-E<gt>buf = NULL;\n"
3007 msgstr ""
3008 "    free(cookie-E<gt>buf);\n"
3009 "    cookie-E<gt>allocated = 0;\n"
3010 "    cookie-E<gt>buf = NULL;\n"
3011
3012 #. type: Plain text
3013 #: build/C/man3/fopencookie.3:371
3014 #, no-wrap
3015 msgid ""
3016 "    return 0;\n"
3017 "}\n"
3018 msgstr ""
3019 "    return 0;\n"
3020 "}\n"
3021
3022 #. type: Plain text
3023 #: build/C/man3/fopencookie.3:387
3024 #, no-wrap
3025 msgid ""
3026 "int\n"
3027 "main(int argc, char *argv[])\n"
3028 "{\n"
3029 "    cookie_io_functions_t  memfile_func = {\n"
3030 "        .read  = memfile_read,\n"
3031 "        .write = memfile_write,\n"
3032 "        .seek  = memfile_seek,\n"
3033 "        .close = memfile_close\n"
3034 "    };\n"
3035 "    FILE *stream;\n"
3036 "    struct memfile_cookie mycookie;\n"
3037 "    ssize_t nread;\n"
3038 "    long p;\n"
3039 "    int j;\n"
3040 "    char buf[1000];\n"
3041 msgstr ""
3042 "int\n"
3043 "main(int argc, char *argv[])\n"
3044 "{\n"
3045 "    cookie_io_functions_t  memfile_func = {\n"
3046 "        .read  = memfile_read,\n"
3047 "        .write = memfile_write,\n"
3048 "        .seek  = memfile_seek,\n"
3049 "        .close = memfile_close\n"
3050 "    };\n"
3051 "    FILE *stream;\n"
3052 "    struct memfile_cookie mycookie;\n"
3053 "    ssize_t nread;\n"
3054 "    long p;\n"
3055 "    int j;\n"
3056 "    char buf[1000];\n"
3057
3058 #. type: Plain text
3059 #: build/C/man3/fopencookie.3:389
3060 #, no-wrap
3061 msgid "    /* Set up the cookie before calling fopencookie() */\n"
3062 msgstr "    /* Set up the cookie before calling fopencookie() */\n"
3063
3064 #. type: Plain text
3065 #: build/C/man3/fopencookie.3:395
3066 #, no-wrap
3067 msgid ""
3068 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3069 "    if (mycookie.buf == NULL) {\n"
3070 "        perror(\"malloc\");\n"
3071 "        exit(EXIT_FAILURE);\n"
3072 "    }\n"
3073 msgstr ""
3074 "    mycookie.buf = malloc(INIT_BUF_SIZE);\n"
3075 "    if (mycookie.buf == NULL) {\n"
3076 "        perror(\"malloc\");\n"
3077 "        exit(EXIT_FAILURE);\n"
3078 "    }\n"
3079
3080 #. type: Plain text
3081 #: build/C/man3/fopencookie.3:399
3082 #, no-wrap
3083 msgid ""
3084 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3085 "    mycookie.offset = 0;\n"
3086 "    mycookie.endpos = 0;\n"
3087 msgstr ""
3088 "    mycookie.allocated = INIT_BUF_SIZE;\n"
3089 "    mycookie.offset = 0;\n"
3090 "    mycookie.endpos = 0;\n"
3091
3092 #. type: Plain text
3093 #: build/C/man3/fopencookie.3:405
3094 #, no-wrap
3095 msgid ""
3096 "    stream = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3097 "    if (stream == NULL) {\n"
3098 "        perror(\"fopencookie\");\n"
3099 "        exit(EXIT_FAILURE);\n"
3100 "    }\n"
3101 msgstr ""
3102 "    stream = fopencookie(&mycookie,\"w+\", memfile_func);\n"
3103 "    if (stream == NULL) {\n"
3104 "        perror(\"fopencookie\");\n"
3105 "        exit(EXIT_FAILURE);\n"
3106 "    }\n"
3107
3108 #. type: Plain text
3109 #: build/C/man3/fopencookie.3:407
3110 #, no-wrap
3111 msgid "    /* Write command-line arguments to our file */\n"
3112 msgstr "    /* Write command-line arguments to our file */\n"
3113
3114 #. type: Plain text
3115 #: build/C/man3/fopencookie.3:413
3116 #, no-wrap
3117 msgid ""
3118 "    for (j = 1; j E<lt> argc; j++)\n"
3119 "        if (fputs(argv[j], stream) == EOF) {\n"
3120 "            perror(\"fputs\");\n"
3121 "            exit(EXIT_FAILURE);\n"
3122 "        }\n"
3123 msgstr ""
3124 "    for (j = 1; j E<lt> argc; j++)\n"
3125 "        if (fputs(argv[j], stream) == EOF) {\n"
3126 "            perror(\"fputs\");\n"
3127 "            exit(EXIT_FAILURE);\n"
3128 "        }\n"
3129
3130 #. type: Plain text
3131 #: build/C/man3/fopencookie.3:415
3132 #, no-wrap
3133 msgid "    /* Read two bytes out of every five, until EOF */\n"
3134 msgstr "    /* Read two bytes out of every five, until EOF */\n"
3135
3136 #. type: Plain text
3137 #: build/C/man3/fopencookie.3:430
3138 #, no-wrap
3139 msgid ""
3140 "    for (p = 0; ; p += 5) {\n"
3141 "        if (fseek(stream, p, SEEK_SET) == -1) {\n"
3142 "            perror(\"fseek\");\n"
3143 "            exit(EXIT_FAILURE);\n"
3144 "        }\n"
3145 "        nread = fread(buf, 1, 2, stream);\n"
3146 "        if (nread == -1) {\n"
3147 "            perror(\"fread\");\n"
3148 "            exit(EXIT_FAILURE);\n"
3149 "        }\n"
3150 "        if (nread == 0) {\n"
3151 "            printf(\"Reached end of file\\en\");\n"
3152 "            break;\n"
3153 "        }\n"
3154 msgstr ""
3155 "    for (p = 0; ; p += 5) {\n"
3156 "        if (fseek(stream, p, SEEK_SET) == -1) {\n"
3157 "            perror(\"fseek\");\n"
3158 "            exit(EXIT_FAILURE);\n"
3159 "        }\n"
3160 "        nread = fread(buf, 1, 2, stream);\n"
3161 "        if (nread == -1) {\n"
3162 "            perror(\"fread\");\n"
3163 "            exit(EXIT_FAILURE);\n"
3164 "        }\n"
3165 "        if (nread == 0) {\n"
3166 "            printf(\"Reached end of file\\en\");\n"
3167 "            break;\n"
3168 "        }\n"
3169
3170 #. type: Plain text
3171 #: build/C/man3/fopencookie.3:433
3172 #, no-wrap
3173 msgid ""
3174 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3175 "    }\n"
3176 msgstr ""
3177 "        printf(\"/%.*s/\\en\", nread, buf);\n"
3178 "    }\n"
3179
3180 #. type: Plain text
3181 #: build/C/man3/fopencookie.3:436 build/C/man2/open_by_handle_at.2:579
3182 #: build/C/man2/open_by_handle_at.2:719 build/C/man2/readlink.2:327
3183 #, no-wrap
3184 msgid ""
3185 "    exit(EXIT_SUCCESS);\n"
3186 "}\n"
3187 msgstr ""
3188 "    exit(EXIT_SUCCESS);\n"
3189 "}\n"
3190
3191 #. type: Plain text
3192 #: build/C/man3/fopencookie.3:442
3193 msgid "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3194 msgstr "B<fclose>(3), B<fmemopen>(3), B<fopen>(3), B<fseek>(3)"
3195
3196 #. type: TH
3197 #: build/C/man3/fpurge.3:25
3198 #, no-wrap
3199 msgid "FPURGE"
3200 msgstr "FPURGE"
3201
3202 #. type: TH
3203 #: build/C/man3/fpurge.3:25
3204 #, no-wrap
3205 msgid "2001-12-15"
3206 msgstr "2001-12-15"
3207
3208 #. type: Plain text
3209 #: build/C/man3/fpurge.3:28
3210 msgid "fpurge, __fpurge - purge a stream"
3211 msgstr "fpurge, __fpurge - ストリームを一掃 (purge) する"
3212
3213 #. type: Plain text
3214 #: build/C/man3/fpurge.3:32
3215 #, no-wrap
3216 msgid ""
3217 "/* unsupported */\n"
3218 "B<#include E<lt>stdio.hE<gt>>\n"
3219 msgstr ""
3220 "/* unsupported */\n"
3221 "B<#include E<lt>stdio.hE<gt>>\n"
3222
3223 #. type: Plain text
3224 #: build/C/man3/fpurge.3:34
3225 #, no-wrap
3226 msgid "B<int fpurge(FILE *>I<stream>B<);>\n"
3227 msgstr "B<int fpurge(FILE *>I<stream>B<);>\n"
3228
3229 #. type: Plain text
3230 #: build/C/man3/fpurge.3:37
3231 #, no-wrap
3232 msgid ""
3233 "/* supported */\n"
3234 "B<#include E<lt>stdio.hE<gt>>\n"
3235 msgstr ""
3236 "/* supported */\n"
3237 "B<#include E<lt>stdio.hE<gt>>\n"
3238
3239 #. type: Plain text
3240 #: build/C/man3/fpurge.3:39
3241 #, no-wrap
3242 msgid "B<#include E<lt>stdio_ext.hE<gt>>\n"
3243 msgstr "B<#include E<lt>stdio_ext.hE<gt>>\n"
3244
3245 #. type: Plain text
3246 #: build/C/man3/fpurge.3:41
3247 #, no-wrap
3248 msgid "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3249 msgstr "B<void  __fpurge(FILE *>I<stream>B<);>\n"
3250
3251 #. type: Plain text
3252 #: build/C/man3/fpurge.3:54
3253 msgid "The function B<fpurge>()  clears the buffers of the given stream.  For output streams this discards any unwritten output.  For input streams this discards any input read from the underlying object but not yet obtained via B<getc>(3); this includes any text pushed back via B<ungetc>(3).  See also B<fflush>(3)."
3254 msgstr "B<fpurge>()  関数は、与えられたストリームのバッファをクリアする。 出力ストリームでこれを行うと、書き出されていない出力は捨てられる。 入力ストリームでこれを行うと、 下層にあるオブジェクトから読み込まれ B<getc>(3)  による取得を待っている入力が、すべて捨てられる。 これには B<ungetc>(3)  によって戻されたテキストも含まれる。 B<fflush>(3)  も参照のこと。"
3255
3256 #. type: Plain text
3257 #: build/C/man3/fpurge.3:58
3258 msgid "The function B<__fpurge>()  does precisely the same, but without returning a value."
3259 msgstr "B<__fpurge>()  関数も全く同じことを行うが、ただし返り値を返さない。"
3260
3261 #. type: Plain text
3262 #: build/C/man3/fpurge.3:65
3263 msgid "Upon successful completion B<fpurge>()  returns 0.  On error, it returns -1 and sets I<errno> appropriately."
3264 msgstr "成功すると B<fpurge>()  は 0 を返す。 エラーが起こると -1 を返し、 I<errno> を適切な値に設定する。"
3265
3266 #. type: Plain text
3267 #: build/C/man3/fpurge.3:70
3268 msgid "I<stream> is not an open stream."
3269 msgstr "I<stream> がオープンされていない。"
3270
3271 #. type: Plain text
3272 #: build/C/man3/fpurge.3:78
3273 msgid "These functions are nonstandard and not portable.  The function B<fpurge>()  was introduced in 4.4BSD and is not available under Linux.  The function B<__fpurge>()  was introduced in Solaris, and is present in glibc 2.1.95 and later."
3274 msgstr "これらの関数は標準ではなく、よって移植性もない。 B<fpurge>()  関数は 4.4BSD で導入されたが、Linux では利用できない。 B<__fpurge>()  関数は Solaris で導入され、glibc 2.1.95 以降には存在している。"
3275
3276 #. type: Plain text
3277 #: build/C/man3/fpurge.3:80
3278 msgid "Usually it is a mistake to want to discard input buffers."
3279 msgstr "通常は入力バッファを捨てようとするのは間違っている。"
3280
3281 #.  .BR fclean (3),
3282 #. type: Plain text
3283 #: build/C/man3/fpurge.3:85
3284 msgid "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3285 msgstr "B<fflush>(3), B<setbuf>(3), B<stdio_ext>(3)"
3286
3287 #. type: TH
3288 #: build/C/man3/fputwc.3:16
3289 #, no-wrap
3290 msgid "FPUTWC"
3291 msgstr "FPUTWC"
3292
3293 #. type: Plain text
3294 #: build/C/man3/fputwc.3:19
3295 msgid "fputwc, putwc - write a wide character to a FILE stream"
3296 msgstr "fputwc, putwc - ワイド文字を FILE ストリームに書き込む"
3297
3298 #. type: Plain text
3299 #: build/C/man3/fputwc.3:27
3300 #, no-wrap
3301 msgid ""
3302 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3303 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3304 msgstr ""
3305 "B<wint_t fputwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3306 "B<wint_t putwc(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
3307
3308 #. type: Plain text
3309 #: build/C/man3/fputwc.3:43
3310 msgid "The B<fputwc>()  function is the wide-character equivalent of the B<fputc>(3)  function.  It writes the wide character I<wc> to I<stream>.  If I<ferror(stream)> becomes true, it returns B<WEOF>.  If a wide-character conversion error occurs, it sets I<errno> to B<EILSEQ> and returns B<WEOF>.  Otherwise, it returns I<wc>."
3311 msgstr "B<fputwc>()  関数は、 B<fputc>(3)  に対応するワイド文字関数である。この 関数は、ワイド文字 I<wc> を I<stream> に書き込む。 I<ferror(stream)> が真になると、この関数は B<WEOF> を返す。 ワイド文字変換でエラーが発生した場合は、 I<errno> に B<EILSEQ> をセットし、 B<WEOF> を返す。 それ以外の場合では、この関数は I<wc> を返す。"
3312
3313 #. type: Plain text
3314 #: build/C/man3/fputwc.3:51
3315 msgid "The B<putwc>()  function or macro functions identically to B<fputwc>().  It may be implemented as a macro, and may evaluate its argument more than once.  There is no reason ever to use it."
3316 msgstr "B<putwc>()  関数あるいはマクロは、 B<fputwc>()  と全く同じ動作をする。 この関数はマクロとして実装されるかもしれないので、引き数が複数回評価さ れるかもしれない。この関数を使う理由はもはや存在しない。"
3317
3318 #. type: Plain text
3319 #: build/C/man3/fputwc.3:63
3320 msgid "The B<fputwc>()  function returns I<wc> if no error occurred, or B<WEOF> to indicate an error.  In the event of an error, I<errno> is set to indicate the cause."
3321 msgstr "B<fputwc>()  関数は、エラーが起きなければ I<wc> を返す。エラーの場合には B<WEOF> が返り、 I<errno> にエラーの原因を示す値が設定される。"
3322
3323 #. type: Plain text
3324 #: build/C/man3/fputwc.3:68
3325 msgid "Conversion of I<wc> to the stream's encoding fails."
3326 msgstr "I<wc> からストリームの符号への変換に失敗した。"
3327
3328 #. type: Plain text
3329 #: build/C/man3/fputwc.3:77
3330 msgid "The behavior of B<fputwc>()  depends on the B<LC_CTYPE> category of the current locale."
3331 msgstr "B<fputwc>()  の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存する。"
3332
3333 #. type: Plain text
3334 #: build/C/man3/fputwc.3:85
3335 msgid "In the absence of additional information passed to the B<fopen>(3)  call, it is reasonable to expect that B<fputwc>()  will actually write the multibyte sequence corresponding to the wide character I<wc>."
3336 msgstr "B<fopen>(3)  システムコールに渡す追加情報がない場合には、 B<fputwc>()  は 実際にはワイド文字 I<wc> に対応するマルチバイトシーケンスを書き込むと 期待してよい。"
3337
3338 #. type: Plain text
3339 #: build/C/man3/fputwc.3:89
3340 msgid "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3341 msgstr "B<fgetwc>(3), B<fputws>(3), B<unlocked_stdio>(3)"
3342
3343 #. type: TH
3344 #: build/C/man3/fread.3:45
3345 #, no-wrap
3346 msgid "FREAD"
3347 msgstr "FREAD"
3348
3349 #. type: TH
3350 #: build/C/man3/fread.3:45
3351 #, no-wrap
3352 msgid "2012-03-30"
3353 msgstr "2012-03-30"
3354
3355 #. type: Plain text
3356 #: build/C/man3/fread.3:48
3357 msgid "fread, fwrite - binary stream input/output"
3358 msgstr "fread, fwrite - バイナリストリームの入出力"
3359
3360 #. type: Plain text
3361 #: build/C/man3/fread.3:54
3362 #, no-wrap
3363 msgid "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
3364 msgstr "B<size_t fread(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<, FILE *>I<stream>B<);>\n"
3365
3366 #. type: Plain text
3367 #: build/C/man3/fread.3:57
3368 #, no-wrap
3369 msgid ""
3370 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
3371 "B<              FILE *>I<stream>B<);>\n"
3372 msgstr ""
3373 "B<size_t fwrite(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<nmemb>B<,>\n"
3374 "B<              FILE *>I<stream>B<);>\n"
3375
3376 #. type: Plain text
3377 #: build/C/man3/fread.3:69
3378 msgid "The function B<fread>()  reads I<nmemb> elements of data, each I<size> bytes long, from the stream pointed to by I<stream>, storing them at the location given by I<ptr>."
3379 msgstr "B<fread>()  関数は I<stream> ポインタで指定されたストリームから I<nmemb> 個のデータを読み込み、 I<ptr> で与えられた場所に格納する。 個々のデータは I<size> バイトの長さを持つ。"
3380
3381 #. type: Plain text
3382 #: build/C/man3/fread.3:80
3383 msgid "The function B<fwrite>()  writes I<nmemb> elements of data, each I<size> bytes long, to the stream pointed to by I<stream>, obtaining them from the location given by I<ptr>."
3384 msgstr "B<fwrite>()  関数は I<ptr> で指定された場所から得た I<nmemb> 個のデータを、 I<stream> ポインタで指定されたストリームに書き込む。 個々のデータは I<size> バイトの長さを持つ。"
3385
3386 #. type: Plain text
3387 #: build/C/man3/fread.3:96
3388 msgid "On success, B<fread>()  and B<fwrite>()  return the number of I<items> read or written.  This number equals the number of bytes transferred only when I<size> is 1.  If an error occurs, or the end of the file is reached, the return value is a short item count (or zero)."
3389 msgstr ""
3390 "成功すると、 B<fread>() と B<fwrite>() は読み書きを行った要素の個数を返す。\n"
3391 "I<size> が 1 の場合は、この数字は転送されたバイト数と等しい。\n"
3392 "エラーが生じた場合や、ファイルの末尾 (end-of-file) に達した場合、\n"
3393 "返り値は指定した個数よりも小さい値 (または 0) となる。"
3394
3395 #. type: Plain text
3396 #: build/C/man3/fread.3:103
3397 msgid "B<fread>()  does not distinguish between end-of-file and error, and callers must use B<feof>(3)  and B<ferror>(3)  to determine which occurred."
3398 msgstr "B<fread>()  は end-of-file とエラーを区別しないので、 どちらが生じたかを判断するためには、 呼び出し側で B<feof>(3)  と B<ferror>(3)  とを使用しなければならない。"
3399
3400 #. type: Plain text
3401 #: build/C/man3/fread.3:105
3402 msgid "C89, POSIX.1-2001."
3403 msgstr "C89, POSIX.1-2001."
3404
3405 #. type: Plain text
3406 #: build/C/man3/fread.3:111
3407 msgid "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
3408 msgstr "B<read>(2), B<write>(2), B<feof>(3), B<ferror>(3), B<unlocked_stdio>(3)"
3409
3410 #. type: TH
3411 #: build/C/man3/fseek.3:42
3412 #, no-wrap
3413 msgid "FSEEK"
3414 msgstr "FSEEK"
3415
3416 #. type: TH
3417 #: build/C/man3/fseek.3:42 build/C/man3/perror.3:31
3418 #, no-wrap
3419 msgid "2014-05-28"
3420 msgstr "2014-05-28"
3421
3422 #. type: Plain text
3423 #: build/C/man3/fseek.3:45
3424 msgid "fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream"
3425 msgstr "fgetpos, fseek, fsetpos, ftell, rewind - ストリームの位置を変更する"
3426
3427 #. type: Plain text
3428 #: build/C/man3/fseek.3:49
3429 msgid "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
3430 msgstr "B<int fseek(FILE *>I<stream>B<, long >I<offset>B<, int >I<whence>B<);>"
3431
3432 #. type: Plain text
3433 #: build/C/man3/fseek.3:51
3434 msgid "B<long ftell(FILE *>I<stream>B<);>"
3435 msgstr "B<long ftell(FILE *>I<stream>B<);>"
3436
3437 #. type: Plain text
3438 #: build/C/man3/fseek.3:53
3439 msgid "B<void rewind(FILE *>I<stream>B<);>"
3440 msgstr "B<void rewind(FILE *>I<stream>B<);>"
3441
3442 #. type: Plain text
3443 #: build/C/man3/fseek.3:55
3444 msgid "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3445 msgstr "B<int fgetpos(FILE *>I<stream>B<, fpos_t *>I<pos>B<);>"
3446
3447 #. type: Plain text
3448 #: build/C/man3/fseek.3:57
3449 msgid "B<int fsetpos(FILE *>I<stream>B<, const fpos_t *>I<pos>B<);>"
3450 msgstr "B<int fsetpos(FILE *>I<stream>B<, const fpos_t *>I<pos>B<);>"
3451
3452 #. type: Plain text
3453 #: build/C/man3/fseek.3:81
3454 msgid "The B<fseek>()  function sets the file position indicator for the stream pointed to by I<stream>.  The new position, measured in bytes, is obtained by adding I<offset> bytes to the position specified by I<whence>.  If I<whence> is set to B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, the offset is relative to the start of the file, the current position indicator, or end-of-file, respectively.  A successful call to the B<fseek>()  function clears the end-of-file indicator for the stream and undoes any effects of the B<ungetc>(3)  function on the same stream."
3455 msgstr "B<fseek>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位置表示子 (file position indicator) をセットする。新たな位置 (バイト単位)  は I<whence> で指定された位置に I<offset> バイトを加えることによって与えられる。 I<whence> が B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のどれかになっている場合は、それぞれファイルの先頭、現在の位置表示子、 ファイルの末尾からのオフセットが取られる。 B<fseek>()  関数の呼び出しが成功すると、ストリームの end-of-file 表示子は クリアされ、それまでに B<ungetc>(3)  関数で戻したデータはなかったことになる。"
3456
3457 #. type: Plain text
3458 #: build/C/man3/fseek.3:87
3459 msgid "The B<ftell>()  function obtains the current value of the file position indicator for the stream pointed to by I<stream>."
3460 msgstr "B<ftell>()  関数は I<stream> によって指定されたストリームにおける、ファイル位置表示子 の現時点での値を与える。"
3461
3462 #. type: Plain text
3463 #: build/C/man3/fseek.3:94
3464 msgid "The B<rewind>()  function sets the file position indicator for the stream pointed to by I<stream> to the beginning of the file.  It is equivalent to:"
3465 msgstr "B<rewind>()  関数は I<stream> によって指定されたストリームにおいて、ファイル位置表示子 をファイルの先頭にセットする。この関数は以下と等価である。"
3466
3467 #. type: Plain text
3468 #: build/C/man3/fseek.3:97
3469 msgid "(void) fseek(stream, 0L, SEEK_SET)"
3470 msgstr "(void) fseek(stream, 0L, SEEK_SET)"
3471
3472 #. type: Plain text
3473 #: build/C/man3/fseek.3:101
3474 msgid "except that the error indicator for the stream is also cleared (see B<clearerr>(3))."
3475 msgstr "ただし B<rewind>()  ではストリームに対するエラー表示子 (error indicator) も同時に クリアされる ( B<clearerr>(3)  を見よ)。"
3476
3477 #. type: Plain text
3478 #: build/C/man3/fseek.3:121
3479 msgid "The B<fgetpos>()  and B<fsetpos>()  functions are alternate interfaces equivalent to B<ftell>()  and B<fseek>()  (with I<whence> set to B<SEEK_SET>), setting and storing the current value of the file offset into or from the object referenced by I<pos>.  On some non-UNIX systems, an I<fpos_t> object may be a complex object and these routines may be the only way to portably reposition a text stream."
3480 msgstr "B<fgetpos>()  関数と B<fsetpos>()  関数は、それぞれ B<ftell>()  と B<fseek>()  で I<whence> に B<SEEK_SET> を指定した場合と同様の機能を、異なるインターフェースで提供する。 B<fgetpos>()  はファイルオフセットの現在の値を I<pos> が参照するオブジェクトに保存し、 B<fsetpos>()  はファイルオフセットを I<pos> に設定する。 UNIX 以外のシステムにおいては、 I<fpos_t> が構造体などの複雑なオブジェクトになっていて、これらのルーチンがテキス トストリームでファイル位置を変更する方法のうち、移植性のある唯一のもの になっている場合もある。"
3481
3482 #. type: Plain text
3483 #: build/C/man3/fseek.3:136
3484 msgid "The B<rewind>()  function returns no value.  Upon successful completion, B<fgetpos>(), B<fseek>(), B<fsetpos>()  return 0, and B<ftell>()  returns the current offset.  Otherwise, -1 is returned and I<errno> is set to indicate the error."
3485 msgstr "B<rewind>()  は返り値を持たない。 B<fgetpos>(), B<fseek>(), B<fsetpos>()  は成功すると 0 を返す。 B<ftell>()  は現在のオフセットを返す。失敗した場合は返り値は -1 となり、 I<errno> にエラーを示す値がセットされる。"
3486
3487 #. type: Plain text
3488 #: build/C/man3/fseek.3:142
3489 msgid "The I<stream> specified is not a seekable stream."
3490 msgstr "指定した I<stream> がシークできない。"
3491
3492 #. type: Plain text
3493 #: build/C/man3/fseek.3:154
3494 msgid "The I<whence> argument to B<fseek>()  was not B<SEEK_SET>, B<SEEK_END>, or B<SEEK_CUR>.  Or: the resulting file offset would be negative."
3495 msgstr "B<fseek>()  関数に対して与えた I<whence> 引数が B<SEEK_SET>, B<SEEK_END>, B<SEEK_CUR> 以外の値であった。 または、更新後のファイルオフセットが負になってしまう。"
3496
3497 #. type: Plain text
3498 #: build/C/man3/fseek.3:169
3499 msgid "The functions B<fgetpos>(), B<fseek>(), B<fsetpos>(), and B<ftell>()  may also fail and set I<errno> for any of the errors specified for the routines B<fflush>(3), B<fstat>(2), B<lseek>(2), and B<malloc>(3)."
3500 msgstr "B<fgetpos>(), B<fseek>(), B<fsetpos>(), B<ftell>()  は、それぞれ B<fflush>(3), B<fstat>(2), B<lseek>(2), B<malloc>(3)  などのルーチンを呼び出す際に失敗する可能性がある。この場合は それぞれ対応した I<errno> が設定される。"
3501
3502 #. type: Plain text
3503 #: build/C/man3/fseek.3:174
3504 msgid "B<lseek>(2), B<fseeko>(3)"
3505 msgstr "B<lseek>(2), B<fseeko>(3)"
3506
3507 #. type: TH
3508 #: build/C/man3/fseeko.3:25
3509 #, no-wrap
3510 msgid "FSEEKO"
3511 msgstr "FSEEKO"
3512
3513 #. type: TH
3514 #: build/C/man3/fseeko.3:25
3515 #, no-wrap
3516 msgid "2014-10-02"
3517 msgstr "2014-10-02"
3518
3519 #. type: Plain text
3520 #: build/C/man3/fseeko.3:28
3521 msgid "fseeko, ftello - seek to or report file position"
3522 msgstr "fseeko, ftello - ファイル位置を探す/報告する"
3523
3524 #. type: Plain text
3525 #: build/C/man3/fseeko.3:33
3526 #, no-wrap
3527 msgid "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
3528 msgstr "B<int fseeko(FILE *>I<stream>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
3529
3530 #. type: Plain text
3531 #: build/C/man3/fseeko.3:36
3532 #, no-wrap
3533 msgid ""
3534 "B<off_t ftello(FILE *>I<stream>B<);>\n"
3535 "\n"
3536 msgstr ""
3537 "B<off_t ftello(FILE *>I<stream>B<);>\n"
3538 "\n"
3539
3540 #. type: Plain text
3541 #: build/C/man3/fseeko.3:45
3542 msgid "B<fseeko>(), B<ftello>():"
3543 msgstr "B<fseeko>(), B<ftello>():"
3544
3545 #. type: Plain text
3546 #: build/C/man3/fseeko.3:50
3547 msgid "_FILE_OFFSET_BITS\\ ==\\ 64 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3548 msgstr "_FILE_OFFSET_BITS\\ ==\\ 64 || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600"
3549
3550 #. type: Plain text
3551 #: build/C/man3/fseeko.3:52
3552 msgid "(defining the obsolete _LARGEFILE_SOURCE macro also works)"
3553 msgstr "(廃止予定のマクロ _LARGEFILE_SOURCE を指定しても動作する)"
3554
3555 #. type: Plain text
3556 #: build/C/man3/fseeko.3:75
3557 msgid "The B<fseeko>()  and B<ftello>()  functions are identical to B<fseek>(3)  and B<ftell>(3)  (see B<fseek>(3)), respectively, except that the I<offset> argument of B<fseeko>()  and the return value of B<ftello>()  is of type I<off_t> instead of I<long>."
3558 msgstr "B<fseeko>()  関数および B<ftello>()  関数は、 それぞれ B<fseek>(3)  および B<ftell>(3)  と同一の機能を持つ (B<fseek>(3)  を見よ) が、ただし B<fseeko>()  関数の I<offset> 引数と B<ftello>()  の返り値が、 I<long> ではなく I<off_t> になっている。"
3559
3560 #. type: Plain text
3561 #: build/C/man3/fseeko.3:88
3562 msgid "On some architectures, both I<off_t> and I<long> are 32-bit types, but defining B<_FILE_OFFSET_BITS> with the value 64 (before including I<any> header files)  will turn I<off_t> into a 64-bit type."
3563 msgstr "いくつかのアーキテクチャーでは、 I<off_t> と I<long> の両方が 32 ビット型だが、 (「どの」ヘッダーファイルをインクルードするよりも前に) B<_FILE_OFFSET_BITS> を値 64 で定義すると、 I<off_t> が 64 ビット型になる。"
3564
3565 #. type: Plain text
3566 #: build/C/man3/fseeko.3:97
3567 msgid "On successful completion, B<fseeko>()  returns 0, while B<ftello>()  returns the current offset.  Otherwise, -1 is returned and I<errno> is set to indicate the error."
3568 msgstr "成功した場合、 B<fseeko>()  は 0 を、 B<ftello>()  は現在のオフセットを返す。 失敗した場合、-1 を返し、 I<errno> にエラーを示す値をセットする。"
3569
3570 #. type: Plain text
3571 #: build/C/man3/fseeko.3:100
3572 msgid "See the ERRORS in B<fseek>(3)."
3573 msgstr "B<fseek>(3)  の「エラー」の節を参照。"
3574
3575 #. type: Plain text
3576 #: build/C/man3/fseeko.3:102
3577 msgid "These functions are available under glibc since version 2.1."
3578 msgstr "これらの関数はバージョン 2.1 以降の glibc で利用可能である。"
3579
3580 #. type: Plain text
3581 #: build/C/man3/fseeko.3:104
3582 msgid "SUSv2, POSIX.1-2001."
3583 msgstr "SUSv2, POSIX.1-2001."
3584
3585 #. type: Plain text
3586 #: build/C/man3/fseeko.3:106
3587 msgid "These functions are found on System V-like systems."
3588 msgstr "これらの関数は System-V 風のシステムに存在する。"
3589
3590 #. type: Plain text
3591 #: build/C/man3/fseeko.3:108
3592 msgid "B<fseek>(3)"
3593 msgstr "B<fseek>(3)"
3594
3595 #. type: TH
3596 #: build/C/man3/getline.3:26
3597 #, no-wrap
3598 msgid "GETLINE"
3599 msgstr "GETLINE"
3600
3601 #. type: Plain text
3602 #: build/C/man3/getline.3:29
3603 msgid "getline, getdelim - delimited string input"
3604 msgstr "getline, getdelim - 区切り文字までの文字列入力を読み込む"
3605
3606 #. type: Plain text
3607 #: build/C/man3/getline.3:34
3608 #, no-wrap
3609 msgid "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
3610 msgstr "B<ssize_t getline(char **>I<lineptr>B<, size_t *>I<n>B<, FILE *>I<stream>B<);>\n"
3611
3612 #. type: Plain text
3613 #: build/C/man3/getline.3:37
3614 #, no-wrap
3615 msgid "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
3616 msgstr "B<ssize_t getdelim(char **>I<lineptr>B<, size_t *>I<n>B<, int >I<delim>B<, FILE *>I<stream>B<);>\n"
3617
3618 #. type: Plain text
3619 #: build/C/man3/getline.3:47
3620 msgid "B<getline>(), B<getdelim>():"
3621 msgstr "B<getline>(), B<getdelim>():"
3622
3623 #. type: Plain text
3624 #: build/C/man3/getline.3:52
3625 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
3626 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200809L || _XOPEN_SOURCE\\ E<gt>=\\ 700"
3627
3628 #. type: Plain text
3629 #: build/C/man3/getline.3:65
3630 msgid "B<getline>()  reads an entire line from I<stream>, storing the address of the buffer containing the text into I<*lineptr>.  The buffer is null-terminated and includes the newline character, if one was found."
3631 msgstr "B<getline>()  は I<stream> から 1 行全てを読み込み、テキストが含まれているバッファのアドレスを I<*lineptr> に格納する。 バッファはヌル文字 (\\e0) で終端される。 改行文字が見つかった場合は、改行文字もバッファに格納される。"
3632
3633 #. type: Plain text
3634 #: build/C/man3/getline.3:77
3635 msgid "If I<*lineptr> is set to NULL and I<*n> is set 0 before the call, then B<getline>()  will allocate a buffer for storing the line.  This buffer should be freed by the user program even if B<getline>()  failed."
3636 msgstr "I<*lineptr> が NULL にセットされ、 I<*n> が呼び出し前に 0 にセットされた場合、 B<getline>()  は行の内容を格納するためのバッファを確保する。 このバッファは、 B<getline>() が失敗した場合であっても、ユーザーのプログラムで解放すべきである。"
3637
3638 #. type: Plain text
3639 #: build/C/man3/getline.3:95
3640 msgid "Alternatively, before calling B<getline>(), I<*lineptr> can contain a pointer to a B<malloc>(3)-allocated buffer I<*n> bytes in size.  If the buffer is not large enough to hold the line, B<getline>()  resizes it with B<realloc>(3), updating I<*lineptr> and I<*n> as necessary."
3641 msgstr "別の方法として、 B<getline>()  を呼び出す際に、 I<*lineptr> に B<malloc>(3)  で確保した大きさ I<*n> バイトのバッファへのポインタを入れて渡すこともできる。 読み込んだ行を保持するのに十分なバッファがない場合、 B<getline>()  は B<realloc>(3)  を使ってバッファのサイズを変更し、必要に応じて I<*lineptr> と I<*n> を更新する。"
3642
3643 #. type: Plain text
3644 #: build/C/man3/getline.3:101
3645 msgid "In either case, on a successful call, I<*lineptr> and I<*n> will be updated to reflect the buffer address and allocated size respectively."
3646 msgstr "どちらの場合でも、呼び出しに成功したときには、 I<*lineptr> と I<*n> がバッファのアドレスと割り当てたサイズを反映した値に更新される。"
3647
3648 #. type: Plain text
3649 #: build/C/man3/getline.3:112
3650 msgid "B<getdelim>()  works like B<getline>(), except that a line delimiter other than newline can be specified as the I<delimiter> argument.  As with B<getline>(), a delimiter character is not added if one was not present in the input before end of file was reached."
3651 msgstr "B<getdelim>()  は B<getline>()  と同じように動作するが、改行文字以外の区切り文字を引き数 I<delim> に指定することができる。 B<getline>()  と同様に、ファイル終端に達するまでに入力行に区切り文字が見付からない場合は、 区切り文字をバッファに追加しない。"
3652
3653 #. type: Plain text
3654 #: build/C/man3/getline.3:121
3655 msgid "On success, B<getline>()  and B<getdelim>()  return the number of characters read, including the delimiter character, but not including the terminating null byte (\\(aq\\e0\\(aq).  This value can be used to handle embedded null bytes in the line read."
3656 msgstr "成功した場合、 B<getline>()  と B<getdelim>()  は読み込んだ文字数を返す。 文字数には区切り文字は含まれるが、終端に使うヌルバイト (\\(aq\\e0\\(aq) は含まれない。 この値によって、読み込んだ行に含まれるヌルバイトを操作することができる。"
3657
3658 #. type: Plain text
3659 #: build/C/man3/getline.3:127
3660 msgid "Both functions return -1 on failure to read a line (including end-of-file condition).  In the event of an error, I<errno> is set to indicate the cause."
3661 msgstr "どちらの関数も、行の読み込みに失敗した場合には -1 を返す (ファイルの終端に達した場合にも -1 を返す)。 エラーが発生した場合には、 I<errno> にエラーの原因を示す値が設定される。"
3662
3663 #. type: Plain text
3664 #: build/C/man3/getline.3:137
3665 msgid "Bad arguments (I<n> or I<lineptr> is NULL, or I<stream> is not valid)."
3666 msgstr "引き数が不正である (I<n> または I<lineptr> が NULL である。 もしくは I<stream> が有効でない)。"
3667
3668 #. type: Plain text
3669 #: build/C/man3/getline.3:144
3670 msgid "Both B<getline>()  and B<getdelim>()  were originally GNU extensions.  They were standardized in POSIX.1-2008."
3671 msgstr "B<getline>()  と B<getdelim>()  は、どちらも元は GNU による拡張であったが、 POSIX.1-2008 で標準化された。"
3672
3673 #. type: Plain text
3674 #: build/C/man3/getline.3:149
3675 #, no-wrap
3676 msgid ""
3677 "#define _GNU_SOURCE\n"
3678 "#include E<lt>stdio.hE<gt>\n"
3679 "#include E<lt>stdlib.hE<gt>\n"
3680 msgstr ""
3681 "#define _GNU_SOURCE\n"
3682 "#include E<lt>stdio.hE<gt>\n"
3683 "#include E<lt>stdlib.hE<gt>\n"
3684
3685 #. type: Plain text
3686 #: build/C/man3/getline.3:157
3687 #, no-wrap
3688 msgid ""
3689 "int\n"
3690 "main(void)\n"
3691 "{\n"
3692 "    FILE *stream;\n"
3693 "    char *line = NULL;\n"
3694 "    size_t len = 0;\n"
3695 "    ssize_t read;\n"
3696 msgstr ""
3697 "int\n"
3698 "main(void)\n"
3699 "{\n"
3700 "    FILE *stream;\n"
3701 "    char *line = NULL;\n"
3702 "    size_t len = 0;\n"
3703 "    ssize_t read;\n"
3704
3705 #. type: Plain text
3706 #: build/C/man3/getline.3:161
3707 #, no-wrap
3708 msgid ""
3709 "    stream = fopen(\"/etc/motd\", \"r\");\n"
3710 "    if (stream == NULL)\n"
3711 "        exit(EXIT_FAILURE);\n"
3712 msgstr ""
3713 "    stream = fopen(\"/etc/motd\", \"r\");\n"
3714 "    if (stream == NULL)\n"
3715 "        exit(EXIT_FAILURE);\n"
3716
3717 #. type: Plain text
3718 #: build/C/man3/getline.3:166
3719 #, no-wrap
3720 msgid ""
3721 "    while ((read = getline(&line, &len, stream)) != -1) {\n"
3722 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
3723 "        printf(\"%s\", line);\n"
3724 "    }\n"
3725 msgstr ""
3726 "    while ((read = getline(&line, &len, stream)) != -1) {\n"
3727 "        printf(\"Retrieved line of length %zu :\\en\", read);\n"
3728 "        printf(\"%s\", line);\n"
3729 "    }\n"
3730
3731 #. type: Plain text
3732 #: build/C/man3/getline.3:171
3733 #, no-wrap
3734 msgid ""
3735 "    free(line);\n"
3736 "    fclose(stream);\n"
3737 "    exit(EXIT_SUCCESS);\n"
3738 "}\n"
3739 msgstr ""
3740 "    free(line);\n"
3741 "    fclose(stream);\n"
3742 "    exit(EXIT_SUCCESS);\n"
3743 "}\n"
3744
3745 #. type: Plain text
3746 #: build/C/man3/getline.3:178
3747 msgid "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<scanf>(3)"
3748 msgstr "B<read>(2), B<fgets>(3), B<fopen>(3), B<fread>(3), B<scanf>(3)"
3749
3750 #. type: TH
3751 #: build/C/man3/gets.3:29
3752 #, no-wrap
3753 msgid "GETS"
3754 msgstr "GETS"
3755
3756 #. type: TH
3757 #: build/C/man3/gets.3:29
3758 #, no-wrap
3759 msgid "2014-01-24"
3760 msgstr "2014-01-24"
3761
3762 #. type: Plain text
3763 #: build/C/man3/gets.3:32
3764 msgid "gets - get a string from standard input (DEPRECATED)"
3765 msgstr "gets - 標準入力からの文字列を取得する (非推奨)"
3766
3767 #. type: Plain text
3768 #: build/C/man3/gets.3:37
3769 #, no-wrap
3770 msgid "B<char *gets(char *>I<s>B<);>\n"
3771 msgstr "B<char *gets(char *>I<s>B<);>\n"
3772
3773 #. type: Plain text
3774 #: build/C/man3/gets.3:40
3775 msgid "I<Never use this function>."
3776 msgstr "I<この関数は使用しないこと>。"
3777
3778 #. type: Plain text
3779 #: build/C/man3/gets.3:50
3780 msgid "B<gets>()  reads a line from I<stdin> into the buffer pointed to by I<s> until either a terminating newline or B<EOF>, which it replaces with a null byte (\\(aq\\e0\\(aq).  No check for buffer overrun is performed (see BUGS below)."
3781 msgstr "B<gets>()  は、改行文字か B<EOF> までの 1行を I<stdin> から読み込み I<s> が指すバッファに格納する (末尾の改行文字や B<EOF> はヌルバイト (\\(aq\\e0\\(aq) に置き換えられる)。 バッファオーバーランのチェックは行われない (下記の「バグ」を参照)。"
3782
3783 #. type: Plain text
3784 #: build/C/man3/gets.3:58
3785 msgid "B<gets>()  returns I<s> on success, and NULL on error or when end of file occurs while no characters have been read.  However, given the lack of buffer overrun checking, there can be no guarantees that the function will even return."
3786 msgstr "B<gets>() は、成功すると I<s> を返し、エラーや 1 文字も読み込んでいないのにファイルの終わりになった 場合に NULL を返す。 しかし、バッファの行き過ぎのチェックが行われないため、この関数が返るという保証はない。"
3787
3788 #. type: Plain text
3789 #: build/C/man3/gets.3:72
3790 msgid "LSB deprecates B<gets>().  POSIX.1-2008 marks B<gets>()  obsolescent.  ISO C11 removes the specification of B<gets>()  from the C language, and since version 2.16, glibc header files don't expose the function declaration if the B<_ISOC11_SOURCE> feature test macro is defined."
3791 msgstr ""
3792 "LSB は B<gets>() を非推奨としている。\n"
3793 "POSIX.1-2008 では B<gets>() に廃止予定の印が付けられている。\n"
3794 "ISO C11 では B<gets>)() の規定が C 言語から削除されている。\n"
3795 "glibc バージョン 2.16 以降では、機能検査マクロ B<_ISOC11_SOURCE> が定義された\n"
3796 "場合、glibc ヘッダファイルでは B<gets>)() の宣言が公開されない。"
3797
3798 #. type: Plain text
3799 #: build/C/man3/gets.3:86
3800 msgid "Never use B<gets>().  Because it is impossible to tell without knowing the data in advance how many characters B<gets>()  will read, and because B<gets>()  will continue to store characters past the end of the buffer, it is extremely dangerous to use.  It has been used to break computer security.  Use B<fgets>()  instead."
3801 msgstr "B<gets>()  は絶対に使用してはならない。 前もってデータを知ることなしに B<gets>()  が何文字読むかを知ることはできず、 B<gets>()  がバッファの終わりを越えて書き込み続けるため、 B<gets>()  を使うのは極めて危険である。 これを利用してコンピュータのセキュリティが破られてきた。 代わりに B<fgets>()  を使うこと。"
3802
3803 #. type: Plain text
3804 #: build/C/man3/gets.3:90
3805 msgid "For more information, see CWE-242 (aka \"Use of Inherently Dangerous Function\") at http://cwe.mitre.org/data/definitions/242.html"
3806 msgstr "詳しい情報については、CWE-242 (別名 \"Use of Inherently Dangerous Function\" (「本質的に危険な関数を使う」)) を参照。 http://cwe.mitre.org/data/definitions/242.html で参照できる。"
3807
3808 #. type: Plain text
3809 #: build/C/man3/gets.3:108
3810 msgid "B<read>(2), B<write>(2), B<ferror>(3), B<fgetc>(3), B<fgets>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
3811 msgstr "B<read>(2), B<write>(2), B<ferror>(3), B<fgetc>(3), B<fgets>(3), B<fgetwc>(3), B<fgetws>(3), B<fopen>(3), B<fread>(3), B<fseek>(3), B<getline>(3), B<getwchar>(3), B<puts>(3), B<scanf>(3), B<ungetwc>(3), B<unlocked_stdio>(3), B<feature_test_macros>(7)"
3812
3813 #. type: TH
3814 #: build/C/man3/getw.3:25
3815 #, no-wrap
3816 msgid "GETW"
3817 msgstr "GETW"
3818
3819 #. type: TH
3820 #: build/C/man3/getw.3:25
3821 #, no-wrap
3822 msgid "2010-09-26"
3823 msgstr "2010-09-26"
3824
3825 #. type: Plain text
3826 #: build/C/man3/getw.3:28
3827 msgid "getw, putw - input and output of words (ints)"
3828 msgstr "getw, putw - ワード(int)の入出力"
3829
3830 #. type: Plain text
3831 #: build/C/man3/getw.3:33
3832 #, no-wrap
3833 msgid "B<int getw(FILE *>I<stream>B<);>\n"
3834 msgstr "B<int getw(FILE *>I<stream>B<);>\n"
3835
3836 #. type: Plain text
3837 #: build/C/man3/getw.3:35
3838 #, no-wrap
3839 msgid "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
3840 msgstr "B<int putw(int >I<w>B<, FILE *>I<stream>B<);>\n"
3841
3842 #. type: Plain text
3843 #: build/C/man3/getw.3:44
3844 msgid "B<getw>(), B<putw>():"
3845 msgstr "B<getw>(), B<putw>():"
3846
3847 #. type: TP
3848 #: build/C/man3/getw.3:47
3849 #, no-wrap
3850 msgid "Since glibc 2.3.3:"
3851 msgstr "glibc 2.3.3 以降:"
3852
3853 #. type: Plain text
3854 #: build/C/man3/getw.3:50
3855 msgid "_SVID_SOURCE || _BSD_SOURCE ||"
3856 msgstr "_SVID_SOURCE || _BSD_SOURCE ||"
3857
3858 #. type: Plain text
3859 #: build/C/man3/getw.3:53
3860 #, no-wrap
3861 msgid ""
3862 "(_XOPEN_SOURCE &&\n"
3863 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
3864 msgstr ""
3865 "(_XOPEN_SOURCE &&\n"
3866 "    !(_POSIX_C_SOURCE\\ E<gt>=\\ 200112L || _XOPEN_SOURCE\\ E<gt>=\\ 600))\n"
3867
3868 #. type: TP
3869 #: build/C/man3/getw.3:53
3870 #, no-wrap
3871 msgid "Before glibc 2.3.3:"
3872 msgstr "glibc 2.3.3 より前:"
3873
3874 #. type: Plain text
3875 #: build/C/man3/getw.3:56
3876 msgid "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
3877 msgstr "_SVID_SOURCE || _BSD_SOURCE || _XOPEN_SOURCE"
3878
3879 #. type: Plain text
3880 #: build/C/man3/getw.3:66
3881 msgid "B<getw>()  reads a word (that is, an I<int>) from I<stream>.  It's provided for compatibility with SVr4.  We recommend you use B<fread>(3)  instead."
3882 msgstr "B<getw>()  は I<stream> からワード (I<int>型) を読み込む。 この関数は、SVr4 との互換性のために提供されている。 この関数の代わりに B<fread>(3)  を使用することを勧める。"
3883
3884 #. type: Plain text
3885 #: build/C/man3/getw.3:73
3886 msgid "B<putw>()  writes the word I<w> (that is, an I<int>) to I<stream>.  It is provided for compatibility with SVr4, but we recommend you use B<fwrite>(3)  instead."
3887 msgstr "B<putw>()  は I<stream> にワード I<w> (I<int>型) を書き込む。 この関数は SVr4 との互換性のために提供されているが、この関数の代わりに B<fwrite>(3)  を使用することを勧める。"
3888
3889 #. type: Plain text
3890 #: build/C/man3/getw.3:80
3891 msgid "Normally, B<getw>()  returns the word read, and B<putw>()  returns 0.  On error, they return B<EOF>."
3892 msgstr "通常、 B<getw>()  は読み込んだワードを返し、 B<putw>()  は 0 を返す。 エラーが発生した場合、これらの関数は B<EOF> を返す。"
3893
3894 #. type: Plain text
3895 #: build/C/man3/getw.3:83
3896 msgid "SVr4, SUSv2.  Not present in POSIX.1-2001."
3897 msgstr "SVr4, SUSv2.  POSIX.1-2001 には存在しない。"
3898
3899 #. type: Plain text
3900 #: build/C/man3/getw.3:87
3901 msgid "The value returned on error is also a legitimate data value.  B<ferror>(3)  can be used to distinguish between the two cases."
3902 msgstr "エラーの時に返される値は、正しいデータとして返されることもある。 B<ferror>(3)  を用いると、この二つの場合を区別することが出来る。"
3903
3904 #. type: Plain text
3905 #: build/C/man3/getw.3:93
3906 msgid "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
3907 msgstr "B<ferror>(3), B<fread>(3), B<fwrite>(3), B<getc>(3), B<putc>(3)"
3908
3909 #. type: TH
3910 #: build/C/man2/link.2:32
3911 #, no-wrap
3912 msgid "LINK"
3913 msgstr "LINK"
3914
3915 #. type: Plain text
3916 #: build/C/man2/link.2:35
3917 msgid "link, linkat - make a new name for a file"
3918 msgstr "link, linkat - ファイルの新しい名前を作成する"
3919
3920 #. type: Plain text
3921 #: build/C/man2/link.2:38 build/C/man2/pipe.2:42 build/C/man2/read.2:41
3922 #: build/C/man2/readlink.2:50 build/C/man2/symlink.2:39
3923 #: build/C/man2/unlink.2:39
3924 #, no-wrap
3925 msgid "B<#include E<lt>unistd.hE<gt>>\n"
3926 msgstr "B<#include E<lt>unistd.hE<gt>>\n"
3927
3928 #. type: Plain text
3929 #: build/C/man2/link.2:40
3930 #, no-wrap
3931 msgid "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
3932 msgstr "B<int link(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
3933
3934 #. type: Plain text
3935 #: build/C/man2/link.2:43 build/C/man2/readlink.2:56 build/C/man2/symlink.2:44
3936 #: build/C/man2/unlink.2:44
3937 #, no-wrap
3938 msgid ""
3939 "B<#include E<lt>fcntl.hE<gt>           >/* Definition of AT_* constants */\n"
3940 "B<#include E<lt>unistd.hE<gt>>\n"
3941 msgstr ""
3942 "B<#include E<lt>fcntl.hE<gt>           >/* AT_* 定数の定義 */\n"
3943 "B<#include E<lt>unistd.hE<gt>>\n"
3944
3945 #. type: Plain text
3946 #: build/C/man2/link.2:46
3947 #, no-wrap
3948 msgid ""
3949 "B<int linkat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
3950 "B<           int >I<newdirfd>B<, const char *>I<newpath>B<, int >I<flags>B<);>\n"
3951 msgstr ""
3952 "B<int linkat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
3953 "B<           int >I<newdirfd>B<, const char *>I<newpath>B<, int >I<flags>B<);>\n"
3954
3955 #. type: Plain text
3956 #: build/C/man2/link.2:54
3957 msgid "B<linkat>():"
3958 msgstr "B<linkat>():"
3959
3960 #. type: Plain text
3961 #: build/C/man2/link.2:63 build/C/man2/open.2:85 build/C/man2/readlink.2:83
3962 #: build/C/man2/rename.2:69 build/C/man2/symlink.2:71 build/C/man2/unlink.2:63
3963 msgid "_ATFILE_SOURCE"
3964 msgstr "_ATFILE_SOURCE"
3965
3966 #. type: Plain text
3967 #: build/C/man2/link.2:69
3968 msgid "B<link>()  creates a new link (also known as a hard link) to an existing file."
3969 msgstr "B<link>()  は存在するファイルへの新しいリンク (link)  (ハードリンク (hard link) ともいう) を作成する。"
3970
3971 #. type: Plain text
3972 #: build/C/man2/link.2:75
3973 msgid "If I<newpath> exists, it will I<not> be overwritten."
3974 msgstr "I<newpath> が存在する場合には、上書きはI<されない>。"
3975
3976 #. type: Plain text
3977 #: build/C/man2/link.2:80
3978 msgid "This new name may be used exactly as the old one for any operation; both names refer to the same file (and so have the same permissions and ownership) and it is impossible to tell which name was the \"original\"."
3979 msgstr "この新しい名前は全ての操作において古い名前と完全に同じように使用される; 両方の名前は同じファイルを参照しており (それで同じ許可 (permission) や所有者 (ownership) となるので)、 どちらの名前が本来のものであるか判別できない。"
3980
3981 #. type: SS
3982 #: build/C/man2/link.2:80
3983 #, no-wrap
3984 msgid "linkat()"
3985 msgstr "linkat()"
3986
3987 #. type: Plain text
3988 #: build/C/man2/link.2:86
3989 msgid "The B<linkat>()  system call operates in exactly the same way as B<link>(), except for the differences described here."
3990 msgstr "B<linkat>() システムコールは B<link>() と全く同様に動作するが、以下で説明する点が異なる。"
3991
3992 #. type: Plain text
3993 #: build/C/man2/link.2:96
3994 msgid "If the pathname given in I<oldpath> is relative, then it is interpreted relative to the directory referred to by the file descriptor I<olddirfd> (rather than relative to the current working directory of the calling process, as is done by B<link>()  for a relative pathname)."
3995 msgstr "I<oldpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリプター I<olddirfd> が参照するディレクトリに対する相対パスと解釈される (B<link>(2) に相対パス名を渡した場合のように、呼び出したプロセスのカレントワーキングディレクトリに対する相対パスではない)。"
3996
3997 #. type: Plain text
3998 #: build/C/man2/link.2:108
3999 msgid "If I<oldpath> is relative and I<olddirfd> is the special value B<AT_FDCWD>, then I<oldpath> is interpreted relative to the current working directory of the calling process (like B<link>())."
4000 msgstr "I<oldpath> で指定されたパス名が相対パスで、 I<olddirfd> が特別な値 B<AT_FDCWD> の場合、 (B<link>(2) と同様に) I<oldpath> は呼び出したプロセスのカレントワーキングディレクトリに対する相対パスと解釈される。"
4001
4002 #. type: Plain text
4003 #: build/C/man2/link.2:114 build/C/man2/rename.2:158
4004 msgid "If I<oldpath> is absolute, then I<olddirfd> is ignored."
4005 msgstr "I<oldpath> で指定されたパス名が絶対パスの場合、 I<olddirfd> は無視される。"
4006
4007 #. type: Plain text
4008 #: build/C/man2/link.2:122 build/C/man2/rename.2:166
4009 msgid "The interpretation of I<newpath> is as for I<oldpath>, except that a relative pathname is interpreted relative to the directory referred to by the file descriptor I<newdirfd>."
4010 msgstr "I<newpath> の解釈は I<oldpath> と同じである。 相対パスのパス名がファイルディスクリプター I<newdirfd> が参照するディレクトリと解釈される点だけが異なる。"
4011
4012 #. type: Plain text
4013 #: build/C/man2/link.2:125
4014 msgid "The following values can be bitwise ORed in I<flags>:"
4015 msgstr "以下の値のビット単位の論理和を I<flags> に指定できる。"
4016
4017 #. type: TP
4018 #: build/C/man2/link.2:125
4019 #, no-wrap
4020 msgid "B<AT_EMPTY_PATH> (since Linux 2.6.39)"
4021 msgstr "B<AT_EMPTY_PATH> (Linux 2.6.39 以降)"
4022
4023 #.  commit 11a7b371b64ef39fc5fb1b6f2218eef7c4d035e3
4024 #.  Before glibc 2.16, defining _ATFILE_SOURCE sufficed
4025 #. type: Plain text
4026 #: build/C/man2/link.2:152
4027 msgid "If I<oldpath> is an empty string, create a link to the file referenced by I<olddirfd> (which may have been obtained using the B<open>(2)  B<O_PATH> flag).  In this case, I<olddirfd> can refer to any type of file, not just a directory.  This will generally not work if the file has a link count of zero (files created with B<O_TMPFILE> and without B<O_EXCL> are an exception).  The caller must have the B<CAP_DAC_READ_SEARCH> capability in order to use this flag.  This flag is Linux-specific; define B<_GNU_SOURCE> to obtain its definition."
4028 msgstr "I<oldpath> が空文字列の場合、 I<olddirfd> が参照するファイルへのリンクを作成する (I<olddirfd> は B<open>(2) の B<O_PATH> フラグを使って取得する)。 この場合、 I<olddirfd> はディレクトリ以外の任意の型のファイルを参照することができる。 一般的には、 ファイルのリンクカウントが 0 の場合は、この操作は成功しない (ただし、 B<O_TMPFILE> が指定され B<O_EXCL> を指定せずに作成されたファイルは例外である)。 このフラグを使用するためには、 呼び出し元は B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていなければならない。 このフラグは Linux 固有で、 この定義を得るには B<_GNU_SOURCE> を定義すること。"
4029
4030 #. type: TP
4031 #: build/C/man2/link.2:152
4032 #, no-wrap
4033 msgid "B<AT_SYMLINK_FOLLOW> (since Linux 2.6.18)"
4034 msgstr "B<AT_SYMLINK_FOLLOW> (Linux 2.6.18 以降)"
4035
4036 #. type: Plain text
4037 #: build/C/man2/link.2:171
4038 msgid "By default, B<linkat>(), does not dereference I<oldpath> if it is a symbolic link (like B<link>()).  The flag B<AT_SYMLINK_FOLLOW> can be specified in I<flags> to cause I<oldpath> to be dereferenced if it is a symbolic link.  If procfs is mounted, this can be used as an alternative to B<AT_EMPTY_PATH>, like this:"
4039 msgstr "B<linkat>() は (B<link>() 同様) デフォルトでは I<oldpath> がシンボリックリンクの場合リンクの展開を行わない。 フラグ B<AT_SYMLINK_FOLLOW> を I<flags> に指定することができ、指定した場合 I<oldpath> がシンボリックリンクの場合リンクの展開が行われる。 procfs がマウントされている場合、これは B<AT_EMPTY_PATH> の代替として以下のように使うことができる。"
4040
4041 #. type: Plain text
4042 #: build/C/man2/link.2:176
4043 #, no-wrap
4044 msgid ""
4045 "linkat(AT_FDCWD, \"/proc/self/fd/E<lt>fdE<gt>\", newdirfd,\n"
4046 "       newname, AT_SYMLINK_FOLLOW);\n"
4047 msgstr ""
4048 "linkat(AT_FDCWD, \"/proc/self/fd/E<lt>fdE<gt>\", newdirfd,\n"
4049 "       newname, AT_SYMLINK_FOLLOW);\n"
4050
4051 #. type: Plain text
4052 #: build/C/man2/link.2:182
4053 msgid "Before kernel 2.6.18, the I<flags> argument was unused, and had to be specified as 0."
4054 msgstr "カーネル 2.6.18 より前では、 I<flags> 引き数は未使用で、 0 を指定しなければならなかった。"
4055
4056 #. type: Plain text
4057 #: build/C/man2/link.2:187
4058 msgid "See B<openat>(2)  for an explanation of the need for B<linkat>()."
4059 msgstr "B<linkat>() の必要性についての説明については B<openat>(2) を参照。"
4060
4061 #. type: Plain text
4062 #: build/C/man2/link.2:192 build/C/man2/pipe.2:138 build/C/man3/remove.3:65
4063 #: build/C/man2/rename.2:208 build/C/man2/rmdir.2:45
4064 #: build/C/man2/symlink.2:145 build/C/man2/unlink.2:158
4065 msgid "On success, zero is returned.  On error, -1 is returned, and I<errno> is set appropriately."
4066 msgstr "成功した場合は 0 が返される。エラーの場合は -1 が返され、 I<errno> が適切に設定される。"
4067
4068 #. type: TP
4069 #: build/C/man2/link.2:193 build/C/man2/open.2:789 build/C/man2/readlink.2:160
4070 #: build/C/man2/rename.2:209 build/C/man2/rmdir.2:46
4071 #: build/C/man2/symlink.2:146 build/C/man3/tmpfile.3:57
4072 #: build/C/man2/unlink.2:159
4073 #, no-wrap
4074 msgid "B<EACCES>"
4075 msgstr "B<EACCES>"
4076
4077 #. type: Plain text
4078 #: build/C/man2/link.2:204
4079 msgid "Write access to the directory containing I<newpath> is denied, or search permission is denied for one of the directories in the path prefix of I<oldpath> or I<newpath>.  (See also B<path_resolution>(7).)"
4080 msgstr "I<newpath> を含んでいるディレクトリへの書き込みが許されていないか、 I<oldpath> または I<newpath> へのディレクトリのどれかに検索許可がない (B<path_resolution>(7)  を参照)。"
4081
4082 #. type: TP
4083 #: build/C/man2/link.2:204 build/C/man2/open.2:798 build/C/man2/rename.2:245
4084 #: build/C/man2/symlink.2:155 build/C/man2/write.2:135
4085 #, no-wrap
4086 msgid "B<EDQUOT>"
4087 msgstr "B<EDQUOT>"
4088
4089 #. type: Plain text
4090 #: build/C/man2/link.2:207 build/C/man2/rename.2:248
4091 msgid "The user's quota of disk blocks on the filesystem has been exhausted."
4092 msgstr "ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。"
4093
4094 #. type: TP
4095 #: build/C/man2/link.2:207 build/C/man2/open.2:804 build/C/man2/rename.2:368
4096 #: build/C/man2/symlink.2:160 build/C/man3/tmpfile.3:60
4097 #, no-wrap
4098 msgid "B<EEXIST>"
4099 msgstr "B<EEXIST>"
4100
4101 #. type: Plain text
4102 #: build/C/man2/link.2:211
4103 msgid "I<newpath> already exists."
4104 msgstr "I<newpath> が既に存在する。"
4105
4106 #. type: TP
4107 #: build/C/man2/link.2:211 build/C/man2/llseek.2:74 build/C/man2/open.2:810
4108 #: build/C/man2/open_by_handle_at.2:266 build/C/man2/open_by_handle_at.2:321
4109 #: build/C/man2/pipe.2:139 build/C/man2/read.2:118 build/C/man2/readlink.2:165
4110 #: build/C/man2/rename.2:248 build/C/man2/rmdir.2:64
4111 #: build/C/man2/symlink.2:164 build/C/man2/unlink.2:178
4112 #: build/C/man2/write.2:141
4113 #, no-wrap
4114 msgid "B<EFAULT>"
4115 msgstr "B<EFAULT>"
4116
4117 #. type: Plain text
4118 #: build/C/man2/link.2:214 build/C/man2/rename.2:251
4119 msgid "I<oldpath> or I<newpath> points outside your accessible address space."
4120 msgstr "I<oldpath> や I<newpath> がアクセス可能なアドレス空間の外を指している。"
4121
4122 #. type: TP
4123 #: build/C/man2/link.2:214 build/C/man2/read.2:147 build/C/man2/readlink.2:181
4124 #: build/C/man2/symlink.2:167 build/C/man2/unlink.2:182
4125 #: build/C/man2/write.2:165
4126 #, no-wrap
4127 msgid "B<EIO>"
4128 msgstr "B<EIO>"
4129
4130 #. type: Plain text
4131 #: build/C/man2/link.2:217 build/C/man2/symlink.2:170
4132 #: build/C/man2/unlink.2:185
4133 msgid "An I/O error occurred."
4134 msgstr "I/O エラーが発生した。"
4135
4136 #. type: TP
4137 #: build/C/man2/link.2:217 build/C/man2/open.2:871 build/C/man2/open.2:875
4138 #: build/C/man2/open_by_handle_at.2:331 build/C/man2/readlink.2:184
4139 #: build/C/man2/rename.2:261 build/C/man2/rmdir.2:73
4140 #: build/C/man2/symlink.2:170 build/C/man2/unlink.2:190
4141 #, no-wrap
4142 msgid "B<ELOOP>"
4143 msgstr "B<ELOOP>"
4144
4145 #. type: Plain text
4146 #: build/C/man2/link.2:221 build/C/man2/rename.2:265
4147 msgid "Too many symbolic links were encountered in resolving I<oldpath> or I<newpath>."
4148 msgstr "I<oldpath> または I<newpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
4149
4150 #. type: TP
4151 #: build/C/man2/link.2:221 build/C/man2/rename.2:265
4152 #, no-wrap
4153 msgid "B<EMLINK>"
4154 msgstr "B<EMLINK>"
4155
4156 #. type: Plain text
4157 #: build/C/man2/link.2:226
4158 msgid "The file referred to by I<oldpath> already has the maximum number of links to it."
4159 msgstr "I<oldpath> によって参照されるファイルは 既に最大数までのリンクを持っている。"
4160
4161 #. type: TP
4162 #: build/C/man2/link.2:226 build/C/man2/open.2:891 build/C/man2/readlink.2:187
4163 #: build/C/man2/rename.2:272 build/C/man2/rmdir.2:77
4164 #: build/C/man2/symlink.2:174 build/C/man2/unlink.2:194
4165 #, no-wrap
4166 msgid "B<ENAMETOOLONG>"
4167 msgstr "B<ENAMETOOLONG>"
4168
4169 #. type: Plain text
4170 #: build/C/man2/link.2:229 build/C/man2/rename.2:275
4171 msgid "I<oldpath> or I<newpath> was too long."
4172 msgstr "I<oldpath> または I<newpath> が長過ぎる。"
4173
4174 #. type: TP
4175 #: build/C/man2/link.2:229 build/C/man2/link.2:286 build/C/man2/link.2:294
4176 #: build/C/man2/link.2:304 build/C/man2/open.2:905 build/C/man2/open.2:912
4177 #: build/C/man2/open_by_handle_at.2:282 build/C/man2/readlink.2:190
4178 #: build/C/man2/rename.2:275 build/C/man2/rename.2:389 build/C/man2/rmdir.2:80
4179 #: build/C/man2/symlink.2:177 build/C/man2/symlink.2:212
4180 #: build/C/man2/unlink.2:197
4181 #, no-wrap
4182 msgid "B<ENOENT>"
4183 msgstr "B<ENOENT>"
4184
4185 #. type: Plain text
4186 #: build/C/man2/link.2:234
4187 msgid "A directory component in I<oldpath> or I<newpath> does not exist or is a dangling symbolic link."
4188 msgstr "I<oldpath> または I<newpath> のディレクトリ部分が存在しないか、 壊れた(dangling)シンボリックリンクである。"
4189
4190 #. type: TP
4191 #: build/C/man2/link.2:234 build/C/man2/open.2:926 build/C/man2/readlink.2:193
4192 #: build/C/man2/rename.2:288 build/C/man2/rmdir.2:85 build/C/man3/scanf.3:570
4193 #: build/C/man2/symlink.2:184 build/C/man3/tempnam.3:102
4194 #: build/C/man2/unlink.2:204
4195 #, no-wrap
4196 msgid "B<ENOMEM>"
4197 msgstr "B<ENOMEM>"
4198
4199 #. type: Plain text
4200 #: build/C/man2/link.2:237 build/C/man2/open.2:929 build/C/man2/readlink.2:196
4201 #: build/C/man2/rename.2:291 build/C/man2/rmdir.2:88
4202 #: build/C/man2/symlink.2:187 build/C/man2/unlink.2:207
4203 msgid "Insufficient kernel memory was available."
4204 msgstr "十分なカーネルメモリーがない。"
4205
4206 #. type: TP
4207 #: build/C/man2/link.2:237 build/C/man2/open.2:929 build/C/man2/rename.2:291
4208 #: build/C/man2/symlink.2:187 build/C/man3/tmpfile.3:72
4209 #: build/C/man2/write.2:168
4210 #, no-wrap
4211 msgid "B<ENOSPC>"
4212 msgstr "B<ENOSPC>"
4213
4214 #. type: Plain text
4215 #: build/C/man2/link.2:241 build/C/man2/rename.2:295
4216 #: build/C/man2/symlink.2:191
4217 msgid "The device containing the file has no room for the new directory entry."
4218 msgstr "そのファイルを含んでいるデバイスに新しいディレクトリエントリを 作成するための空きがない。"
4219
4220 #. type: TP
4221 #: build/C/man2/link.2:241 build/C/man2/link.2:315 build/C/man2/open.2:935
4222 #: build/C/man2/open.2:1010 build/C/man2/open_by_handle_at.2:289
4223 #: build/C/man2/readlink.2:196 build/C/man2/readlink.2:206
4224 #: build/C/man2/rename.2:295 build/C/man2/rename.2:355 build/C/man2/rmdir.2:88
4225 #: build/C/man2/symlink.2:191 build/C/man2/symlink.2:218
4226 #: build/C/man2/unlink.2:207 build/C/man2/unlink.2:263
4227 #, no-wrap
4228 msgid "B<ENOTDIR>"
4229 msgstr "B<ENOTDIR>"
4230
4231 #. type: Plain text
4232 #: build/C/man2/link.2:246
4233 msgid "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, a directory."
4234 msgstr "I<oldpath> または I<newpath> のディレクトリ部分が、実際には、ディレクトリでない。"
4235
4236 #. type: TP
4237 #: build/C/man2/link.2:246 build/C/man2/link.2:250 build/C/man2/link.2:325
4238 #: build/C/man2/open.2:974 build/C/man2/open.2:982
4239 #: build/C/man2/open_by_handle_at.2:338 build/C/man2/rmdir.2:107
4240 #: build/C/man2/rmdir.2:118 build/C/man2/symlink.2:196
4241 #: build/C/man2/unlink.2:212 build/C/man2/write.2:173
4242 #, no-wrap
4243 msgid "B<EPERM>"
4244 msgstr "B<EPERM>"
4245
4246 #. type: Plain text
4247 #: build/C/man2/link.2:250
4248 msgid "I<oldpath> is a directory."
4249 msgstr "I<oldpath> がディレクトリである。"
4250
4251 #. type: Plain text
4252 #: build/C/man2/link.2:255
4253 msgid "The filesystem containing I<oldpath> and I<newpath> does not support the creation of hard links."
4254 msgstr "I<oldpath> と I<newpath> を含んでいるファイルシステムがハードリンクをサポートしていない。"
4255
4256 #. type: TP
4257 #: build/C/man2/link.2:255
4258 #, no-wrap
4259 msgid "B<EPERM> (since Linux 3.6)"
4260 msgstr "B<EPERM> (Linux 3.6 以降)"
4261
4262 #. type: Plain text
4263 #: build/C/man2/link.2:262
4264 msgid "The caller does not have permission to create a hard link to this file (see the description of I</proc/sys/fs/protected_hardlinks> in B<proc>(5))."
4265 msgstr "呼び出し元にこのファイルへのハードリンクを作成する許可がなかった (B<proc>(5) の I</proc/sys/fs/protected_hardlinks> の説明を参照)。"
4266
4267 #. type: TP
4268 #: build/C/man2/link.2:262 build/C/man2/open.2:986 build/C/man2/rename.2:333
4269 #: build/C/man2/rmdir.2:123 build/C/man2/symlink.2:201
4270 #: build/C/man3/tmpfile.3:75 build/C/man2/unlink.2:235
4271 #, no-wrap
4272 msgid "B<EROFS>"
4273 msgstr "B<EROFS>"
4274
4275 #. type: Plain text
4276 #: build/C/man2/link.2:265 build/C/man2/rename.2:336
4277 msgid "The file is on a read-only filesystem."
4278 msgstr "ファイルが読み込み専用のファイルシステムに存在する。"
4279
4280 #. type: TP
4281 #: build/C/man2/link.2:265 build/C/man2/rename.2:336
4282 #, no-wrap
4283 msgid "B<EXDEV>"
4284 msgstr "B<EXDEV>"
4285
4286 #. type: Plain text
4287 #: build/C/man2/link.2:273
4288 msgid "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux permits a filesystem to be mounted at multiple points, but B<link>()  does not work across different mount points, even if the same filesystem is mounted on both.)"
4289 msgstr "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 (Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可している。 しかし B<link>()  は、たとえ同じファイルシステムであっても、 別々のマウント位置を跨いでは動作しない。)"
4290
4291 #. type: Plain text
4292 #: build/C/man2/link.2:276
4293 msgid "The following additional errors can occur for B<linkat>():"
4294 msgstr "B<linkat>() では以下のエラーも発生する。"
4295
4296 #. type: Plain text
4297 #: build/C/man2/link.2:282 build/C/man2/rename.2:355
4298 msgid "I<olddirfd> or I<newdirfd> is not a valid file descriptor."
4299 msgstr "I<olddirfd> か I<newdirfd> が有効なファイルディスクリプタでない。"
4300
4301 #. type: Plain text
4302 #: build/C/man2/link.2:286 build/C/man2/unlink.2:256
4303 msgid "An invalid flag value was specified in I<flags>."
4304 msgstr "無効なフラグ値が I<flags> に指定された。"
4305
4306 #. type: Plain text
4307 #: build/C/man2/link.2:294
4308 msgid "B<AT_EMPTY_PATH> was specified in I<flags>, but the caller did not have the B<CAP_DAC_READ_SEARCH> capability."
4309 msgstr "B<AT_EMPTY_PATH> が I<flags> に指定されたが、呼び出し元が B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていなかった。"
4310
4311 #. type: Plain text
4312 #: build/C/man2/link.2:299
4313 msgid "An attempt was made to link to the I</proc/self/fd/NN> file corresponding to a file descriptor created with"
4314 msgstr "以下の呼び出しで作成されたファイルディスクリプターに対応する I</proc/self/fd/NN> ファイルに対してリンクを行おおうとした。"
4315
4316 #. type: Plain text
4317 #: build/C/man2/link.2:301
4318 #, no-wrap
4319 msgid "    open(path, O_TMPFILE | O_EXCL, mode);\n"
4320 msgstr "    open(path, O_TMPFILE | O_EXCL, mode);\n"
4321
4322 #. type: Plain text
4323 #: build/C/man2/link.2:304
4324 msgid "See B<open>(2)."
4325 msgstr "B<open>(2) 参照。"
4326
4327 #. type: Plain text
4328 #: build/C/man2/link.2:315
4329 msgid "I<oldpath> is a relative pathname and I<olddirfd> refers to a directory that has been deleted, or I<newpath> is a relative pathname and I<newdirfd> refers to a directory that has been deleted."
4330 msgstr "I<oldpath> が相対パス名で、 I<olddirfd> が削除されたディレクトリを参照している。 または、 I<newpath> が相対パス名で、 I<newdirfd> が削除されたディレクトリを参照している。"
4331
4332 #. type: Plain text
4333 #: build/C/man2/link.2:325 build/C/man2/rename.2:365
4334 msgid "I<oldpath> is relative and I<olddirfd> is a file descriptor referring to a file other than a directory; or similar for I<newpath> and I<newdirfd>"
4335 msgstr "I<oldpath> が相対パスで、 I<olddirfd> がディレクトリ以外のファイルを参照している。または I<newpath> と I<newdirfd> に関して同じ状況である。"
4336
4337 #. type: Plain text
4338 #: build/C/man2/link.2:334
4339 msgid "B<AT_EMPTY_PATH> was specified in I<flags>, I<oldpath> is an empty string, and I<olddirfd> refers to a directory."
4340 msgstr "I<flags> に B<AT_EMPTY_PATH> が指定され、 I<oldpath> が空文字列で、 I<olddirfd> がディレクトリを参照している。"
4341
4342 #. type: Plain text
4343 #: build/C/man2/link.2:338
4344 msgid "B<linkat>()  was added to Linux in kernel 2.6.16; library support was added to glibc in version 2.4."
4345 msgstr "B<linkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポートはバージョン 2.4 で glibc に追加された。"
4346
4347 #.  SVr4 documents additional ENOLINK and
4348 #.  EMULTIHOP error conditions; POSIX.1 does not document ELOOP.
4349 #.  X/OPEN does not document EFAULT, ENOMEM or EIO.
4350 #. type: Plain text
4351 #: build/C/man2/link.2:344
4352 msgid "B<link>(): SVr4, 4.3BSD, POSIX.1-2001 (but see NOTES), POSIX.1-2008."
4353 msgstr "B<link>(): SVr4, 4.3BSD, POSIX.1-2001 (但し「注意」を参照), POSIX.1-2008."
4354
4355 #. type: Plain text
4356 #: build/C/man2/link.2:347
4357 msgid "B<linkat>(): POSIX.1-2008."
4358 msgstr "B<linkat>(): POSIX.1-2008."
4359
4360 #. type: Plain text
4361 #: build/C/man2/link.2:354
4362 msgid "Hard links, as created by B<link>(), cannot span filesystems.  Use B<symlink>(2)  if this is required."
4363 msgstr "B<link>()  でファイルシステムを超えてハードリンクを作成することはできない。 このような場合は B<symlink>(2)  を使用すること。"
4364
4365 #.  more precisely: since kernel 1.3.56
4366 #.  For example, the default Solaris compilation environment
4367 #.  behaves like Linux, and contributors to a March 2005
4368 #.  thread in the Austin mailing list reported that some
4369 #.  other (System V) implementations did/do the same -- MTK, Apr 05
4370 #. type: Plain text
4371 #: build/C/man2/link.2:385
4372 msgid "POSIX.1-2001 says that B<link>()  should dereference I<oldpath> if it is a symbolic link.  However, since kernel 2.0, Linux does not do so: if I<oldpath> is a symbolic link, then I<newpath> is created as a (hard) link to the same symbolic link file (i.e., I<newpath> becomes a symbolic link to the same file that I<oldpath> refers to).  Some other implementations behave in the same manner as Linux.  POSIX.1-2008 changes the specification of B<link>(), making it implementation-dependent whether or not I<oldpath> is dereferenced if it is a symbolic link.  For precise control over the treatment of symbolic links when creating a link, use B<linkat>(2)."
4373 msgstr "POSIX.1-2001 では、 I<oldpath> がシンボリックリンクである場合、 B<link>()  は I<oldpath> の参照を解決すべきであると記述されている。 しかし、カーネル 2.0 以降の Linux ではそのようになっていない。 I<oldpath> がシンボリックリンクである場合、 I<newpath> は同じシンボリックリンクファイルへの (ハード) リンクとして作成される (つまり I<newpath> は I<oldpath> が参照していた同じファイルへのシンボリックリンクになる)。 他のいくつかの実装でも Linux と同じように動作する。 POSIX.1-2008 では B<link>()  の仕様が変更され、 I<oldpath> がシンボリックリンクの場合にシンボリックリンクの参照を 解決するかどうかは実装依存となった。 リンク作成時のシンボリックリンクの扱いについての詳細な制御を行う場合には B<linkat>(2) を使用すること。"
4374
4375 #. type: Plain text
4376 #: build/C/man2/link.2:405
4377 msgid "On older kernels where B<linkat>()  is unavailable, the glibc wrapper function falls back to the use of B<link>(), unless the B<AT_SYMLINK_FOLLOW> is specified.  When I<oldpath> and I<newpath> are relative pathnames, glibc constructs pathnames based on the symbolic links in I</proc/self/fd> that correspond to the I<olddirfd> and I<newdirfd> arguments."
4378 msgstr "B<linkat>() が利用できない古いカーネルでは、 B<AT_SYMLINK_FOLLOW> が指定されていない場合、 glibc ラッパー関数は B<link>() を使用するモードにフォールバックする。 I<oldpath> と I<newpath> が相対パスの場合、 glibc は I<olddirfd> と I<newdirfd> 引き数に対応する I</proc/self/fd> のシンボリックリンクに基づいてそれぞれパス名を構成する。"
4379
4380 #. type: Plain text
4381 #: build/C/man2/link.2:411
4382 msgid "On NFS filesystems, the return code may be wrong in case the NFS server performs the link creation and dies before it can say so.  Use B<stat>(2)  to find out if the link got created."
4383 msgstr "NFS ファイルシステムでは、NFS サーバーがリンクを作成した後に、 それを伝える前に死んだ場合には返り値が不正な場合がある。 リンクが作成できたかどうか見つけるためには B<stat>(2)  を使用すること。"
4384
4385 #. type: Plain text
4386 #: build/C/man2/link.2:420
4387 msgid "B<ln>(1), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
4388 msgstr "B<ln>(1), B<open>(2), B<rename>(2), B<stat>(2), B<symlink>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
4389
4390 #. type: TH
4391 #: build/C/man2/llseek.2:28
4392 #, no-wrap
4393 msgid "LLSEEK"
4394 msgstr "LLSEEK"
4395
4396 #. type: TH
4397 #: build/C/man2/llseek.2:28
4398 #, no-wrap
4399 msgid "2012-07-13"
4400 msgstr "2012-07-13"
4401
4402 #. type: Plain text
4403 #: build/C/man2/llseek.2:31
4404 msgid "_llseek - reposition read/write file offset"
4405 msgstr "_llseek - ファイルの読み書きオフセットの位置を変える"
4406
4407 #. type: Plain text
4408 #: build/C/man2/llseek.2:35
4409 #, no-wrap
4410 msgid ""
4411 "B<#include E<lt>sys/types.hE<gt>>\n"
4412 "B<#include E<lt>unistd.hE<gt>>\n"
4413 msgstr ""
4414 "B<#include E<lt>sys/types.hE<gt>>\n"
4415 "B<#include E<lt>unistd.hE<gt>>\n"
4416
4417 #. type: Plain text
4418 #: build/C/man2/llseek.2:39
4419 #, no-wrap
4420 msgid ""
4421 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
4422 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
4423 "B<            unsigned int >I<whence>B<);>\n"
4424 msgstr ""
4425 "B<int _llseek(unsigned int >I<fd>B<, unsigned long >I<offset_high>B<,>\n"
4426 "B<            unsigned long >I<offset_low>B<, loff_t *>I<result>B<,>\n"
4427 "B<            unsigned int >I<whence>B<);>\n"
4428
4429 #. type: Plain text
4430 #: build/C/man2/llseek.2:43
4431 msgid "I<Note>: There is no glibc wrapper for this system call; see NOTES."
4432 msgstr "I<注>: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。"
4433
4434 #. type: Plain text
4435 #: build/C/man2/llseek.2:62
4436 msgid "The B<_llseek>()  function repositions the offset of the open file associated with the file descriptor I<fd> to I<(offset_highE<lt>E<lt>32) | offset_low> bytes relative to the beginning of the file, the current position in the file, or the end of the file, depending on whether I<whence> is B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively.  It returns the resulting file position in the argument I<result>."
4437 msgstr "B<_llseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に関連づけられたオープンされたファイルのオフセットの位置を、相対的に I<(offset_highE<lt>E<lt>32) | offset_low> バイトだけ変更する。 基準となる位置を表す I<whence> には B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> のいずれかを指定し、それぞれ ファイルの先頭、ファイルの現在位置、 ファイルの最後を表す。 結果のファイル位置を I<result> 引き数に返す。"
4438
4439 #. type: Plain text
4440 #: build/C/man2/llseek.2:69
4441 msgid "Upon successful completion, B<_llseek>()  returns 0.  Otherwise, a value of -1 is returned and I<errno> is set to indicate the error."
4442 msgstr "成功した場合は、 B<_llseek>()  は 0 を返す。 そうでなれば -1 という値が返り、エラーを示す I<errno> が設定される。"
4443
4444 #. type: Plain text
4445 #: build/C/man2/llseek.2:74 build/C/man2/lseek.2:192
4446 msgid "I<fd> is not an open file descriptor."
4447 msgstr "I<fd> がオープンされたファイルディスクリプタでない。"
4448
4449 #. type: Plain text
4450 #: build/C/man2/llseek.2:77
4451 msgid "Problem with copying results to user space."
4452 msgstr "結果をユーザ空間にコピーするときに問題があった。"
4453
4454 #. type: Plain text
4455 #: build/C/man2/llseek.2:81
4456 msgid "I<whence> is invalid."
4457 msgstr "I<whence> が不正である。"
4458
4459 #. type: Plain text
4460 #: build/C/man2/llseek.2:84
4461 msgid "This function is Linux-specific, and should not be used in programs intended to be portable."
4462 msgstr "この関数は Linux 特有であり、移植性の必要なプログラムでは使用してはいけない。"
4463
4464 #. type: Plain text
4465 #: build/C/man2/llseek.2:87
4466 msgid "Glibc does not provide a wrapper for this system call; call it using B<syscall>(2)."
4467 msgstr "glibc はこのシステムコールに対するラッパー関数を提供していない。 B<syscall>(2)  を使って呼び出すこと。"
4468
4469 #. type: Plain text
4470 #: build/C/man2/llseek.2:90
4471 msgid "B<lseek>(2), B<lseek64>(3)"
4472 msgstr "B<lseek>(2), B<lseek64>(3)"
4473
4474 #. type: TH
4475 #: build/C/man2/lseek.2:47
4476 #, no-wrap
4477 msgid "LSEEK"
4478 msgstr "LSEEK"
4479
4480 #. type: TH
4481 #: build/C/man2/lseek.2:47 build/C/man2/open_by_handle_at.2:25
4482 #, no-wrap
4483 msgid "2014-06-13"
4484 msgstr "2014-06-13"
4485
4486 #. type: Plain text
4487 #: build/C/man2/lseek.2:50
4488 msgid "lseek - reposition read/write file offset"
4489 msgstr "lseek - ファイルの読み書きオフセットの位置を変える"
4490
4491 #. type: Plain text
4492 #: build/C/man2/lseek.2:52 build/C/man3/lseek64.3:32
4493 msgid "B<#include E<lt>sys/types.hE<gt>>"
4494 msgstr "B<#include E<lt>sys/types.hE<gt>>"
4495
4496 #. type: Plain text
4497 #: build/C/man2/lseek.2:54 build/C/man3/lseek64.3:34 build/C/man2/rmdir.2:35
4498 #: build/C/man2/write.2:44
4499 msgid "B<#include E<lt>unistd.hE<gt>>"
4500 msgstr "B<#include E<lt>unistd.hE<gt>>"
4501
4502 #. type: Plain text
4503 #: build/C/man2/lseek.2:56
4504 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
4505 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>"
4506
4507 #. type: Plain text
4508 #: build/C/man2/lseek.2:67
4509 msgid "The B<lseek>()  function repositions the offset of the open file associated with the file descriptor I<fd> to the argument I<offset> according to the directive I<whence> as follows:"
4510 msgstr "B<lseek>()  関数は、ファイルディスクリプタ (descriptor)  I<fd> に対応するオープンされたファイルのオフセットを、 I<whence> に基づき I<offset> 引き数の位置へ以下のように変更する:"
4511
4512 #. type: Plain text
4513 #: build/C/man2/lseek.2:72
4514 msgid "The offset is set to I<offset> bytes."
4515 msgstr "オフセットは I<offset> バイトに設定される。"
4516
4517 #. type: Plain text
4518 #: build/C/man2/lseek.2:77
4519 msgid "The offset is set to its current location plus I<offset> bytes."
4520 msgstr "オフセットは現在位置に I<offset> バイトを足した位置になる。"
4521
4522 #. type: Plain text
4523 #: build/C/man2/lseek.2:82
4524 msgid "The offset is set to the size of the file plus I<offset> bytes."
4525 msgstr "オフセットはファイルのサイズに I<offset> バイトを足した位置になる。"
4526
4527 #. type: Plain text
4528 #: build/C/man2/lseek.2:90
4529 msgid "The B<lseek>()  function allows the file offset to be set beyond the end of the file (but this does not change the size of the file).  If data is later written at this point, subsequent reads of the data in the gap (a \"hole\") return null bytes (\\(aq\\e0\\(aq) until data is actually written into the gap."
4530 msgstr "B<lseek>()  関数は、オフセットをファイルの末尾を越えた位置に設定できる (但し、これによりファイルのサイズが変わらない)。 もしデータがこのオフセット位置以降に書き込まれた場合、 間の空隙の部分 (\"穴 (hole)\") の読み出しがあると、 実際にそこにデータを書き込まれるまではヌルバイト (\\(aq\\e0\\(aq) の列が返される。"
4531
4532 #. type: SS
4533 #: build/C/man2/lseek.2:90
4534 #, no-wrap
4535 msgid "Seeking file data and holes"
4536 msgstr "ファイルのデータとホールの探索"
4537
4538 #. type: Plain text
4539 #: build/C/man2/lseek.2:93
4540 msgid "Since version 3.1, Linux supports the following additional values for I<whence>:"
4541 msgstr "Linux バージョン 3.1 以降では、 I<whence> に以下の値も指定することができる。"
4542
4543 #. type: TP
4544 #: build/C/man2/lseek.2:93
4545 #, no-wrap
4546 msgid "B<SEEK_DATA>"
4547 msgstr "B<SEEK_DATA>"
4548
4549 #. type: Plain text
4550 #: build/C/man2/lseek.2:104
4551 msgid "Adjust the file offset to the next location in the file greater than or equal to I<offset> containing data.  If I<offset> points to data, then the file offset is set to I<offset>."
4552 msgstr "ファイルオフセットを I<offset> 以上で次にデータがある位置に設定する。 I<offset> がデータを指している場合には、 ファイルオフセットは I<offset> に設定される。"
4553
4554 #. type: TP
4555 #: build/C/man2/lseek.2:104
4556 #, no-wrap
4557 msgid "B<SEEK_HOLE>"
4558 msgstr "B<SEEK_HOLE>"
4559
4560 #. type: Plain text
4561 #: build/C/man2/lseek.2:118
4562 msgid "Adjust the file offset to the next hole in the file greater than or equal to I<offset>.  If I<offset> points into the middle of a hole, then the file offset is set to I<offset>.  If there is no hole past I<offset>, then the file offset is adjusted to the end of the file (i.e., there is an implicit hole at the end of any file)."
4563 msgstr "ファイルオフセットを、 位置が I<offset> 以上の次のホール (hole) に設定する。 I<offset> がホールの内部にある場合は、ファイルシステムは I<offset> に設定される。 I<offset> 以降にホールがない場合は、 ファイルオフセットはファイル末尾に設定される (つまり、 どのファイルの末尾にも暗黙のホールが存在するということだ)。"
4564
4565 #. type: Plain text
4566 #: build/C/man2/lseek.2:124
4567 msgid "In both of the above cases, B<lseek>()  fails if I<offset> points past the end of the file."
4568 msgstr "上記のどちらの場合も、 I<offset> がファイル末尾よりも先を指している場合には B<lseek>() は失敗する。"
4569
4570 #. type: Plain text
4571 #: build/C/man2/lseek.2:130
4572 msgid "These operations allow applications to map holes in a sparsely allocated file.  This can be useful for applications such as file backup tools, which can save space when creating backups and preserve holes, if they have a mechanism for discovering holes."
4573 msgstr "これらの操作を使うことで、 アプリケーションが、 まばら (sparse ) にページが割り当てられたファイルでホールをマップすることができる。 この機能はファイルバックアップツールなどのアプリケーションで有用である。 ホールを見つける仕組みがあれば、 ファイルバックアップツールで、 バックアップを作成する際に保存領域を節約し、ホールを保持することができる。"
4574
4575 #.  https://lkml.org/lkml/2011/4/22/79
4576 #.  http://lwn.net/Articles/440255/
4577 #.  http://blogs.oracle.com/bonwick/entry/seek_hole_and_seek_data
4578 #. type: Plain text
4579 #: build/C/man2/lseek.2:153
4580 msgid "For the purposes of these operations, a hole is a sequence of zeros that (normally) has not been allocated in the underlying file storage.  However, a filesystem is not obliged to report holes, so these operations are not a guaranteed mechanism for mapping the storage space actually allocated to a file.  (Furthermore, a sequence of zeros that actually has been written to the underlying storage may not be reported as a hole.)  In the simplest implementation, a filesystem can support the operations by making B<SEEK_HOLE> always return the offset of the end of the file, and making B<SEEK_DATA> always return I<offset> (i.e., even if the location referred to by I<offset> is a hole, it can be considered to consist of data that is a sequence of zeros)."
4581 msgstr "これらの操作の目的としては、 ホールは (通常は) バックエンドのファイルストレージには割り当てられていない連続する 0 の列である。 しかし、ファイルシステムにはホールを報告する義務はなく、 そのため、 これらの操作は、 ファイルに実際に割り当てられたストレージ領域をマッピングする方法としては確実性のある仕組みではない。 (また、バックエンドのストレージに実際に書き込まれた連続する 0 の列はホールとして報告されないこともある。) 最も単純な実装としては、 B<SEEK_HOLE> は常にファイル末尾のオフセットを返すようにし、 B<SEEK_DATA> は常に I<offset> を返すようにすることで、 ファイルシステムはこれらの操作をサポートすることができる (B<SEEK_DATA> は常に I<offset> を返すというのは、 I<offset> が参照する場所がホールであったとしても、 連続する 0 の列のデータで構成されているとみなすということである)。"
4582
4583 #. type: Plain text
4584 #: build/C/man2/lseek.2:162
4585 msgid "The B<_GNU_SOURCE> feature test macro must be defined in order to obtain the definitions of B<SEEK_DATA> and B<SEEK_HOLE> from I<E<lt>unistd.hE<gt>>."
4586 msgstr "I<E<lt>unistd.hE<gt>> から B<SEEK_DATA> と B<SEEK_HOLE> の定義を得るには、 機能検査マクロ B<_GNU_SOURCE> を定義しなければならない。"
4587
4588 #. type: Plain text
4589 #: build/C/man2/lseek.2:168
4590 msgid "The B<SEEK_HOLE> and B<SEEK_DATA> operations are supported for the following filesystems:"
4591 msgstr "B<SEEK_HOLE>, B<SEEK_DATA> 操作に対応しているのは以下のファイルシステムである。"
4592
4593 #. type: Plain text
4594 #: build/C/man2/lseek.2:170
4595 msgid "Btrfs (since Linux 3.1)"
4596 msgstr "Btrfs (Linux 3.1 以降)"
4597
4598 #.  commit 93862d5e1ab875664c6cc95254fc365028a48bb1
4599 #. type: Plain text
4600 #: build/C/man2/lseek.2:173
4601 msgid "OCFS (since Linux 3.2)"
4602 msgstr "OCFS (Linux 3.2 以降)"
4603
4604 #. type: Plain text
4605 #: build/C/man2/lseek.2:175
4606 msgid "XFS (since Linux 3.5)"
4607 msgstr "XFS (Linux 3.5 以降)"
4608
4609 #. type: Plain text
4610 #: build/C/man2/lseek.2:177
4611 msgid "ext4 (since Linux 3.8)"
4612 msgstr "ext4 (Linux 3.8 以降)"
4613
4614 #. type: Plain text
4615 #: build/C/man2/lseek.2:179
4616 msgid "tmpfs (since Linux 3.8)"
4617 msgstr "tmpfs (Linux 3.8 以降)"
4618
4619 #. type: Plain text
4620 #: build/C/man2/lseek.2:187
4621 msgid "Upon successful completion, B<lseek>()  returns the resulting offset location as measured in bytes from the beginning of the file.  On error, the value I<(off_t)\\ -1> is returned and I<errno> is set to indicate the error."
4622 msgstr "成功した場合、 B<lseek>()  は結果のファイル位置をファイルの先頭からのバイト数で返す。 エラーの場合、値 I<(off_t)\\ -1> が返され、 I<errno> にエラーが指示される。"
4623
4624 #.  Some systems may allow negative offsets for character devices
4625 #.  and/or for remote filesystems.
4626 #. type: Plain text
4627 #: build/C/man2/lseek.2:200
4628 msgid "I<whence> is not valid.  Or: the resulting file offset would be negative, or beyond the end of a seekable device."
4629 msgstr ""
4630 "I<whence> が有効な値ではない。または、seek の結果、ファイルオフセットが負に\n"
4631 "なってしまうか、 seek 可能なデバイスの末尾を越えてしまう。"
4632
4633 #. type: TP
4634 #: build/C/man2/lseek.2:200 build/C/man2/open.2:954
4635 #: build/C/man2/open_by_handle_at.2:304
4636 #, no-wrap
4637 msgid "B<EOVERFLOW>"
4638 msgstr "B<EOVERFLOW>"
4639
4640 #.  HP-UX 11 says EINVAL for this case (but POSIX.1 says EOVERFLOW)
4641 #. type: Plain text
4642 #: build/C/man2/lseek.2:205
4643 msgid "The resulting file offset cannot be represented in an I<off_t>."
4644 msgstr "結果のファイルオフセットを I<off_t> 型で表現することができない。"
4645
4646 #. type: TP
4647 #: build/C/man2/lseek.2:205
4648 #, no-wrap
4649 msgid "B<ESPIPE>"
4650 msgstr "B<ESPIPE>"
4651
4652 #. type: Plain text
4653 #: build/C/man2/lseek.2:209
4654 msgid "I<fd> is associated with a pipe, socket, or FIFO."
4655 msgstr "I<fd> がパイプ、ソケット、FIFO を参照している。"
4656
4657 #. type: TP
4658 #: build/C/man2/lseek.2:209 build/C/man2/open.2:942
4659 #, no-wrap
4660 msgid "B<ENXIO>"
4661 msgstr "B<ENXIO>"
4662
4663 #. type: Plain text
4664 #: build/C/man2/lseek.2:217
4665 msgid "I<whence> is B<SEEK_DATA> or B<SEEK_HOLE>, and the current file offset is beyond the end of the file."
4666 msgstr ""
4667 "I<whence> が B<SEEK_DATA> か B<SEEK_HOLE> で、\n"
4668 "現在のファイルオフセットがファイルの末尾を超えた位置である。"
4669
4670 #.  SVr4 documents additional error
4671 #.  conditions EDEADLK, ENOLCK, ENOLNK, ENOSR, ENXIO, or ERANGE.
4672 #. type: Plain text
4673 #: build/C/man2/lseek.2:219 build/C/man2/read.2:175 build/C/man2/rmdir.2:129
4674 #: build/C/man2/write.2:193
4675 msgid "SVr4, 4.3BSD, POSIX.1-2001."
4676 msgstr "SVr4, 4.3BSD, POSIX.1-2001."
4677
4678 #.  FIXME . Review http://austingroupbugs.net/view.php?id=415 in the future
4679 #. type: Plain text
4680 #: build/C/man2/lseek.2:227
4681 msgid "B<SEEK_DATA> and B<SEEK_HOLE> are nonstandard extensions also present in Solaris, FreeBSD, and DragonFly BSD; they are proposed for inclusion in the next POSIX revision (Issue 8)."
4682 msgstr "B<SEEK_DATA> と B<SEEK_HOLE> は非標準の拡張で、 Solaris, FreeBSD, DragonFly BSD にも存在する。 これらは POSIX の次の版 (Issue 8) に入れるよう提案されている。"
4683
4684 #. type: Plain text
4685 #: build/C/man2/lseek.2:232
4686 msgid "See B<open>(2)  for a discussion of the relationship between file descriptors, open file descriptions, and files."
4687 msgstr "ファイルディスクリプタ、オープンファイル記述、ファイルの関係の説明については B<open>(2) を参照。"
4688
4689 #. type: Plain text
4690 #: build/C/man2/lseek.2:236
4691 msgid "Some devices are incapable of seeking and POSIX does not specify which devices must support B<lseek>()."
4692 msgstr "いくつかのデバイスでは seek ができない。 POSIX はどのデバイスが B<lseek>()  に対応すべきかは規定していない。"
4693
4694 #.  Other systems return the number of written characters,
4695 #.  using SEEK_SET to set the counter. (Of written characters.)
4696 #. type: Plain text
4697 #: build/C/man2/lseek.2:243
4698 msgid "On Linux, using B<lseek>()  on a terminal device returns B<ESPIPE>."
4699 msgstr "Linux では、端末 (terminal) デバイスに B<lseek>() を使用すると B<ESPIPE> が返る。"
4700
4701 #. type: Plain text
4702 #: build/C/man2/lseek.2:246
4703 msgid "When converting old code, substitute values for I<whence> with the following macros:"
4704 msgstr "古いコードを変換する時は I<whence> の値を以下のマクロに置き換えること:"
4705
4706 #. type: tbl table
4707 #: build/C/man2/lseek.2:249
4708 #, no-wrap
4709 msgid "old\tnew\n"
4710 msgstr "old \tnew\n"
4711
4712 #. type: tbl table
4713 #: build/C/man2/lseek.2:250
4714 #, no-wrap
4715 msgid "0\tSEEK_SET\n"
4716 msgstr "0\tSEEK_SET\n"
4717
4718 #. type: tbl table
4719 #: build/C/man2/lseek.2:251
4720 #, no-wrap
4721 msgid "1\tSEEK_CUR\n"
4722 msgstr "1\tSEEK_CUR\n"
4723
4724 #. type: tbl table
4725 #: build/C/man2/lseek.2:252
4726 #, no-wrap
4727 msgid "2\tSEEK_END\n"
4728 msgstr "2\tSEEK_END\n"
4729
4730 #. type: tbl table
4731 #: build/C/man2/lseek.2:253
4732 #, no-wrap
4733 msgid "L_SET\tSEEK_SET\n"
4734 msgstr "L_SET\tSEEK_SET\n"
4735
4736 #. type: tbl table
4737 #: build/C/man2/lseek.2:254
4738 #, no-wrap
4739 msgid "L_INCR\tSEEK_CUR\n"
4740 msgstr "L_INCR\tSEEK_CUR\n"
4741
4742 #. type: tbl table
4743 #: build/C/man2/lseek.2:255
4744 #, no-wrap
4745 msgid "L_XTND\tSEEK_END\n"
4746 msgstr "L_XTND\tSEEK_END\n"
4747
4748 #. type: Plain text
4749 #: build/C/man2/lseek.2:267
4750 msgid "Note that file descriptors created by B<dup>(2)  or B<fork>(2)  share the current file position pointer, so seeking on such files may be subject to race conditions."
4751 msgstr "B<dup>(2)  や B<fork>(2)  で作成されたファイルディスクリプタは、現在のファイル位置ポインタ (current file position pointer) を共有しているので、 このようなファイルで移動を行うと競合状態を引き起こす可能性がある。"
4752
4753 #. type: Plain text
4754 #: build/C/man2/lseek.2:274
4755 msgid "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), B<posix_fallocate>(3)"
4756 msgstr "B<dup>(2), B<fork>(2), B<open>(2), B<fseek>(3), B<lseek64>(3), B<posix_fallocate>(3)"
4757
4758 #. type: TH
4759 #: build/C/man3/lseek64.3:25
4760 #, no-wrap
4761 msgid "LSEEK64"
4762 msgstr "LSEEK64"
4763
4764 #. type: Plain text
4765 #: build/C/man3/lseek64.3:28
4766 msgid "lseek64 - reposition 64-bit read/write file offset"
4767 msgstr "lseek64 - ファイルの 64 ビットの読み書きオフセットの位置を変える"
4768
4769 #. type: Plain text
4770 #: build/C/man3/lseek64.3:30
4771 msgid "B<#define _LARGEFILE64_SOURCE> /* See feature_test_macros(7) */"
4772 msgstr "B<#define _LARGEFILE64_SOURCE> /* feature_test_macros(7) 参照 */"
4773
4774 #. type: Plain text
4775 #: build/C/man3/lseek64.3:36
4776 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
4777 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>"
4778
4779 #. type: Plain text
4780 #: build/C/man3/lseek64.3:53
4781 msgid "The B<lseek>(2)  family of functions reposition the offset of the open file associated with the file descriptor I<fd> to I<offset> bytes relative to the start, current position, or end of the file, when I<whence> has the value B<SEEK_SET>, B<SEEK_CUR>, or B<SEEK_END>, respectively."
4782 msgstr "B<lseek>(2)  関数ファミリーは、ファイルディスクリプタ I<fd> に関連するオープンされたファイルのオフセットを、 ファイルの開始位置・現在位置・終端から I<offset> の位置へ変更する。 これは I<whence> がそれぞれ B<SEEK_SET>, B<SEEK_CUR>, B<SEEK_END> の場合に対応する。"
4783
4784 #. type: Plain text
4785 #: build/C/man3/lseek64.3:56
4786 msgid "For more details, return value, and errors, see B<lseek>(2)."
4787 msgstr "更に詳しい説明・返り値・エラーは、 B<lseek>(2)  を参照すること。"
4788
4789 #. type: Plain text
4790 #: build/C/man3/lseek64.3:63
4791 msgid "Four interfaces are available: B<lseek>(2), B<lseek64>(), B<llseek>(2), and the raw system call B<_llseek>(2)."
4792 msgstr "4 つのインタフェースが使用可能である: B<lseek>(2), B<lseek64>(), B<llseek>(2)  と元となるシステムコール B<_llseek>(2)  である。"
4793
4794 #. type: SS
4795 #: build/C/man3/lseek64.3:63
4796 #, no-wrap
4797 msgid "lseek"
4798 msgstr "lseek"
4799
4800 #. type: Plain text
4801 #: build/C/man3/lseek64.3:65 build/C/man3/lseek64.3:87
4802 #: build/C/man3/lseek64.3:116
4803 msgid "Prototype:"
4804 msgstr "プロトタイプ:"
4805
4806 #. type: Plain text
4807 #: build/C/man3/lseek64.3:69
4808 #, no-wrap
4809 msgid "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4810 msgstr "B<off_t lseek(int >I<fd>B<, off_t >I<offset>B<, int >I<whence>B<);>\n"
4811
4812 #. type: Plain text
4813 #: build/C/man3/lseek64.3:77
4814 msgid "B<lseek>(2)  uses the type I<off_t>.  This is a 32-bit signed type on 32-bit architectures, unless one compiles with"
4815 msgstr "B<lseek>(2)  は型 I<off_t> を使う。 これは 32 ビットアーキテクチャ上では 32 ビット符号付き型である。 ただし、"
4816
4817 #. type: Plain text
4818 #: build/C/man3/lseek64.3:81
4819 #, no-wrap
4820 msgid "#define _FILE_OFFSET_BITS 64\n"
4821 msgstr "#define _FILE_OFFSET_BITS 64\n"
4822
4823 #. type: Plain text
4824 #: build/C/man3/lseek64.3:85
4825 msgid "in which case it is a 64-bit signed type."
4826 msgstr "を定義してコンパイルした場合は 64 ビット符号付き型である。"
4827
4828 #. type: SS
4829 #: build/C/man3/lseek64.3:85
4830 #, no-wrap
4831 msgid "lseek64"
4832 msgstr "lseek64"
4833
4834 #. type: Plain text
4835 #: build/C/man3/lseek64.3:91
4836 #, no-wrap
4837 msgid "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
4838 msgstr "B<off64_t lseek64(int >I<fd>B<, off64_t >I<offset>B<, int >I<whence>B<);>\n"
4839
4840 #. type: Plain text
4841 #: build/C/man3/lseek64.3:102
4842 msgid "The library routine B<lseek64>()  uses a 64-bit type even when I<off_t> is a 32-bit type.  Its prototype (and the type I<off64_t>)  is available only when one compiles with"
4843 msgstr "ライブラリルーチン B<lseek64>()  は I<off_t> が 32 ビット型であっても 64 ビット型を使う。 このプロトタイプ (と型 I<off64_t>)  は、以下の定義をしてコンパイルした場合にのみ使用可能である。"
4844
4845 #. type: Plain text
4846 #: build/C/man3/lseek64.3:106
4847 #, no-wrap
4848 msgid "#define _LARGEFILE64_SOURCE\n"
4849 msgstr "#define _LARGEFILE64_SOURCE\n"
4850
4851 #.  in glibc 2.0.94, not in 2.0.6
4852 #. type: Plain text
4853 #: build/C/man3/lseek64.3:114
4854 msgid "The function B<lseek64>()  is available since glibc 2.1, and is defined to be an alias for B<llseek>()."
4855 msgstr "関数 B<lseek64>()  は glibc 2.1 以降で使用可能であり、 B<llseek>()  のエイリアスとして定義されている。"
4856
4857 #. type: SS
4858 #: build/C/man3/lseek64.3:114
4859 #, no-wrap
4860 msgid "llseek"
4861 msgstr "llseek"
4862
4863 #. type: Plain text
4864 #: build/C/man3/lseek64.3:120
4865 #, no-wrap
4866 msgid "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
4867 msgstr "B<loff_t llseek(int >I<fd>B<, loff_t >I<offset>B<, int >I<whence>B<);>\n"
4868
4869 #.  in libc 5.0.9, not in 4.7.6
4870 #. type: Plain text
4871 #: build/C/man3/lseek64.3:136
4872 msgid "The type I<loff_t> is a 64-bit signed type.  The library routine B<llseek>()  is available in the glibc and works without special defines.  However, the glibc headers do not provide a prototype.  Users should add the above prototype, or something equivalent, to their own source.  When users complained about data loss caused by a miscompilation of B<e2fsck>(8), glibc 2.1.3 added the link-time warning"
4873 msgstr "型 I<loff_t> は 64 ビット符号付き型である。 ライブラリルーチン B<llseek>() は glibc で利用可能であり、 特別な定義なしに動作する。 しかしながら、 glibc のヘッダーはプロトタイプを供していない。 ユーザは上記のプロトタイプまたはそれと同等のものを、 自身のソースに追加しなければならない。 このデータがないことによって B<e2fsck>(8)  のコンパイルが失敗するという苦情がユーザから出たので、 glibc 2.1.3 では以下のようなリンク時の警告が追加された。"
4874
4875 #. type: Plain text
4876 #: build/C/man3/lseek64.3:139
4877 msgid "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
4878 msgstr "the \\`llseek\\' function may be dangerous; use \\`lseek64\\' instead."
4879
4880 #. type: Plain text
4881 #: build/C/man3/lseek64.3:143
4882 msgid "This makes this function unusable if one desires a warning-free compilation."
4883 msgstr "これにより、警告なしでコンパイルしたい場合には、この関数を使用不可にできる。"
4884
4885 #. type: SS
4886 #: build/C/man3/lseek64.3:143
4887 #, no-wrap
4888 msgid "_llseek"
4889 msgstr "_llseek"
4890
4891 #. type: Plain text
4892 #: build/C/man3/lseek64.3:146
4893 msgid "All the above functions are implemented in terms of this system call.  The prototype is:"
4894 msgstr "上記の全ての関数は、このシステムコールに基づいて実装される。 プロトタイプは以下の通り:"
4895
4896 #. type: Plain text
4897 #: build/C/man3/lseek64.3:151
4898 #, no-wrap
4899 msgid ""
4900 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
4901 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
4902 msgstr ""
4903 "B<int _llseek(int >I<fd>B<, off_t >I<offset_hi>B<, off_t >I<offset_lo>B<,>\n"
4904 "B<            loff_t *>I<result>B<, int >I<whence>B<);>\n"
4905
4906 #. type: Plain text
4907 #: build/C/man3/lseek64.3:156
4908 msgid "For more details, see B<llseek>(2)."
4909 msgstr "更に詳しい情報は、 B<llseek>(2)  を参照すること。"
4910
4911 #. type: Plain text
4912 #: build/C/man3/lseek64.3:161
4913 msgid "The B<lseek64>()  function is thread-safe."
4914 msgstr "関数 B<lseek64>() はスレッドセーフである。"
4915
4916 #. type: Plain text
4917 #: build/C/man3/lseek64.3:164
4918 msgid "B<llseek>(2), B<lseek>(2)"
4919 msgstr "B<llseek>(2), B<lseek>(2)"
4920
4921 #. type: TH
4922 #: build/C/man2/open.2:51
4923 #, no-wrap
4924 msgid "OPEN"
4925 msgstr "OPEN"
4926
4927 #. type: Plain text
4928 #: build/C/man2/open.2:54
4929 msgid "open, openat, creat - open and possibly create a file"
4930 msgstr "open, openat, creat - ファイルのオープン、作成を行う"
4931
4932 #. type: Plain text
4933 #: build/C/man2/open.2:59
4934 #, no-wrap
4935 msgid ""
4936 "B<#include E<lt>sys/types.hE<gt>>\n"
4937 "B<#include E<lt>sys/stat.hE<gt>>\n"
4938 "B<#include E<lt>fcntl.hE<gt>>\n"
4939 msgstr ""
4940 "B<#include E<lt>sys/types.hE<gt>>\n"
4941 "B<#include E<lt>sys/stat.hE<gt>>\n"
4942 "B<#include E<lt>fcntl.hE<gt>>\n"
4943
4944 #. type: Plain text
4945 #: build/C/man2/open.2:62
4946 #, no-wrap
4947 msgid ""
4948 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
4949 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
4950 msgstr ""
4951 "B<int open(const char *>I<pathname>B<, int >I<flags>B<);>\n"
4952 "B<int open(const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
4953
4954 #. type: Plain text
4955 #: build/C/man2/open.2:64
4956 #, no-wrap
4957 msgid "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
4958 msgstr "B<int creat(const char *>I<pathname>B<, mode_t >I<mode>B<);>\n"
4959
4960 #. type: Plain text
4961 #: build/C/man2/open.2:68
4962 #, no-wrap
4963 msgid ""
4964 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
4965 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
4966 msgstr ""
4967 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
4968 "B<int openat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<, mode_t >I<mode>B<);>\n"
4969
4970 #. type: Plain text
4971 #: build/C/man2/open.2:76
4972 msgid "B<openat>():"
4973 msgstr "B<openat>():"
4974
4975 #. type: Plain text
4976 #: build/C/man2/open.2:98
4977 msgid "Given a I<pathname> for a file, B<open>()  returns a file descriptor, a small, nonnegative integer for use in subsequent system calls (B<read>(2), B<write>(2), B<lseek>(2), B<fcntl>(2), etc.).  The file descriptor returned by a successful call will be the lowest-numbered file descriptor not currently open for the process."
4978 msgstr "ファイルの I<pathname> を与えると、 B<open>()  はファイルディスクリプタを返す。 ファイルディスクリプタは、この後に続くシステムコール (B<read>(2), B<write>(2), B<lseek>(2), B<fcntl>(2) など)  で使用される小さな非負の整数である。 このシステムコールが成功した場合に返されるファイルディスクリプタは そのプロセスがその時点でオープンしていないファイルディスクリプタの うち最小の数字のものとなる。"
4979
4980 #. type: Plain text
4981 #: build/C/man2/open.2:110
4982 msgid "By default, the new file descriptor is set to remain open across an B<execve>(2)  (i.e., the B<FD_CLOEXEC> file descriptor flag described in B<fcntl>(2)  is initially disabled); the B<O_CLOEXEC> flag, described below, can be used to change this default.  The file offset is set to the beginning of the file (see B<lseek>(2))."
4983 msgstr ""
4984 "デフォルトでは、新しいファイルディスクリプタは B<execve>(2) を実行した後も\n"
4985 "オープンされたままとなる (つまり、 B<fcntl>(2) に説明がある B<FD_CLOEXEC> \n"
4986 "ファイルディスクリプタフラグは最初は無効である); 後述の B<O_CLOEXEC> フラグ\n"
4987 "を使うとこのデフォルトを変更することができる。 ファイルオフセット \n"
4988 "(file offset) はファイルの先頭に設定される (B<lseek>(2) 参照)。"
4989
4990 #. type: Plain text
4991 #: build/C/man2/open.2:123
4992 msgid "A call to B<open>()  creates a new I<open file description>, an entry in the system-wide table of open files.  The open file description records the file offset and the file status flags (see below).  A file descriptor is a reference to an open file description; this reference is unaffected if I<pathname> is subsequently removed or modified to refer to a different file.  For further details on open file descriptions, see NOTES."
4993 msgstr "B<open>()  を呼び出すと、「オープンファイル記述」 I<(open file description)> が作成される。ファイル記述とは、システム全体のオープン中のファイルのテーブルのエントリである。 このオープンファイル記述は、ファイルオフセットとファイル状態フラグ (下記参照) が保持する。 ファイルディスクリプタはオープンファイルっ記述への参照である。 この後で I<pathname> が削除されたり、他のファイルを参照するように変更されたりしても、 この参照は影響を受けない。 オープンファイル記述の詳細な説明は「注意」の節を参照。"
4994
4995 #. type: Plain text
4996 #: build/C/man2/open.2:131
4997 msgid "The argument I<flags> must include one of the following I<access modes>: B<O_RDONLY>, B<O_WRONLY>, or B<O_RDWR>.  These request opening the file read-only, write-only, or read/write, respectively."
4998 msgstr "引き数 I<flags> には、アクセスモード B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> のどれかひとつが入っていなければならない。 これらはそれぞれ読み込み専用、書き込み専用、読み書き用に ファイルをオープンすることを要求するものである。"
4999
5000 #.  SUSv4 divides the flags into:
5001 #.  * Access mode
5002 #.  * File creation
5003 #.  * File status
5004 #.  * Other (O_CLOEXEC, O_DIRECTORY, O_NOFOLLOW)
5005 #.  though it's not clear what the difference between "other" and
5006 #.  "File creation" flags is.  I raised an Aardvark to see if this
5007 #.  can be clarified in SUSv4; 10 Oct 2008.
5008 #.  http://thread.gmane.org/gmane.comp.standards.posix.austin.general/64/focus=67
5009 #.  TC1 (balloted in 2013), resolved this, so that those three constants
5010 #.  are also categorized" as file status flags.
5011 #. type: Plain text
5012 #: build/C/man2/open.2:170
5013 msgid "In addition, zero or more file creation flags and file status flags can be bitwise-I<or>'d in I<flags>.  The I<file creation flags> are B<O_CLOEXEC>, B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TMPFILE>, B<O_TRUNC>, and B<O_TTY_INIT>.  The I<file status flags> are all of the remaining flags listed below.  The distinction between these two groups of flags is that the file status flags can be retrieved and (in some cases)  modified; see B<fcntl>(2)  for details."
5014 msgstr "さらに、 I<flags> には、ファイル作成フラグ (file creation flag) とファイル状態フラグ (file status flag) を 0 個以上「ビット単位の OR (bitwise-or)」で 指定することができる。 I<ファイル作成フラグ> は B<O_CLOEXEC>, B<O_CREAT>, B<O_DIRECTORY>, B<O_EXCL>, B<O_NOCTTY>, B<O_NOFOLLOW>, B<O_TMPFILE>, B<O_TRUNC>, B<O_TTY_INIT> である。 I<ファイル状態フラグ> は以下のリストのうち上記以外の残りのものである。 二種類のフラグの違いは、ファイル状態フラグの方はその内容を取得したり (場合によっては) 変更したりできる点にある。詳細は B<fcntl>(2) を参照。"
5015
5016 #. type: Plain text
5017 #: build/C/man2/open.2:172
5018 msgid "The full list of file creation flags and file status flags is as follows:"
5019 msgstr "すべてのファイル作成フラグとファイル状態フラグを以下のリストに示す。"
5020
5021 #. type: TP
5022 #: build/C/man2/open.2:172
5023 #, no-wrap
5024 msgid "B<O_APPEND>"
5025 msgstr "B<O_APPEND>"
5026
5027 #.  For more background, see
5028 #.  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=453946
5029 #.  http://nfs.sourceforge.net/
5030 #. type: Plain text
5031 #: build/C/man2/open.2:189
5032 msgid "The file is opened in append mode.  Before each B<write>(2), the file offset is positioned at the end of the file, as if with B<lseek>(2).  B<O_APPEND> may lead to corrupted files on NFS filesystems if more than one process appends data to a file at once.  This is because NFS does not support appending to a file, so the client kernel has to simulate it, which can't be done without a race condition."
5033 msgstr "ファイルを追加 (append) モードでオープンする。 毎回の B<write>(2)  の前に B<lseek>(2)  を行ったかのように、ファイルポインタをファイルの最後に移動する。 NFS ファイルシステムで、 B<O_APPEND> を使用すると、複数のプロセスがひとつのファイルに同時にデータを追加した場合、 ファイルが壊れてしまうことがある。 これは NFS が追加モードをサポートしていないため、 クライアントのカーネル (kernel) がそれをシミュレートしなければならないのだが、 競合状態を避けることはできないからである。"
5034
5035 #. type: TP
5036 #: build/C/man2/open.2:189
5037 #, no-wrap
5038 msgid "B<O_ASYNC>"
5039 msgstr "B<O_ASYNC>"
5040
5041 #. type: Plain text
5042 #: build/C/man2/open.2:203
5043 msgid "Enable signal-driven I/O: generate a signal (B<SIGIO> by default, but this can be changed via B<fcntl>(2))  when input or output becomes possible on this file descriptor.  This feature is available only for terminals, pseudoterminals, sockets, and (since Linux 2.6) pipes and FIFOs.  See B<fcntl>(2)  for further details.  See also BUGS, below."
5044 msgstr "シグナル駆動 I/O (signal-driven I/O) を有効にする: このファイルディスクリプタへの 入力または出力が可能になった場合に、シグナルを生成する (デフォルトは B<SIGIO> であるが、 B<fcntl>(2)  によって変更可能である)。 この機能が使用可能なのは端末、疑似端末、ソケットのみであり、 (Linux 2.6 以降では) パイプと FIFO に対しても使用できる。 さらに詳しい説明は B<fcntl>(2)  を参照すること。 下記の「バグ」も参照。"
5045
5046 #. type: TP
5047 #: build/C/man2/open.2:203
5048 #, no-wrap
5049 msgid "B<O_CLOEXEC> (since Linux 2.6.23)"
5050 msgstr "B<O_CLOEXEC> (Linux 2.6.23 以降)"
5051
5052 #.  NOTE! several other man pages refer to this text
5053 #. type: Plain text
5054 #: build/C/man2/open.2:213
5055 msgid "Enable the close-on-exec flag for the new file descriptor.  Specifying this flag permits a program to avoid additional B<fcntl>(2)  B<F_SETFD> operations to set the B<FD_CLOEXEC> flag."
5056 msgstr "新しいファイルディスクリプタに対して close-on-exec フラグを有効にする。 このフラグを指定することで、 プログラムは B<FD_CLOEXEC> フラグをセットするために B<fcntl>(2) B<F_SETFD> 操作を別途呼び出す必要がなくなる。"
5057
5058 #.  This flag fixes only one form of the race condition;
5059 #.  The race can also occur with, for example, descriptors
5060 #.  returned by accept(), pipe(), etc.
5061 #. type: Plain text
5062 #: build/C/man2/open.2:242
5063 msgid "Note that the use of this flag is essential in some multithreaded programs, because using a separate B<fcntl>(2)  B<F_SETFD> operation to set the B<FD_CLOEXEC> flag does not suffice to avoid race conditions where one thread opens a file descriptor and attempts to set its close-on-exec flag using B<fcntl>(2)  at the same time as another thread does a B<fork>(2)  plus B<execve>(2).  Depending on the order of execution, the race may lead to the file descriptor returned by B<open>()  being unintentionally leaked to the program executed by the child process created by B<fork>(2).  (This kind of race is in principle possible for any system call that creates a file descriptor whose close-on-exec flag should be set, and various other Linux system calls provide an equivalent of the B<O_CLOEXEC> flag to deal with this problem.)"
5064 msgstr "ある種のマルチスレッドのプログラムはこのフラグの使用は不可欠である点に注意すること。 なぜなら、個別に B<FD_CLOEXEC> フラグを設定する B<fcntl>(2) B<F_SETFD> 操作を呼び出したとしても、あるスレッドがファイルディスクリプタを オープンするのと同時に別のスレッドが B<fork>(2) と B<execve>(2) を実行するという競合条件を避けるのには十分ではないからである。 実行の順序に依存して、この競合条件の結果、 B<open>() が返したファイルディスクリプタが B<fork>(2) で作成された子プロセスにより実行されるプログラムに意図せず見えてしまう可能性がある。 (この種の競合は、 本質的に、 close-on-exec フラグをセットすべきファイルディスクリプタを作成するどのシステムコールでも起こり得るものであり、 他のいろいろな Linux システムコールでこの問題に対処するために B<O_CLOEXEC> と同等の機能が提供されている。)"
5065
5066 #. type: TP
5067 #: build/C/man2/open.2:242
5068 #, no-wrap
5069 msgid "B<O_CREAT>"
5070 msgstr "B<O_CREAT>"
5071
5072 #.  As at 2.6.25, bsdgroups is supported by ext2, ext3, ext4, and
5073 #.  XFS (since 2.6.14).
5074 #. type: Plain text
5075 #: build/C/man2/open.2:258
5076 msgid "If the file does not exist, it will be created.  The owner (user ID) of the file is set to the effective user ID of the process.  The group ownership (group ID) is set either to the effective group ID of the process or to the group ID of the parent directory (depending on filesystem type and mount options, and the mode of the parent directory; see the mount options I<bsdgroups> and I<sysvgroups> described in B<mount>(8))."
5077 msgstr "ファイルが存在しなかった場合は作成 (create) する。 ファイルの所有者 (ユーザー ID) は、プロセスの実効ユーザー ID に設定される。 グループ所有権 (グループ ID) は、プロセスの実効グループ ID または親ディレクトリのグループ ID に設定される (これは、ファイルシステムタイプ、マウントオプション、 親ディレクトリのモードに依存する。 B<mount>(8)  で説明されているマウントオプション I<bsdgroups> と I<sysvgroups> を参照)。"
5078
5079 #. type: Plain text
5080 #: build/C/man2/open.2:285
5081 msgid "I<mode> specifies the permissions to use in case a new file is created.  This argument must be supplied when B<O_CREAT> or B<O_TMPFILE> is specified in I<flags>; if neither B<O_CREAT> nor B<O_TMPFILE> is specified, then I<mode> is ignored.  The effective permissions are modified by the process's I<umask> in the usual way: The permissions of the created file are I<(mode\\ &\\ ~umask)>.  Note that this mode applies only to future accesses of the newly created file; the B<open>()  call that creates a read-only file may well return a read/write file descriptor."
5082 msgstr "I<mode> は新しいファイルを作成する場合に使用するアクセス許可 (permission) を指定する。 I<flags> に B<O_CREAT> か B<O_TMPFILE> が指定されている場合、 I<mode> を指定しなければならない。 B<O_CREAT> も B<O_TMPFILE> も指定されていない場合、 I<mode> は無視される。 有効なアクセス許可は、普段と同じようにプロセスの I<umask> によって修正され、作成されたファイルの許可は I<(mode\\ &\\ ~umask)> となる。 このモードは、新しく作成されたファイルに対するそれ以降のアクセス にのみ適用される点に注意すること。 読み取り専用のファイルを作成する B<open>()  コールであっても、 読み書き可能なファイルディスクリプタを返すことがありうる。"
5083
5084 #. type: Plain text
5085 #: build/C/man2/open.2:288
5086 msgid "The following symbolic constants are provided for I<mode>:"
5087 msgstr "I<mode> のために以下のシンボル定数が提供されている :"
5088
5089 #. type: TP
5090 #: build/C/man2/open.2:288
5091 #, no-wrap
5092 msgid "B<S_IRWXU>"
5093 msgstr "B<S_IRWXU>"
5094
5095 #. type: Plain text
5096 #: build/C/man2/open.2:291
5097 msgid "00700 user (file owner) has read, write and execute permission"
5098 msgstr "00700 ユーザー (ファイルの所有者) に読み込み、書き込み、 実行の許可がある。"
5099
5100 #. type: TP
5101 #: build/C/man2/open.2:291
5102 #, no-wrap
5103 msgid "B<S_IRUSR>"
5104 msgstr "B<S_IRUSR>"
5105
5106 #. type: Plain text
5107 #: build/C/man2/open.2:294
5108 msgid "00400 user has read permission"
5109 msgstr "00400 ユーザーに読み込みの許可がある。"
5110
5111 #. type: TP
5112 #: build/C/man2/open.2:294
5113 #, no-wrap
5114 msgid "B<S_IWUSR>"
5115 msgstr "B<S_IWUSR>"
5116
5117 #. type: Plain text
5118 #: build/C/man2/open.2:297
5119 msgid "00200 user has write permission"
5120 msgstr "00200 ユーザーに書き込みの許可がある。"
5121
5122 #. type: TP
5123 #: build/C/man2/open.2:297
5124 #, no-wrap
5125 msgid "B<S_IXUSR>"
5126 msgstr "B<S_IXUSR>"
5127
5128 #. type: Plain text
5129 #: build/C/man2/open.2:300
5130 msgid "00100 user has execute permission"
5131 msgstr "00100 ユーザーに実行の許可がある。"
5132
5133 #. type: TP
5134 #: build/C/man2/open.2:300
5135 #, no-wrap
5136 msgid "B<S_IRWXG>"
5137 msgstr "B<S_IRWXG>"
5138
5139 #. type: Plain text
5140 #: build/C/man2/open.2:303
5141 msgid "00070 group has read, write and execute permission"
5142 msgstr "00070 グループに読み込み、書き込み、実行の許可がある。"
5143
5144 #. type: TP
5145 #: build/C/man2/open.2:303
5146 #, no-wrap
5147 msgid "B<S_IRGRP>"
5148 msgstr "B<S_IRGRP>"
5149
5150 #. type: Plain text
5151 #: build/C/man2/open.2:306
5152 msgid "00040 group has read permission"
5153 msgstr "00040 グループに読み込みの許可がある。"
5154
5155 #. type: TP
5156 #: build/C/man2/open.2:306
5157 #, no-wrap
5158 msgid "B<S_IWGRP>"
5159 msgstr "B<S_IWGRP>"
5160
5161 #. type: Plain text
5162 #: build/C/man2/open.2:309
5163 msgid "00020 group has write permission"
5164 msgstr "00020 グループに書き込みの許可がある。"
5165
5166 #. type: TP
5167 #: build/C/man2/open.2:309
5168 #, no-wrap
5169 msgid "B<S_IXGRP>"
5170 msgstr "B<S_IXGRP>"
5171
5172 #. type: Plain text
5173 #: build/C/man2/open.2:312
5174 msgid "00010 group has execute permission"
5175 msgstr "00010 グループに実行の許可がある。"
5176
5177 #. type: TP
5178 #: build/C/man2/open.2:312
5179 #, no-wrap
5180 msgid "B<S_IRWXO>"
5181 msgstr "B<S_IRWXO>"
5182
5183 #. type: Plain text
5184 #: build/C/man2/open.2:315
5185 msgid "00007 others have read, write and execute permission"
5186 msgstr "00007 他人 (others) に読み込み、書き込み、実行の許可がある。"
5187
5188 #. type: TP
5189 #: build/C/man2/open.2:315
5190 #, no-wrap
5191 msgid "B<S_IROTH>"
5192 msgstr "B<S_IROTH>"
5193
5194 #. type: Plain text
5195 #: build/C/man2/open.2:318
5196 msgid "00004 others have read permission"
5197 msgstr "00004 他人に読み込みの許可がある。"
5198
5199 #. type: TP
5200 #: build/C/man2/open.2:318
5201 #, no-wrap
5202 msgid "B<S_IWOTH>"
5203 msgstr "B<S_IWOTH>"
5204
5205 #. type: Plain text
5206 #: build/C/man2/open.2:321
5207 msgid "00002 others have write permission"
5208 msgstr "00002 他人に書き込みの許可がある。"
5209
5210 #. type: TP
5211 #: build/C/man2/open.2:321
5212 #, no-wrap
5213 msgid "B<S_IXOTH>"
5214 msgstr "B<S_IXOTH>"
5215
5216 #. type: Plain text
5217 #: build/C/man2/open.2:324
5218 msgid "00001 others have execute permission"
5219 msgstr "00001 他人に実行の許可がある。"
5220
5221 #. type: TP
5222 #: build/C/man2/open.2:325
5223 #, no-wrap
5224 msgid "B<O_DIRECT> (since Linux 2.4.10)"
5225 msgstr "B<O_DIRECT> (Linux 2.4.10 以降)"
5226
5227 #. type: Plain text
5228 #: build/C/man2/open.2:342
5229 msgid "Try to minimize cache effects of the I/O to and from this file.  In general this will degrade performance, but it is useful in special situations, such as when applications do their own caching.  File I/O is done directly to/from user-space buffers.  The B<O_DIRECT> flag on its own makes an effort to transfer data synchronously, but does not give the guarantees of the B<O_SYNC> flag that data and necessary metadata are transferred.  To guarantee synchronous I/O, B<O_SYNC> must be used in addition to B<O_DIRECT>.  See NOTES below for further discussion."
5230 msgstr "このファイルに対する I/O のキャッシュの効果を最小化しようとする。このフラグを使うと、一般的に性能が低下する。 しかしアプリケーションが独自にキャッシングを行っているような 特別な場合には役に立つ。 ファイルの I/O はユーザー空間バッファに対して直接行われる。 B<O_DIRECT> フラグ自身はデータを同期で転送しようとはするが、 B<O_SYNC> フラグのようにデータと必要なメタデータの転送が保証されるわけではない。同期 I/O を保証するためには、 B<O_DIRECT> に加えて B<O_SYNC> を使用しなければならない。下記の「注意」の節の議論も参照。"
5231
5232 #. type: Plain text
5233 #: build/C/man2/open.2:346
5234 msgid "A semantically similar (but deprecated) interface for block devices is described in B<raw>(8)."
5235 msgstr "ブロックデバイスに対する似通った意味のインターフェースが B<raw>(8)  で説明されている (但し、このインタフェースは非推奨である)。"
5236
5237 #. type: TP
5238 #: build/C/man2/open.2:346
5239 #, no-wrap
5240 msgid "B<O_DIRECTORY>"
5241 msgstr "B<O_DIRECTORY>"
5242
5243 #.  But see the following and its replies:
5244 #.  http://marc.theaimsgroup.com/?t=112748702800001&r=1&w=2
5245 #.  [PATCH] open: O_DIRECTORY and O_CREAT together should fail
5246 #.  O_DIRECTORY | O_CREAT causes O_DIRECTORY to be ignored.
5247 #. type: Plain text
5248 #: build/C/man2/open.2:358
5249 msgid "If I<pathname> is not a directory, cause the open to fail.  This flag was added in kernel version 2.1.126, to avoid denial-of-service problems if B<opendir>(3)  is called on a FIFO or tape device."
5250 msgstr "I<pathname> がディレクトリでなければオープンは失敗する。 このフラグは、 B<opendir>(3)  が FIFO やテープデバイスに対してコールされた場合の サービス不能 (denial-of-service) 攻撃を避けるために カーネル 2.1.126 で追加された。"
5251
5252 #. type: TP
5253 #: build/C/man2/open.2:358
5254 #, no-wrap
5255 msgid "B<O_DSYNC>"
5256 msgstr "B<O_DSYNC>"
5257
5258 #. type: Plain text
5259 #: build/C/man2/open.2:364
5260 msgid "Write operations on the file will complete according to the requirements of synchronized I/O I<data> integrity completion."
5261 msgstr "ファイルに対する書き込み操作は、同期 I/O のI<データ>完全性完了の要件に基づいて行われる。"
5262
5263 #. type: Plain text
5264 #: build/C/man2/open.2:376
5265 msgid "By the time B<write>(2)  (and similar)  return, the output data has been transferred to the underlying hardware, along with any file metadata that would be required to retrieve that data (i.e., as though each B<write>(2)  was followed by a call to B<fdatasync>(2)).  I<See NOTES below>."
5266 msgstr "B<write>(2) (や同様のコール) が返るまでに、 書き込まれたデータおよびデータを取得するのに必要なファイルメタデータが裏で利用されているハードウェアに転送される (つまり、B<write>(2) の後に B<fdatasync>(2) を呼び出したのと同じようになる)。 I<下記の「注意」も参照のこと>。"
5267
5268 #. type: TP
5269 #: build/C/man2/open.2:376
5270 #, no-wrap
5271 msgid "B<O_EXCL>"
5272 msgstr "B<O_EXCL>"
5273
5274 #. type: Plain text
5275 #: build/C/man2/open.2:386
5276 msgid "Ensure that this call creates the file: if this flag is specified in conjunction with B<O_CREAT>, and I<pathname> already exists, then B<open>()  will fail."
5277 msgstr ""
5278 "この呼び出しでファイルが作成されることを保証する。このフラグが B<O_CREAT> と\n"
5279 "一緒に指定され、 I<pathname> のファイルが既に存在した場合、 B<open>() は失敗\n"
5280 "する。"
5281
5282 #.  POSIX.1-2001 explicitly requires this behavior.
5283 #. type: Plain text
5284 #: build/C/man2/open.2:394
5285 msgid "When these two flags are specified, symbolic links are not followed: if I<pathname> is a symbolic link, then B<open>()  fails regardless of where the symbolic link points to."
5286 msgstr "これら二つのフラグが指定された際、シンボリックリンクは辿られない。 I<pathname> がシンボリックリンクの場合、 シンボリックリンクがどこを指しているかに関わらず B<open>()  は失敗する。"
5287
5288 #. type: Plain text
5289 #: build/C/man2/open.2:410
5290 msgid "In general, the behavior of B<O_EXCL> is undefined if it is used without B<O_CREAT>.  There is one exception: on Linux 2.6 and later, B<O_EXCL> can be used without B<O_CREAT> if I<pathname> refers to a block device.  If the block device is in use by the system (e.g., mounted), B<open>()  fails with the error B<EBUSY>."
5291 msgstr ""
5292 "一般的には、 B<O_CREAT> を指定せずに B<O_EXCL> を使用した場合の\n"
5293 "B<O_EXCL> の動作は規定されていない。\n"
5294 "これには一つ例外があり、Linux 2.6 以降では、\n"
5295 "I<pathname> がブロックデバイスを参照している場合、\n"
5296 "B<O_CREAT> なしで B<O_EXCL> を使用することができる。\n"
5297 "システムがそのブロックデバイスを使用中の場合 (例えば、\n"
5298 "マウントされているなど)、 B<open>() はエラー B<EBUSY> で失敗する。"
5299
5300 #. type: Plain text
5301 #: build/C/man2/open.2:432
5302 msgid "On NFS, B<O_EXCL> is supported only when using NFSv3 or later on kernel 2.6 or later.  In NFS environments where B<O_EXCL> support is not provided, programs that rely on it for performing locking tasks will contain a race condition.  Portable programs that want to perform atomic file locking using a lockfile, and need to avoid reliance on NFS support for B<O_EXCL>, can create a unique file on the same filesystem (e.g., incorporating hostname and PID), and use B<link>(2)  to make a link to the lockfile.  If B<link>(2)  returns 0, the lock is successful.  Otherwise, use B<stat>(2)  on the unique file to check if its link count has increased to 2, in which case the lock is also successful."
5303 msgstr "NFS では、 B<O_EXCL> は、Linux 2.6 以降で NFSv3 以降を使っている場合でのみサポートされる。 B<O_EXCL> サポートが提供されていない NFS 環境では、このフラグに頼って ロック処理を実行するプログラムは競合状態 (race condition) に出会う 可能性がある。 ロックファイルを使用して不可分 (atomic) なファイルロックを実現し、 NFS が B<O_EXCL> をサポートしているかに依存しないようにしたい場合、 移植性のある方法は、同じファイルシステム上に他と名前の重ならない ファイル (例えばホスト名と PID を組み合わせた名前) を作成し、 B<link>(2)  を使用してそのロックファイルへのリンクを作成することである。 B<link>(2)  コールの返り値が 0 ならばロックに成功している。 あるいは、そのファイルに B<stat>(2)  を使用してリンク数 (link count) が 2 になっているかをチェックする。 そうなっていれば、同じくロックに成功しているということである。"
5304
5305 #. type: TP
5306 #: build/C/man2/open.2:432
5307 #, no-wrap
5308 msgid "B<O_LARGEFILE>"
5309 msgstr "B<O_LARGEFILE>"
5310
5311 #. type: Plain text
5312 #: build/C/man2/open.2:454
5313 msgid "(LFS)  Allow files whose sizes cannot be represented in an I<off_t> (but can be represented in an I<off64_t>)  to be opened.  The B<_LARGEFILE64_SOURCE> macro must be defined (before including I<any> header files)  in order to obtain this definition.  Setting the B<_FILE_OFFSET_BITS> feature test macro to 64 (rather than using B<O_LARGEFILE>)  is the preferred method of accessing large files on 32-bit systems (see B<feature_test_macros>(7))."
5314 msgstr ""
5315 "(LFS) I<off_t> ではサイズを表せない (だだし I<off64_t> ではサイズを表せる)ファ\n"
5316 "イルをオープン可能にする。この定義を有効にするためには、(I<どの>ヘッダファイ\n"
5317 "ルをインクルードするよりも前に) B<_LARGEFILE64_SOURCE> マクロを定義しなければ\n"
5318 "ならない。\n"
5319 "32 ビットシステムにおいて大きなファイルにアクセスしたい場合、\n"
5320 "(B<O_LARGEFILE> を使うよりも) B<_FILE_OFFSET_BITS> 機能検査マクロを 64 に\n"
5321 "セットする方が望ましい方法である (B<feature_test_macros>(7) を参照)。"
5322
5323 #. type: TP
5324 #: build/C/man2/open.2:454
5325 #, no-wrap
5326 msgid "B<O_NOATIME> (since Linux 2.6.8)"
5327 msgstr "B<O_NOATIME> (Linux 2.6.8 以降)"
5328
5329 #.  The O_NOATIME flag also affects the treatment of st_atime
5330 #.  by mmap() and readdir(2), MTK, Dec 04.
5331 #. type: Plain text
5332 #: build/C/man2/open.2:467
5333 msgid "Do not update the file last access time (I<st_atime> in the inode)  when the file is B<read>(2).  This flag is intended for use by indexing or backup programs, where its use can significantly reduce the amount of disk activity.  This flag may not be effective on all filesystems.  One example is NFS, where the server maintains the access time."
5334 msgstr "ファイルに対して B<read>(2)  が実行されたときに、最終アクセス時刻 (inode の I<st_atime>) を更新しない。 このフラグはインデックス作成やバックアッププログラムで使うことを意図している。 これを使うとディスクに対する操作を大幅に減らすことができる。 このフラグは全てのファイルシステムに対して有効であるわけではない。 その一例が NFS であり、サーバがアクセス時刻を管理している。"
5335
5336 #. type: TP
5337 #: build/C/man2/open.2:467
5338 #, no-wrap
5339 msgid "B<O_NOCTTY>"
5340 msgstr "B<O_NOCTTY>"
5341
5342 #. type: Plain text
5343 #: build/C/man2/open.2:475
5344 msgid "If I<pathname> refers to a terminal device\\(emsee B<tty>(4)\\(emit will not become the process's controlling terminal even if the process does not have one."
5345 msgstr ""
5346 "I<pathname> が端末 (terminal) デバイス \\(em B<tty>(4) 参照 \\(em を指している\n"
5347 "場合に、たとえそのプロセスが制御端末を持っていなくても、オープンしたファイル\n"
5348 "は制御端末にはならない。"
5349
5350 #. type: TP
5351 #: build/C/man2/open.2:475
5352 #, no-wrap
5353 msgid "B<O_NOFOLLOW>"
5354 msgstr "B<O_NOFOLLOW>"
5355
5356 #.  The headers from glibc 2.0.100 and later include a
5357 #.  definition of this flag; \fIkernels before 2.1.126 will ignore it if
5358 #.  used\fP.
5359 #. type: Plain text
5360 #: build/C/man2/open.2:487
5361 msgid "If I<pathname> is a symbolic link, then the open fails.  This is a FreeBSD extension, which was added to Linux in version 2.1.126.  Symbolic links in earlier components of the pathname will still be followed.  See also B<O_PATH> below."
5362 msgstr "I<pathname> がシンボリックリンクだった場合、オープンは失敗する。 これは FreeBSD の拡張で、Linux には バージョン 2.1.126 で追加された。 このフラグが指定された場合でも I<pathname> の前の方の要素 (最後のディレクトリセパレータより前の部分) にあるシンボリックリンクについてはリンクが辿られる。 下記の B<O_PATH> も参照のこと。"
5363
5364 #. type: TP
5365 #: build/C/man2/open.2:487
5366 #, no-wrap
5367 msgid "B<O_NONBLOCK> or B<O_NDELAY>"
5368 msgstr "B<O_NONBLOCK> または B<O_NDELAY>"
5369
5370 #. type: Plain text
5371 #: build/C/man2/open.2:500
5372 msgid "When possible, the file is opened in nonblocking mode.  Neither the B<open>()  nor any subsequent operations on the file descriptor which is returned will cause the calling process to wait.  For the handling of FIFOs (named pipes), see also B<fifo>(7).  For a discussion of the effect of B<O_NONBLOCK> in conjunction with mandatory file locks and with file leases, see B<fcntl>(2)."
5373 msgstr ""
5374 "可能ならば、ファイルは非停止 (nonblocking) モードでオープンされる。\n"
5375 "B<open>() も、返したファイルディスクリプタに対する以後のすべての操作も呼び出\n"
5376 "したプロセスを待たせることはない。 FIFO (名前付きパイプ) を扱う場合には\n"
5377 "B<fifo>(7) も参照すること。 強制ファイルロック (mandatory file lock) やファイ\n"
5378 "ルリース (file lease) と組み合わせた場合の、 B<O_NONBLOCK> の効果についての\n"
5379 "議論は、 B<fcntl>(2) を参照すること。"
5380
5381 #. type: TP
5382 #: build/C/man2/open.2:500
5383 #, no-wrap
5384 msgid "B<O_PATH> (since Linux 2.6.39)"
5385 msgstr "B<O_PATH> (Linux 2.6.39 以降)"
5386
5387 #
5388 #.  commit 1abf0c718f15a56a0a435588d1b104c7a37dc9bd
5389 #.  commit 326be7b484843988afe57566b627fb7a70beac56
5390 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
5391 #.  http://thread.gmane.org/gmane.linux.man/2790/focus=3496
5392 #.      Subject: Re: [PATCH] open(2): document O_PATH
5393 #.      Newsgroups: gmane.linux.man, gmane.linux.kernel
5394 #. type: Plain text
5395 #: build/C/man2/open.2:522
5396 msgid "Obtain a file descriptor that can be used for two purposes: to indicate a location in the filesystem tree and to perform operations that act purely at the file descriptor level.  The file itself is not opened, and other file operations (e.g., B<read>(2), B<write>(2), B<fchmod>(2), B<fchown>(2), B<fgetxattr>(2), B<mmap>(2))  fail with the error B<EBADF>."
5397 msgstr "このフラグを指定して取得したファイルディスクリプタは、 ファイルシステムツリー内での場所を示すため、 純粋にファイルディスクリプタレベルでの作用する操作を実行するため、 の二つの目的で使用することができる。 ファイル自身はオープンされず、 他のファイル操作 (例えば B<read>(2), B<write>(2), B<fchmod>(2), B<fchown>(2), B<fgetxattr>(2), B<mmap>(2)) はエラー B<EBADF> で失敗する。"
5398
5399 #. type: Plain text
5400 #: build/C/man2/open.2:526
5401 msgid "The following operations I<can> be performed on the resulting file descriptor:"
5402 msgstr "取得したファイルディスクリプタに対して以下の操作を行うことが「できる」。"
5403
5404 #.  commit 332a2e1244bd08b9e3ecd378028513396a004a24
5405 #.  fstat(): commit 55815f70147dcfa3ead5738fd56d3574e2e3c1c2
5406 #. type: Plain text
5407 #: build/C/man2/open.2:535
5408 msgid "B<close>(2); B<fchdir>(2)  (since Linux 3.5); B<fstat>(2)  (since Linux 3.6)."
5409 msgstr "B<close>(2); B<fchdir>(2)  (Linux 3.5 以降); B<fstat>(2)  (Linux 3.6 以降)"
5410
5411 #. type: Plain text
5412 #: build/C/man2/open.2:541
5413 msgid "Duplicating the file descriptor (B<dup>(2), B<fcntl>(2)  B<F_DUPFD>, etc.)."
5414 msgstr "ファイルディスクリプタの複製 (B<dup>(2), B<fcntl>(2)  B<F_DUPFD> など)"
5415
5416 #. type: Plain text
5417 #: build/C/man2/open.2:547
5418 msgid "Getting and setting file descriptor flags (B<fcntl>(2)  B<F_GETFD> and B<F_SETFD>)."
5419 msgstr "ファイルディスクリプタフラグの取得と設定 (B<fcntl>(2) の B<F_GETFD> と B<F_SETFD>)"
5420
5421 #. type: Plain text
5422 #: build/C/man2/open.2:553
5423 msgid "Retrieving open file status flags using the B<fcntl>(2)  B<F_GETFL> operation: the returned flags will include the bit B<O_PATH>."
5424 msgstr "B<fcntl>(2) の B<F_GETFL> 操作を使ったオープンされたファイルの状態フラグの取得。 返されるフラグには B<O_PATH> ビットが含まれる。"
5425
5426 #. type: Plain text
5427 #: build/C/man2/open.2:566
5428 msgid "Passing the file descriptor as the I<dirfd> argument of B<openat>(2)  and the other \"*at()\" system calls.  This includes B<linkat>(2)  with B<AT_EMPTY_PATH> (or via procfs using B<AT_SYMLINK_FOLLOW>)  even if the file is not a directory."
5429 msgstr "B<openat>(2) や他の \"*at()\" 系のシステムコールの I<dirfd> 引数としてそのファイルディスクリプタを渡す。 これには、 ファイルがディレクトリでない場合に B<linkat>(2) に B<AT_EMPTY_PATH> が指定された場合 (や procfs 経由で B<AT_SYMLINK_FOLLOW> が使用された場合) を含む。"
5430
5431 #. type: Plain text
5432 #: build/C/man2/open.2:572
5433 msgid "Passing the file descriptor to another process via a UNIX domain socket (see B<SCM_RIGHTS> in B<unix>(7))."
5434 msgstr "そのファイルディスクリプタを別のプロセスに UNIX ドメインソケット経由で渡す。 (B<unix>(7) の B<SCM_RIGHTS> を参照)"
5435
5436 #. type: Plain text
5437 #: build/C/man2/open.2:584
5438 msgid "When B<O_PATH> is specified in I<flags>, flag bits other than B<O_CLOEXEC>, B<O_DIRECTORY>, and B<O_NOFOLLOW> are ignored."
5439 msgstr "I<flags> に B<O_PATH> が指定された場合、 B<O_CLOEXEC>, B<O_DIRECTORY>, B<O_NOFOLLOW> 以外のフラグビットは無視される。"
5440
5441 #. type: Plain text
5442 #: build/C/man2/open.2:600
5443 msgid "If I<pathname> is a symbolic link and the B<O_NOFOLLOW> flag is also specified, then the call returns a file descriptor referring to the symbolic link.  This file descriptor can be used as the I<dirfd> argument in calls to B<fchownat>(2), B<fstatat>(2), B<linkat>(2), and B<readlinkat>(2)  with an empty pathname to have the calls operate on the symbolic link."
5444 msgstr "I<pathname> がシンボリックリンクで B<O_NOFOLLOW> フラグも合わせて指定された場合、 この呼び出しではシンボリックリンクを参照するファイルディスクリプタを返す。 このファイルディスクリプタは、 空のパス名を指定した B<fchownat>(2), B<fstatat>(2), B<linkat>(2), B<readlinkat>(2) の呼び出しで I<dirfd> 引数として使うことで、 そのシンボリックリンクに対して操作を行うことができる。"
5445
5446 #. type: TP
5447 #: build/C/man2/open.2:600
5448 #, no-wrap
5449 msgid "B<O_SYNC>"
5450 msgstr "B<O_SYNC>"
5451
5452 #. type: Plain text
5453 #: build/C/man2/open.2:612
5454 msgid "Write operations on the file will complete according to the requirements of synchronized I/O I<file> integrity completion (by contrast with the synchronized I/O I<data> integrity completion provided by B<O_DSYNC>.)"
5455 msgstr "ファイルに対する書き込み操作は、同期 I/O のI<ファイル>完全性完了の要件に基づいて行われる (これに対し B<O_DSYNC> では同期 I/O のI<データ>完全性完了が提供される)。"
5456
5457 #. type: Plain text
5458 #: build/C/man2/open.2:623
5459 msgid "By the time B<write>(2)  (and similar)  return, the output data and associated file metadata have been transferred to the underlying hardware (i.e., as though each B<write>(2)  was followed by a call to B<fsync>(2)).  I<See NOTES below>."
5460 msgstr "B<write>(2) (や同様のコール) が返るまでに、 書き込まれたデータと関連するファイルメタデータが裏で利用されているハードウェアに転送される (つまり、B<write>(2) の後に B<fsync>(2) を呼び出したのと同じようになる)。 I<下記の「注意」も参照のこと>。"
5461
5462 #. type: TP
5463 #: build/C/man2/open.2:623
5464 #, no-wrap
5465 msgid "B<O_TMPFILE> (since Linux 3.11)"
5466 msgstr "B<O_TMPFILE> (Linux 3.11 以降)"
5467
5468 #.  commit 60545d0d4610b02e55f65d141c95b18ccf855b6e
5469 #.  commit f4e0c30c191f87851c4a53454abb55ee276f4a7e
5470 #.  commit bb458c644a59dbba3a1fe59b27106c5e68e1c4bd
5471 #. type: Plain text
5472 #: build/C/man2/open.2:635
5473 msgid "Create an unnamed temporary file.  The I<pathname> argument specifies a directory; an unnamed inode will be created in that directory's filesystem.  Anything written to the resulting file will be lost when the last file descriptor is closed, unless the file is given a name."
5474 msgstr "名前なしの一時ファイルを作成する。 I<pathname> 引き数はディレクトリを指定する。 名前なしの inode がそのディレクトリが存在するファイルシステムに作成される。 そのファイルに名前を付与しない限り、 作成されたファイルに書き込まれた内容は、 最後のファイルディスクリプタがクローズされる際に失われる。"
5475
5476 #. type: Plain text
5477 #: build/C/man2/open.2:649
5478 msgid "B<O_TMPFILE> must be specified with one of B<O_RDWR> or B<O_WRONLY> and, optionally, B<O_EXCL>.  If B<O_EXCL> is not specified, then B<linkat>(2)  can be used to link the temporary file into the filesystem, making it permanent, using code like the following:"
5479 msgstr "B<O_TMPFILE> は必ず B<O_RDWR> か B<O_WRONLY> のいずれかと一緒に使わなければならない。 B<O_EXCL> も指定することができる。 B<O_EXCL> が指定されなかった場合、 B<linkat>(2) を使って、そのファイルシステムにこの一時ファイルへのリンクを作成し、ファイルを永続化することができる。 以下のコードのようにすればよい。"
5480
5481 #. type: Plain text
5482 #: build/C/man2/open.2:655
5483 #, no-wrap
5484 msgid ""
5485 "char path[PATH_MAX];\n"
5486 "fd = open(\"/path/to/dir\", O_TMPFILE | O_RDWR,\n"
5487 "                        S_IRUSR | S_IWUSR);\n"
5488 msgstr ""
5489 "char path[PATH_MAX];\n"
5490 "fd = open(\"/path/to/dir\", O_TMPFILE | O_RDWR,\n"
5491 "                        S_IRUSR | S_IWUSR);\n"
5492
5493 #. type: Plain text
5494 #: build/C/man2/open.2:657
5495 #, no-wrap
5496 msgid "/* File I/O on 'fd'... */\n"
5497 msgstr "/* 'fd' に対するファイル I/O ... */\n"
5498
5499 #. type: Plain text
5500 #: build/C/man2/open.2:661
5501 #, no-wrap
5502 msgid ""
5503 "snprintf(path, PATH_MAX,  \"/proc/self/fd/%d\", fd);\n"
5504 "linkat(AT_FDCWD, path, AT_FDCWD, \"/path/for/file\",\n"
5505 "                        AT_SYMLINK_FOLLOW);\n"
5506 msgstr ""
5507 "snprintf(path, PATH_MAX,  \"/proc/self/fd/%d\", fd);\n"
5508 "linkat(AT_FDCWD, path, AT_FDCWD, \"/path/for/file\",\n"
5509 "                        AT_SYMLINK_FOLLOW);\n"
5510
5511 #. type: Plain text
5512 #: build/C/man2/open.2:670
5513 msgid "In this case, the B<open>()  I<mode> argument determines the file permission mode, as with B<O_CREAT>."
5514 msgstr "この場合、 B<open>() の I<mode> 引き数は B<O_CREAT> と同様にファイルのアクセス許可モードの決定に使われる。"
5515
5516 #. type: Plain text
5517 #: build/C/man2/open.2:682
5518 msgid "Specifying B<O_EXCL> in conjunction with B<O_TMPFILE> prevents a temporary file from being linked into the filesystem in the above manner.  (Note that the meaning of B<O_EXCL> in this case is different from the meaning of B<O_EXCL> otherwise.)"
5519 msgstr "B<O_TMPFILE> とともに B<O_EXCL> を指定すると、 一時ファイルに対して上記の方法でファイルシステムへのリンクを行うことができなくなる (この場合の B<O_EXCL> の意味は他の場合の B<O_EXCL> の意味とは異なる点に注意)。"
5520
5521 #.  Inspired by http://lwn.net/Articles/559147/
5522 #. type: Plain text
5523 #: build/C/man2/open.2:687
5524 msgid "There are two main use cases for B<O_TMPFILE>:"
5525 msgstr "B<O_TMPFILE> には主に二つの用途がある。"
5526
5527 #. type: Plain text
5528 #: build/C/man2/open.2:696
5529 msgid "Improved B<tmpfile>(3)  functionality: race-free creation of temporary files that (1) are automatically deleted when closed; (2) can never be reached via any pathname; (3) are not subject to symlink attacks; and (4) do not require the caller to devise unique names."
5530 msgstr "改善された B<tmpfile>(3) の機能: (1) クローズ時に自動的に削除される、 (2) パス名では決して参照できない、 (3) シンボリックリンク攻撃ができない、 (4) 呼び出し元が一意な名前を考える必要がない、 という特長を持つ競合のない一時ファイルの作成。"
5531
5532 #. type: Plain text
5533 #: build/C/man2/open.2:707
5534 msgid "Creating a file that is initially invisible, which is then populated with data and adjusted to have appropriate filesystem attributes (B<chown>(2), B<chmod>(2), B<fsetxattr>(2), etc.)  before being atomically linked into the filesystem in a fully formed state (using B<linkat>(2)  as described above)."
5535 msgstr "最初は見えないファイルを作成し、 それからデータを書き込んだり、適切なファイルシステム属性を持つように調整したり (B<chown>(2), B<chmod>(2), B<fsetxattr>(2) など) した後、 準備が全て整った状態で (上述の B<linkat>(2) を使って) ファイルシステム内にアトミックにリンクを行う。"
5536
5537 #.  commit 99b6436bc29e4f10e4388c27a3e4810191cc4788
5538 #.  commit ab29743117f9f4c22ac44c13c1647fb24fb2bafe
5539 #. type: Plain text
5540 #: build/C/man2/open.2:718
5541 msgid "B<O_TMPFILE> requires support by the underlying filesystem; only a subset of Linux filesystems provide that support.  In the initial implementation, support was provided in the ext2, ext3, ext4, UDF, Minix, and shmem filesystems.  XFS support was added in Linux 3.15."
5542 msgstr "B<O_TMPFILE> は、 裏で利用されるファイルシステムによるサポートが必要である。 一部の Linux ファイルシステムだけがこの機能をサポートしている。 最初の実装では、 ext2, ext3, ext4, UDF, Minix, shmem ファイルシステムがサポートしていた。 XFS でのサポートが Linux 3.15 で追加された。"
5543
5544 #. type: TP
5545 #: build/C/man2/open.2:718
5546 #, no-wrap
5547 msgid "B<O_TRUNC>"
5548 msgstr "B<O_TRUNC>"
5549
5550 #. type: Plain text
5551 #: build/C/man2/open.2:732
5552 msgid "If the file already exists and is a regular file and the access mode allows writing (i.e., is B<O_RDWR> or B<O_WRONLY>)  it will be truncated to length 0.  If the file is a FIFO or terminal device file, the B<O_TRUNC> flag is ignored.  Otherwise, the effect of B<O_TRUNC> is unspecified."
5553 msgstr "ファイルが既に存在し、通常ファイルであり、 アクセスモードで書き込みが許可されている (つまり、 B<O_RDWR> または B<O_WRONLY> の) 場合、長さ 0 に切り詰め (truncate) られる。 ファイルが FIFO または端末デバイスファイルの場合、 B<O_TRUNC> フラグは無視される。 それ以外の場合、 B<O_TRUNC> の効果は未定義である。"
5554
5555 #. type: SS
5556 #: build/C/man2/open.2:732
5557 #, no-wrap
5558 msgid "creat()"
5559 msgstr "creat()"
5560
5561 #. type: Plain text
5562 #: build/C/man2/open.2:740
5563 msgid "B<creat>()  is equivalent to B<open>()  with I<flags> equal to B<O_CREAT|O_WRONLY|O_TRUNC>."
5564 msgstr "B<creat>()  は I<flags> に B<O_CREAT|O_WRONLY|O_TRUNC> を指定して B<open>()  を行うのと等価である。"
5565
5566 #. type: SS
5567 #: build/C/man2/open.2:740
5568 #, no-wrap
5569 msgid "openat()"
5570 msgstr "openat()"
5571
5572 #. type: Plain text
5573 #: build/C/man2/open.2:746
5574 msgid "The B<openat>()  system call operates in exactly the same way as B<open>(), except for the differences described here."
5575 msgstr "B<openat>() システムコールは B<open>() と全く同様に動作するが、以下で説明する点が異なる。"
5576
5577 #. type: Plain text
5578 #: build/C/man2/open.2:756
5579 msgid "If the pathname given in I<pathname> is relative, then it is interpreted relative to the directory referred to by the file descriptor I<dirfd> (rather than relative to the current working directory of the calling process, as is done by B<open>()  for a relative pathname)."
5580 msgstr "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される (B<open>() に相対パス名を渡した場合のように、呼び出したプロセスのカレントワーキングディレクトリに対する相対パスではない)。"
5581
5582 #. type: Plain text
5583 #: build/C/man2/open.2:768
5584 msgid "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, then I<pathname> is interpreted relative to the current working directory of the calling process (like B<open>())."
5585 msgstr "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> の場合、 (B<open>() と同様に) I<pathname> は呼び出したプロセスのカレントワーキングディレクトリに対する相対パスと解釈される。"
5586
5587 #. type: Plain text
5588 #: build/C/man2/open.2:774 build/C/man2/readlink.2:134
5589 msgid "If I<pathname> is absolute, then I<dirfd> is ignored."
5590 msgstr "I<pathname> で指定されたパス名が絶対パスの場合、 I<dirfd> は無視される。"
5591
5592 #. type: Plain text
5593 #: build/C/man2/open.2:783
5594 msgid "B<open>(), B<openat>(), and B<creat>()  return the new file descriptor, or -1 if an error occurred (in which case, I<errno> is set appropriately)."
5595 msgstr "B<open>(), B<openat>(), B<creat>() は新しいファイルディスクリプタを返す。 エラーが発生した場合は -1 を返す (その場合は I<errno> が適切に設定される)。"
5596
5597 #. type: Plain text
5598 #: build/C/man2/open.2:789
5599 msgid "B<open>(), B<openat>(), and B<creat>()  can fail with the following errors:"
5600 msgstr "B<open>(), B<openat>(), B<creat>() は以下のエラーで失敗する。"
5601
5602 #. type: Plain text
5603 #: build/C/man2/open.2:798
5604 msgid "The requested access to the file is not allowed, or search permission is denied for one of the directories in the path prefix of I<pathname>, or the file did not exist yet and write access to the parent directory is not allowed.  (See also B<path_resolution>(7).)"
5605 msgstr "ファイルに対する要求されたアクセスが許されていないか、 I<pathname> のディレクトリ部分の何れかのディレクトリに検索許可がなかった。 またはファイルが存在せず、親ディレクトリへの書き込み許可がなかった。 (B<path_resolution>(7)  も参照すること。)"
5606
5607 #. type: Plain text
5608 #: build/C/man2/open.2:804
5609 msgid "Where B<O_CREAT> is specified, the file does not exist, and the user's quota of disk blocks or inodes on the filesystem has been exhausted."
5610 msgstr "B<O_CREAT> が指定された場合で、そのファイルが存在せず、ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。"
5611
5612 #. type: Plain text
5613 #: build/C/man2/open.2:810
5614 msgid "I<pathname> already exists and B<O_CREAT> and B<O_EXCL> were used."
5615 msgstr "I<pathname> は既に存在し、 B<O_CREAT> と B<O_EXCL> が使用された。"
5616
5617 #. type: Plain text
5618 #: build/C/man2/open.2:814 build/C/man2/rmdir.2:67 build/C/man2/unlink.2:182
5619 msgid "I<pathname> points outside your accessible address space."
5620 msgstr "I<pathname> がアクセス可能なアドレス空間の外を指している。"
5621
5622 #. type: TP
5623 #: build/C/man2/open.2:814 build/C/man2/write.2:145
5624 #, no-wrap
5625 msgid "B<EFBIG>"
5626 msgstr "B<EFBIG>"
5627
5628 #. type: Plain text
5629 #: build/C/man2/open.2:818
5630 msgid "See B<EOVERFLOW>."
5631 msgstr "B<EOVERFLOW> 参照。"
5632
5633 #. type: TP
5634 #: build/C/man2/open.2:818 build/C/man2/read.2:122 build/C/man3/scanf.3:561
5635 #: build/C/man3/tmpfile.3:63 build/C/man2/write.2:150
5636 #, no-wrap
5637 msgid "B<EINTR>"
5638 msgstr "B<EINTR>"
5639
5640 #. type: Plain text
5641 #: build/C/man2/open.2:825
5642 msgid "While blocked waiting to complete an open of a slow device (e.g., a FIFO; see B<fifo>(7)), the call was interrupted by a signal handler; see B<signal>(7)."
5643 msgstr "遅いデバイス (例えば FIFO、 B<fifo>(7)  参照) のオープンが完了するのを待って停止している間に システムコールがシグナルハンドラにより割り込まれた。 B<signal>(7)  参照。"
5644
5645 #. type: Plain text
5646 #: build/C/man2/open.2:833
5647 msgid "The filesystem does not support the B<O_DIRECT> flag.  See B<NOTES> for more information."
5648 msgstr "ファイルシステムが B<O_DIRECT> フラグをサポートしていない。 詳細はB<注意>を参照。"
5649
5650 #.  In particular, __O_TMPFILE instead of O_TMPFILE
5651 #. type: Plain text
5652 #: build/C/man2/open.2:838
5653 msgid "Invalid value in I<flags>."
5654 msgstr "I<flags> に無効な値が入っている。"
5655
5656 #. type: Plain text
5657 #: build/C/man2/open.2:848
5658 msgid "B<O_TMPFILE> was specified in I<flags>, but neither B<O_WRONLY> nor B<O_RDWR> was specified."
5659 msgstr "I<flags> に B<O_TMPFILE> が指定されたが、 B<O_WRONLY> も B<O_RDWR> も指定されていなかった。"
5660
5661 #. type: TP
5662 #: build/C/man2/open.2:848 build/C/man2/open.2:857 build/C/man2/read.2:158
5663 #: build/C/man2/rename.2:255 build/C/man2/unlink.2:185
5664 #: build/C/man2/unlink.2:256
5665 #, no-wrap
5666 msgid "B<EISDIR>"
5667 msgstr "B<EISDIR>"
5668
5669 #. type: Plain text
5670 #: build/C/man2/open.2:857
5671 msgid "I<pathname> refers to a directory and the access requested involved writing (that is, B<O_WRONLY> or B<O_RDWR> is set)."
5672 msgstr "I<pathname> はディレクトリを参照しており、書き込み要求が含まれていた (つまり B<O_WRONLY> または B<O_RDWR> が設定されている)。"
5673
5674 #. type: Plain text
5675 #: build/C/man2/open.2:871
5676 msgid "I<pathname> refers to an existing directory, B<O_TMPFILE> and one of B<O_WRONLY> or B<O_RDWR> were specified in I<flags>, but this kernel version does not provide the B<O_TMPFILE> functionality."
5677 msgstr "I<pathname> が存在するディレクトリを参照していて、 B<O_TMPFILE> および B<O_WRONLY> と B<O_RDWR> の一方が I<flags> に指定されていたが、 このカーネルバージョンでは B<O_TMPFILE> 機能が提供されていない。"
5678
5679 #. type: Plain text
5680 #: build/C/man2/open.2:875 build/C/man2/rmdir.2:77
5681 msgid "Too many symbolic links were encountered in resolving I<pathname>."
5682 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
5683
5684 #. type: Plain text
5685 #: build/C/man2/open.2:884
5686 msgid "I<pathname> was a symbolic link, and I<flags> specified B<O_NOFOLLOW> but not B<O_PATH>."
5687 msgstr "I<pathname> がシンボリックリンクで、 I<flags> に B<O_NOFOLLOW> が指定されたが、 B<O_PATH> が指定されていなかった。"
5688
5689 #. type: TP
5690 #: build/C/man2/open.2:884 build/C/man2/pipe.2:148 build/C/man3/tmpfile.3:66
5691 #, no-wrap
5692 msgid "B<EMFILE>"
5693 msgstr "B<EMFILE>"
5694
5695 #. type: Plain text
5696 #: build/C/man2/open.2:891
5697 msgid "The process already has the maximum number of files open (see the description of B<RLIMIT_NOFILE> in B<getrlimit>(2))."
5698 msgstr "プロセスがオープンしているファイル数がすでに最大数に達している (B<getrlimit>(2) の B<RLIMIT_NOFILE> の説明を参照)。"
5699
5700 #. type: Plain text
5701 #: build/C/man2/open.2:895 build/C/man2/rmdir.2:80 build/C/man2/unlink.2:197
5702 msgid "I<pathname> was too long."
5703 msgstr "I<pathname> が長過ぎる。"
5704
5705 #. type: TP
5706 #: build/C/man2/open.2:895 build/C/man2/pipe.2:151 build/C/man3/tmpfile.3:69
5707 #, no-wrap
5708 msgid "B<ENFILE>"
5709 msgstr "B<ENFILE>"
5710
5711 #. type: Plain text
5712 #: build/C/man2/open.2:898 build/C/man2/pipe.2:154
5713 msgid "The system limit on the total number of open files has been reached."
5714 msgstr "オープンされているファイルの総数がシステムの制限に達している。"
5715
5716 #. type: TP
5717 #: build/C/man2/open.2:898
5718 #, no-wrap
5719 msgid "B<ENODEV>"
5720 msgstr "B<ENODEV>"
5721
5722 #. type: Plain text
5723 #: build/C/man2/open.2:905
5724 msgid "I<pathname> refers to a device special file and no corresponding device exists.  (This is a Linux kernel bug; in this situation B<ENXIO> must be returned.)"
5725 msgstr "I<pathname> がデバイススペシャルファイルを参照しており、対応するデバイスが存在しない。 (これは Linux カーネルのバグであり、この場合には B<ENXIO> が返されるべきである)"
5726
5727 #. type: Plain text
5728 #: build/C/man2/open.2:912
5729 msgid "B<O_CREAT> is not set and the named file does not exist.  Or, a directory component in I<pathname> does not exist or is a dangling symbolic link."
5730 msgstr "B<O_CREAT> が設定されておらず、かつ指定されたファイルが存在しない。 または、 I<pathname> のディレクトリ部分が存在しないか壊れた (dangling) シンボリックリンクである。"
5731
5732 #. type: Plain text
5733 #: build/C/man2/open.2:926
5734 msgid "I<pathname> refers to a nonexistent directory, B<O_TMPFILE> and one of B<O_WRONLY> or B<O_RDWR> were specified in I<flags>, but this kernel version does not provide the B<O_TMPFILE> functionality."
5735 msgstr "I<pathname> が存在しないディレクトリを参照していて、 B<O_TMPFILE> および B<O_WRONLY> と B<O_RDWR> の一方が I<flags> に指定されていたが、 このカーネルバージョンでは B<O_TMPFILE> 機能が提供されていない。"
5736
5737 #. type: Plain text
5738 #: build/C/man2/open.2:935
5739 msgid "I<pathname> was to be created but the device containing I<pathname> has no room for the new file."
5740 msgstr "I<pathname> を作成する必要があるが、 I<pathname> を含んでいるデバイスに新しいファイルのための空き容量がない。"
5741
5742 #. type: Plain text
5743 #: build/C/man2/open.2:942
5744 msgid "A component used as a directory in I<pathname> is not, in fact, a directory, or B<O_DIRECTORY> was specified and I<pathname> was not a directory."
5745 msgstr "I<pathname> に含まれるディレクトリ部分のどれかが実際にはディレクトリでない。 または B<O_DIRECTORY> が指定されており、 I<pathname> がディレクトリでない。"
5746
5747 #. type: Plain text
5748 #: build/C/man2/open.2:948
5749 msgid "B<O_NONBLOCK> | B<O_WRONLY> is set, the named file is a FIFO, and no process has the FIFO open for reading.  Or, the file is a device special file and no corresponding device exists."
5750 msgstr "B<O_NONBLOCK> | B<O_WRONLY> が設定されており、指定したファイルが FIFO で そのファイルを読み込み用でオープンしている FIFO が存在しない。 または、ファイルがデバイススペシャルファイルで 対応するデバイスが存在しない。"
5751
5752 #. type: TP
5753 #: build/C/man2/open.2:948 build/C/man2/open_by_handle_at.2:301
5754 #, no-wrap
5755 msgid "B<EOPNOTSUPP>"
5756 msgstr "B<EOPNOTSUPP>"
5757
5758 #. type: Plain text
5759 #: build/C/man2/open.2:954
5760 msgid "The filesystem containing I<pathname> does not support B<O_TMPFILE>."
5761 msgstr "I<pathname> を含んでいるファイルシステムが B<O_TMPFILE> をサポートしていない。"
5762
5763 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=7253
5764 #.  "Open of a large file on 32-bit fails with EFBIG, should be EOVERFLOW"
5765 #.  Reported 2006-10-03
5766 #. type: Plain text
5767 #: build/C/man2/open.2:974
5768 msgid "I<pathname> refers to a regular file that is too large to be opened.  The usual scenario here is that an application compiled on a 32-bit platform without I<-D_FILE_OFFSET_BITS=64> tried to open a file whose size exceeds I<(1E<lt>E<lt>31)-1> bytes; see also B<O_LARGEFILE> above.  This is the error specified by POSIX.1-2001; in kernels before 2.6.24, Linux gave the error B<EFBIG> for this case."
5769 msgstr "I<pathname> が参照しているのが、大き過ぎてオープンできない通常のファイルである。 通常、このエラーが発生するは、32 ビットプラットフォーム上で I<-D_FILE_OFFSET_BITS=64> を指定せずにコンパイルされたアプリケーションが、ファイルサイズが I<(1E<lt>31)-1> バイトを超えるファイルを開こうとした場合である。 上記の B<O_LARGEFILE> も参照。 これは POSIX.1-2001 で規定されているエラーである。 2.6.24 より前のカーネルでは、Linux はこの場合にエラー B<EFBIG> を返していた。"
5770
5771 #.  Strictly speaking, it's the filesystem UID... (MTK)
5772 #. type: Plain text
5773 #: build/C/man2/open.2:982
5774 msgid "The B<O_NOATIME> flag was specified, but the effective user ID of the caller did not match the owner of the file and the caller was not privileged (B<CAP_FOWNER>)."
5775 msgstr "B<O_NOATIME> フラグが指定されたが、呼び出し元の実効ユーザー ID が ファイルの所有者と一致せず、かつ呼び出し元に特権 (B<CAP_FOWNER>)  がない。"
5776
5777 #. type: Plain text
5778 #: build/C/man2/open.2:986 build/C/man2/write.2:177
5779 msgid "The operation was prevented by a file seal; see B<fcntl>(2)."
5780 msgstr "操作が file seal により禁止されている。 B<fcntl>(2)  参照。"
5781
5782 #. type: Plain text
5783 #: build/C/man2/open.2:991
5784 msgid "I<pathname> refers to a file on a read-only filesystem and write access was requested."
5785 msgstr "I<pathname> が読み込み専用のファイルシステム上のファイルを参照しており、 書き込みアクセスが要求された。"
5786
5787 #. type: TP
5788 #: build/C/man2/open.2:991
5789 #, no-wrap
5790 msgid "B<ETXTBSY>"
5791 msgstr "B<ETXTBSY>"
5792
5793 #. type: Plain text
5794 #: build/C/man2/open.2:996
5795 msgid "I<pathname> refers to an executable image which is currently being executed and write access was requested."
5796 msgstr "I<pathname> が現在実行中の実行イメージを参照しており、書き込みが要求された。"
5797
5798 #. type: TP
5799 #: build/C/man2/open.2:996
5800 #, no-wrap
5801 msgid "B<EWOULDBLOCK>"
5802 msgstr "B<EWOULDBLOCK>"
5803
5804 #. type: Plain text
5805 #: build/C/man2/open.2:1003
5806 msgid "The B<O_NONBLOCK> flag was specified, and an incompatible lease was held on the file (see B<fcntl>(2))."
5807 msgstr "B<O_NONBLOCK> フラグが指定されたが、そのファイルには矛盾するリースが設定されていた (B<fcntl>(2)  参照)。"
5808
5809 #. type: Plain text
5810 #: build/C/man2/open.2:1006
5811 msgid "The following additional errors can occur for B<openat>():"
5812 msgstr "B<openat>() では以下のエラーも発生する。"
5813
5814 #. type: Plain text
5815 #: build/C/man2/open.2:1010 build/C/man2/readlink.2:206
5816 #: build/C/man2/unlink.2:252
5817 msgid "I<dirfd> is not a valid file descriptor."
5818 msgstr "I<dirfd> が有効なファイルディスクリプタではない。"
5819
5820 #. type: Plain text
5821 #: build/C/man2/open.2:1016
5822 msgid "I<pathname> is a relative pathname and I<dirfd> is a file descriptor referring to a file other than a directory."
5823 msgstr "I<pathname> が相対パス名で、 I<dirfd> がディレクトリ以外のファイルを参照しているファイルディスクリプタである。"
5824
5825 #. type: Plain text
5826 #: build/C/man2/open.2:1020
5827 msgid "B<openat>()  was added to Linux in kernel 2.6.16; library support was added to glibc in version 2.4."
5828 msgstr "B<openat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポートはバージョン 2.4 で glibc に追加された。"
5829
5830 #. type: Plain text
5831 #: build/C/man2/open.2:1024
5832 msgid "B<open>(), B<creat>()  SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
5833 msgstr "B<open>(), B<creat>()  SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
5834
5835 #. type: Plain text
5836 #: build/C/man2/open.2:1027
5837 msgid "B<openat>(): POSIX.1-2008."
5838 msgstr "B<openat>(): POSIX.1-2008."
5839
5840 #. type: Plain text
5841 #: build/C/man2/open.2:1038
5842 msgid "The B<O_DIRECT>, B<O_NOATIME>, B<O_PATH>, and B<O_TMPFILE> flags are Linux-specific.  One must define B<_GNU_SOURCE> to obtain their definitions."
5843 msgstr "フラグ B<O_DIRECT>, B<O_NOATIME>, B<O_PATH>, B<O_TMPFILE> は Linux 特有のものである。 これらのフラグの定義を得るためには B<_GNU_SOURCE> を定義しなければならない。"
5844
5845 #. type: Plain text
5846 #: build/C/man2/open.2:1053
5847 msgid "The B<O_CLOEXEC>, B<O_DIRECTORY>, and B<O_NOFOLLOW> flags are not specified in POSIX.1-2001, but are specified in POSIX.1-2008.  Since glibc 2.12, one can obtain their definitions by defining either B<_POSIX_C_SOURCE> with a value greater than or equal to 200809L or B<_XOPEN_SOURCE> with a value greater than or equal to 700.  In glibc 2.11 and earlier, one obtains the definitions by defining B<_GNU_SOURCE>."
5848 msgstr "フラグ B<O_CLOEXEC>, B<O_DIRECTORY>, B<O_NOFOLLOW> は POSIX.1-2001 では規定されていないが、 POSIX.1-2008 では規定されている。 glibc 2.12 以降では、これらの定義を得るには、 B<_POSIX_C_SOURCE> を 200809L 以上の値で定義するか、 B<_XOPEN_SOURCE> を 700 以上の値で定義する。 glibc 2.11 以前では、 これらの定義を得るには B<_GNU_SOURCE> を定義する。"
5849
5850 #. type: Plain text
5851 #: build/C/man2/open.2:1064
5852 msgid "As noted in B<feature_test_macros>(7), feature test macros such as B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, and B<_GNU_SOURCE> must be defined before including I<any> header files."
5853 msgstr "B<feature_test_macros>(7) に注意書きがあるように、 B<_POSIX_C_SOURCE>, B<_XOPEN_SOURCE>, B<_GNU_SOURCE> などの機能検査マクロはI<どの>ヘッダーファイルをインクルードするより前に定義しなければならない。"
5854
5855 #. type: Plain text
5856 #: build/C/man2/open.2:1072
5857 msgid "Under Linux, the B<O_NONBLOCK> flag indicates that one wants to open but does not necessarily have the intention to read or write.  This is typically used to open devices in order to get a file descriptor for use with B<ioctl>(2)."
5858 msgstr "Linux では、 B<O_NONBLOCK> フラグは、 open を実行したいが read または write を実行する意図は 必ずしもないことを意味する。 これは B<ioctl>(2)  のためのファイルディスクリプタを取得するために、 デバイスをオープンするときによく用いられる。"
5859
5860 #.  Linux 2.0, 2.5: truncate
5861 #.  Solaris 5.7, 5.8: truncate
5862 #.  Irix 6.5: truncate
5863 #.  Tru64 5.1B: truncate
5864 #.  HP-UX 11.22: truncate
5865 #.  FreeBSD 4.7: truncate
5866 #. type: Plain text
5867 #: build/C/man2/open.2:1084
5868 msgid "The (undefined) effect of B<O_RDONLY | O_TRUNC> varies among implementations.  On many systems the file is actually truncated."
5869 msgstr "B<O_RDONLY | O_TRUNC> の影響は未定義であり、その動作は実装によって異なる。 多くのシステムではファイルは実際に切り詰められる。"
5870
5871 #. type: Plain text
5872 #: build/C/man2/open.2:1092
5873 msgid "Note that B<open>()  can open device special files, but B<creat>()  cannot create them; use B<mknod>(2)  instead."
5874 msgstr "B<open>()  はスペシャルファイルをオープンすることができるが、 B<creat>()  でスペシャルファイルを作成できない点に注意すること。 代わりに B<mknod>(2)  を使用する。"
5875
5876 #. type: Plain text
5877 #: build/C/man2/open.2:1113
5878 msgid "If the file is newly created, its I<st_atime>, I<st_ctime>, I<st_mtime> fields (respectively, time of last access, time of last status change, and time of last modification; see B<stat>(2))  are set to the current time, and so are the I<st_ctime> and I<st_mtime> fields of the parent directory.  Otherwise, if the file is modified because of the B<O_TRUNC> flag, its st_ctime and st_mtime fields are set to the current time."
5879 msgstr "ファイルが新しく作成されると、 ファイルの I<st_atime>, I<st_ctime>, I<st_mtime> フィールド (それぞれ最終アクセス時刻、最終状態変更時刻、最終修正時刻である。 B<stat>(2)  参照) が現在時刻に設定される。 さらに親ディレクトリの I<st_ctime> と I<st_mtime> も現在時刻に設定される。 それ以外の場合で、O_TRUNC フラグでファイルが修正されたときは、 ファイルの I<st_ctime> と I<st_mtime> フィールドが現在時刻に設定される。"
5880
5881 #. type: SS
5882 #: build/C/man2/open.2:1113
5883 #, no-wrap
5884 msgid "Open file descriptions"
5885 msgstr "オープンファイル記述"
5886
5887 #. type: Plain text
5888 #: build/C/man2/open.2:1121
5889 msgid "The term open file description is the one used by POSIX to refer to the entries in the system-wide table of open files.  In other contexts, this object is variously also called an \"open file object\", a \"file handle\", an \"open file table entry\", or\\(emin kernel-developer parlance\\(ema I<struct file>."
5890 msgstr "オープンファイル記述という用語は POSIX で使用されている用語で、オープンされているファイルのシステム共通のテーブルのエントリーを参照するものである。 別の文脈では、このオブジェクトはいろいろな呼び方があり、 「オープンファイルオブジェクト」、「ファイルハンドル」、「オープンファイルテーブルエントリー」、 カーネル開発者の用語では I<struct file> などと呼ばれる。"
5891
5892 #. type: Plain text
5893 #: build/C/man2/open.2:1134
5894 msgid "When a file descriptor is duplicated (using B<dup>(2)  or similar), the duplicate refers to the same open file description as the original file descriptor, and the two file descriptors consequently share the file offset and file status flags.  Such sharing can also occur between processes: a child process created via B<fork>(2)  inherits duplicates of its parent's file descriptors, and those duplicates refer to the same open file descriptions."
5895 msgstr "ファイルディスクリプタが (B<dup>(2) や同様のシステムコールを使って) 複製される際に、 複製されたファイルディスクリプタは元のファイルディスクリプタと同じオープンファイル記述を参照する。 結果として 2 つのファイルディスクリプタはファイルオフセットとファイル状態フラグを共有する。 このような共有はプロセス間でも起こり得る。 B<fork>(2) で作成された子プロセスは親プロセスのファイルディスクリプタの複製を継承し、これらの複製は同じオープンファイル記述を参照する。"
5896
5897 #. type: Plain text
5898 #: build/C/man2/open.2:1142
5899 msgid "Each B<open>(2)  of a file creates a new open file description; thus, there may be multiple open file descriptions corresponding to a file inode."
5900 msgstr "1 つのファイルに対して B<open>(2) を行う毎に、新しいオープンファイル記述が作成される。 したがって、 1 つのファイル inode に対して複数のオープンファイル記述が存在することがありえる。"
5901
5902 #. type: SS
5903 #: build/C/man2/open.2:1142
5904 #, no-wrap
5905 msgid "Synchronized I/O"
5906 msgstr "同期 I/O"
5907
5908 #. type: Plain text
5909 #: build/C/man2/open.2:1157
5910 msgid "The POSIX.1-2008 \"synchronized I/O\" option specifies different variants of synchronized I/O, and specifies the B<open>()  flags B<O_SYNC>, B<O_DSYNC>, and B<O_RSYNC> for controlling the behavior.  Regardless of whether an implementation supports this option, it must at least support the use of B<O_SYNC> for regular files."
5911 msgstr "POSIX.1-2008 の「同期 I/O」の選択肢として複数種類が規定されており、 動作を制御するために B<open>() フラグとして B<O_SYNC>, B<O_DSYNC>, B<O_RSYNC> が規定されている。 この選択肢を実装がサポートしているかに関わらず、 各実装では少なくとも通常のファイルに対して B<O_SYNC> が利用できなければならない。"
5912
5913 #. type: Plain text
5914 #: build/C/man2/open.2:1168
5915 msgid "Linux implements B<O_SYNC> and B<O_DSYNC>, but not B<O_RSYNC>.  (Somewhat incorrectly, glibc defines B<O_RSYNC> to have the same value as B<O_SYNC>.)"
5916 msgstr "Linux は B<O_SYNC> と B<O_DSYNC> を実装しているが、 B<O_RSYNC> は実装していない (少し間違っているのだが、 glibc では B<O_RSYNC> が B<O_SYNC> と同じ値で定義されている)。"
5917
5918 #. type: Plain text
5919 #: build/C/man2/open.2:1186
5920 msgid "B<O_SYNC> provides synchronized I/O I<file> integrity completion, meaning write operations will flush data and all associated metadata to the underlying hardware.  B<O_DSYNC> provides synchronized I/O I<data> integrity completion, meaning write operations will flush data to the underlying hardware, but will only flush metadata updates that are required to allow a subsequent read operation to complete successfully.  Data integrity completion can reduce the number of disk operations that are required for applications that don't need the guarantees of file integrity completion."
5921 msgstr "B<O_SYNC> は、 同期 I/O でのI<ファイル>完全性完了を提供する。 つまり、 書き込み操作はデータとすべての関連メタデータを裏で利用されているハードウェアにフラッシュすることを意味する。 B<O_DSYNC> は、 同期 I/O でのI<データ>完全性完了を提供する。 つまり、 書き込み操作はデータを裏で利用されているハードウェアにフラッシュするが、 それ以降の読み出し操作が正常に完了するのに必要なメタデータの更新のみをフラッシュする。 データ完全性完了は、 ファイル完全性完了を必要としないアプリケーションで、 ディスク操作の数を減らすことができる。"
5922
5923 #. type: Plain text
5924 #: build/C/man2/open.2:1203
5925 msgid "To understand the difference between the two types of completion, consider two pieces of file metadata: the file last modification timestamp (I<st_mtime>)  and the file length.  All write operations will update the last file modification timestamp, but only writes that add data to the end of the file will change the file length.  The last modification timestamp is not needed to ensure that a read completes successfully, but the file length is.  Thus, B<O_DSYNC> would only guarantee to flush updates to the file length metadata (whereas B<O_SYNC> would also always flush the last modification timestamp metadata)."
5926 msgstr "2 種類の完了の違いを理解するために、 ファイルメタデータの 2 つの要素、 ファイルの最終修正時刻 (I<st_mtime>) とファイル長、を考える。 すべての書き込み操作は最終修正時刻を更新するが、 ファイルの末尾にデータを追加する書き込み操作のみがファイル長を変更する。 最終修正時刻は、 読み出しが正常に完了するのに必要ではないが、 ファイル長は必要である。 したがって、 B<O_DSYNC> はファイル長のメタデータの更新がフラッシュされることだけを保証する (これに対して B<O_SYNC> では最終修正時刻のメタデータも常にフラッシュされる)。"
5927
5928 #. type: Plain text
5929 #: build/C/man2/open.2:1215
5930 msgid "Before Linux 2.6.33, Linux implemented only the B<O_SYNC> flag for B<open>().  However, when that flag was specified, most filesystems actually provided the equivalent of synchronized I/O I<data> integrity completion (i.e., B<O_SYNC> was actually implemented as the equivalent of B<O_DSYNC>)."
5931 msgstr "Linux 2.6.33 より前では、 Linux は B<open>() では B<O_SYNC> フラグのみを実装していた。 しかしながら、 このフラグが指定された場合、 ほとんどのファイルシステムで提供されていたのは実際には同期 I/O でのI<データ>完全性完了と等価なものであった (つまり、 B<O_SYNC> は実際には B<O_DSYNC> と等価なものとして実装されていた)。"
5932
5933 #. type: Plain text
5934 #: build/C/man2/open.2:1234
5935 msgid "Since Linux 2.6.33, proper B<O_SYNC> support is provided.  However, to ensure backward binary compatibility, B<O_DSYNC> was defined with the same value as the historical B<O_SYNC>, and B<O_SYNC> was defined as a new (two-bit) flag value that includes the B<O_DSYNC> flag value.  This ensures that applications compiled against new headers get at least B<O_DSYNC> semantics on pre-2.6.33 kernels."
5936 msgstr "Linux 2.6.33 行こう では、 正しい B<O_SYNC> のサポートが提供されている。 しかしながら、 バイナリレベルの後方互換性を保証するため、 B<O_DSYNC> は以前の B<O_SYNC> と同じ値で定義されており、 B<O_SYNC> は B<O_DSYNC> フラグの値を含む新しい (2 ビットの) フラグ値として定義されている。 これにより、 新しいヘッダを使ってコンパイルされたアプリケーションで、 2.6.33 より前のカーネルで少なくとも B<O_DSYNC> の動作は同じになることが保証される。"
5937
5938 #. type: SS
5939 #: build/C/man2/open.2:1234
5940 #, no-wrap
5941 msgid "NFS"
5942 msgstr "NFS"
5943
5944 #. type: Plain text
5945 #: build/C/man2/open.2:1238
5946 msgid "There are many infelicities in the protocol underlying NFS, affecting amongst others B<O_SYNC> and B<O_NDELAY>."
5947 msgstr "NFS を実現しているプロトコルには多くの不備があり、特に B<O_SYNC> と B<O_NDELAY> に影響する。"
5948
5949 #. type: Plain text
5950 #: build/C/man2/open.2:1253
5951 msgid "On NFS filesystems with UID mapping enabled, B<open>()  may return a file descriptor but, for example, B<read>(2)  requests are denied with B<EACCES>.  This is because the client performs B<open>()  by checking the permissions, but UID mapping is performed by the server upon read and write requests."
5952 msgstr "UID マッピングを使用している NFS ファイルシステムでは、 B<open>()  がファイルディスクリプタを返した場合でも B<read>(2)  が B<EACCES> で拒否される場合がある。 これはクライアントがアクセス許可のチェックを行って B<open>()  を実行するが、読み込みや書き込みの際には サーバーで UID マッピングが行われるためである。"
5953
5954 #. type: SS
5955 #: build/C/man2/open.2:1253
5956 #, no-wrap
5957 msgid "File access mode"
5958 msgstr "ファイルアクセスモード"
5959
5960 #. type: Plain text
5961 #: build/C/man2/open.2:1268
5962 msgid "Unlike the other values that can be specified in I<flags>, the I<access mode> values B<O_RDONLY>, B<O_WRONLY>, and B<O_RDWR> do not specify individual bits.  Rather, they define the low order two bits of I<flags>, and are defined respectively as 0, 1, and 2.  In other words, the combination B<O_RDONLY | O_WRONLY> is a logical error, and certainly does not have the same meaning as B<O_RDWR>."
5963 msgstr "「アクセスモード」の値 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> は、 I<flags> に指定できる他の値と違い、個々のビットを指定するものではなく、 これらの値は I<flags> の下位 2 ビットを定義する。 B<O_RDONLY>, B<O_WRONLY>, B<O_RDWR> はそれぞれ 0, 1, 2 に定義されている。 言い換えると、 B<O_RDONLY | O_WRONLY> の組み合わせは論理的に間違いであり、確かに B<O_RDWR> と同じ意味ではない。"
5964
5965 #.  See for example util-linux's disk-utils/setfdprm.c
5966 #.  For some background on access mode 3, see
5967 #.  http://thread.gmane.org/gmane.linux.kernel/653123
5968 #.  "[RFC] correct flags to f_mode conversion in __dentry_open"
5969 #.  LKML, 12 Mar 2008
5970 #. type: Plain text
5971 #: build/C/man2/open.2:1285
5972 msgid "Linux reserves the special, nonstandard access mode 3 (binary 11) in I<flags> to mean: check for read and write permission on the file and return a descriptor that can't be used for reading or writing.  This nonstandard access mode is used by some Linux drivers to return a descriptor that is to be used only for device-specific B<ioctl>(2)  operations."
5973 msgstr "Linux では、特別な、非標準なアクセスモードとして 3 (バイナリでは 11) が 予約されており I<flags> に指定できる。 このアクセスモードを指定すると、ファイルの読み出し/書き込み許可をチェックし、 読み出しにも書き込みにも使用できないディスクリプタを返す。 この非標準のアクセスモードはいくつかの Linux ドライバで、デバイス固有の B<ioctl>(2) 操作にのみ使用されるディスクリプタを返すために使われている。"
5974
5975 #. type: SS
5976 #: build/C/man2/open.2:1285
5977 #, no-wrap
5978 msgid "Rationale for openat() and other directory file descriptor APIs"
5979 msgstr "openat() や他のディレクトリファイルディスクリプタ API の基本原理"
5980
5981 #. type: Plain text
5982 #: build/C/man2/open.2:1314
5983 msgid "B<openat>()  and the other system calls and library functions that take a directory file descriptor argument (i.e., B<execveat>(2), B<faccessat>(2), B<fanotify_mark>(2), B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), B<futimesat>(2), B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), B<name_to_handle_at>(2), B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), B<unlinkat>(2), B<utimensat>(2)  B<mkfifoat>(3), and B<scandirat>(3))  are supported for two reasons.  Here, the explanation is in terms of the B<openat>()  call, but the rationale is analogous for the other interfaces."
5984 msgstr "B<openat>() やディレクトリファイルディスクリプタを引き数を取る他のシステムコールやライブラリ関数 (B<execveat>(2), B<faccessat>(2), B<fanotify_mark>(2), B<fchmodat>(2), B<fchownat>(2), B<fstatat>(2), B<futimesat>(2), B<linkat>(2), B<mkdirat>(2), B<mknodat>(2), B<name_to_handle_at>(2), B<readlinkat>(2), B<renameat>(2), B<symlinkat>(2), B<unlinkat>(2), B<utimensat>(2) B<mkfifoat>(3), B<scandirat>(3)) は二つの理由から用意されている。 ここでは、 B<openat> コールに関して説明するが、この基本原理は他のインターフェースでも同じである。"
5985
5986 #. type: Plain text
5987 #: build/C/man2/open.2:1345
5988 msgid "First, B<openat>()  allows an application to avoid race conditions that could occur when using B<open>()  to open files in directories other than the current working directory.  These race conditions result from the fact that some component of the directory prefix given to B<open>()  could be changed in parallel with the call to B<open>().  Suppose, for example, that we wish to create the file I<path/to/xxx.dep> if the file I<path/to/xxx> exists.  The problem is that between the existence check and the file creation step, I<path> or I<to> (which might be symbolic links)  could be modified to point to a different location.  Such races can be avoided by opening a file descriptor for the target directory, and then specifying that file descriptor as the I<dirfd> argument of (say)  B<fstatat>(2)  and B<openat>()."
5989 msgstr "最初の理由として、 B<openat>() を使うと、 アプリケーションは、 カレントワーキングディレクトリ以外のディレクトリで B<open>() を使ってファイルをオープンする際に起こり得る競合条件を避けることができる。 これらの競合条件は、 B<open>() に渡されたディレクトリプレフィックスの構成要素が B<open>() の呼び出しと並行して変化する可能性があるという点に由来している。 例えば、ファイル I<path/to/xxx> が存在する場合にファイル I<path/to/xxx.dep> を作成したいとする。 問題は、存在確認とファイル作成の間に、 I<path> や I<to> (シンボリックリンクでもよい) が別の場所を指すように変更されることがあるということだ。 このような競合条件は、 対象のディレクトリに対するファイルディスクリプタをオープンし、 それから B<fstatat>(2) や B<openat>() の I<dirfd> 引き数としてそのファイルディスクリプタを指定することで、 避けることができる。"
5990
5991 #. type: Plain text
5992 #: build/C/man2/open.2:1356
5993 msgid "Second, B<openat>()  allows the implementation of a per-thread \"current working directory\", via file descriptor(s) maintained by the application.  (This functionality can also be obtained by tricks based on the use of I</proc/self/fd/>dirfd, but less efficiently.)"
5994 msgstr "二つ目として、 B<openat>() を使うと、アプリケーションが管理するファイルディスクリプタにより、 スレッド単位の「カレントワーキングディレクトリ」を実装することができる (この機能は、 I</proc/self/fd/dirfd> を使った方法でも実現することができるが、 効率の面で落とる)。"
5995
5996 #. type: SS
5997 #: build/C/man2/open.2:1356
5998 #, no-wrap
5999 msgid "O_DIRECT"
6000 msgstr "O_DIRECT"
6001
6002 #. type: Plain text
6003 #: build/C/man2/open.2:1373
6004 msgid "The B<O_DIRECT> flag may impose alignment restrictions on the length and address of user-space buffers and the file offset of I/Os.  In Linux alignment restrictions vary by filesystem and kernel version and might be absent entirely.  However there is currently no filesystem-independent interface for an application to discover these restrictions for a given file or filesystem.  Some filesystems provide their own interfaces for doing so, for example the B<XFS_IOC_DIOINFO> operation in B<xfsctl>(3)."
6005 msgstr "B<O_DIRECT> フラグを使用する場合、ユーザ空間バッファの長さやアドレス、 I/O のファイルオフセットに関してアラインメントの制限が課されることがある。 Linux では、アラインメントの制限はファイルシステムやカーネルのバージョンに よって異なり、全く制限が存在しない場合もある。 しかしながら、現在のところ、指定されたファイルやファイルシステムに対して こうした制限があるかを見つけるための、アプリケーション向けのインタフェースで ファイルシステム非依存のものは存在しない。 いくつかのファイルシステムでは、制限を確認するための独自のインタフェースが 提供されている。例えば、 B<xfsctl>(3)  の B<XFS_IOC_DIOINFO> 命令である。"
6006
6007 #. type: Plain text
6008 #: build/C/man2/open.2:1383
6009 msgid "Under Linux 2.4, transfer sizes, and the alignment of the user buffer and the file offset must all be multiples of the logical block size of the filesystem.  Since Linux 2.6.0, alignment to the logical block size of the underlying storage (typically 512 bytes) suffices.  The logical block size can be determined using the B<ioctl>(2)  B<BLKSSZGET> operation or from the shell using the command:"
6010 msgstr "Linux 2.4 では、転送サイズ、 ユーザーバッファのアライメント、ファイルオフセットは、 ファイルシステムの論理ブロックサイズの倍数でなければならない。 Linux 2.6.0 以降では、 内部で使われるストレージの論理ブロックサイズのアライメント (通常は 512 バイト) で十分である。 論理ブロックサイズは B<ioctl>(2) B<BLKSSZGET> 操作や以下のシェルコマンドから知ることができる。"
6011
6012 #. type: Plain text
6013 #: build/C/man2/open.2:1385
6014 #, no-wrap
6015 msgid "    blockdev --getss\n"
6016 msgstr "    blockdev --getss\n"
6017
6018 #. type: Plain text
6019 #: build/C/man2/open.2:1419
6020 msgid "B<O_DIRECT> I/Os should never be run concurrently with the B<fork>(2)  system call, if the memory buffer is a private mapping (i.e., any mapping created with the B<mmap>(2)  B<MAP_PRIVATE> flag; this includes memory allocated on the heap and statically allocated buffers).  Any such I/Os, whether submitted via an asynchronous I/O interface or from another thread in the process, should be completed before B<fork>(2)  is called.  Failure to do so can result in data corruption and undefined behavior in parent and child processes.  This restriction does not apply when the memory buffer for the B<O_DIRECT> I/Os was created using B<shmat>(2)  or B<mmap>(2)  with the B<MAP_SHARED> flag.  Nor does this restriction apply when the memory buffer has been advised as B<MADV_DONTFORK> with B<madvise>(2), ensuring that it will not be available to the child after B<fork>(2)."
6021 msgstr ""
6022 "メモリバッファがプライベートマッピング (B<mmap>(2) の B<MAP_PRIVATE>\n"
6023 "フラグで作成されたマッピング) の場合には、B<O_DIRECT> I/O は\n"
6024 "B<fork>(2) システムコールと同時に決して実行すべきではない \n"
6025 "(プライベートマッピングには、ヒープ領域に割り当てられたメモリや静的に\n"
6026 "割り当てたバッファも含まれる)。非同期 I/O インターフェース (AIO) 経由\n"
6027 "やプロセス内の他のスレッドから発行された、このような I/O は、\n"
6028 "B<fork>(2) が呼び出される前に完了されるべきである。\n"
6029 "そうしなかった場合、データ破壊や、親プロセスや子プロセスでの予期しない\n"
6030 "動作が起こる可能性がある。\n"
6031 "B<O_DIRECT> I/O 用のメモリバッファが B<shmat>(2) やB<MAP_SHARED> フラグ\n"
6032 "付きの B<mmap>(2) で作成された場合には、この制限はあてはまらない。\n"
6033 "B<madvise>(2) でメモリバッファにアドバイス B<MADV_DONTFORK> が設定され\n"
6034 "ている場合にも、この制限はあてはまらない(B<MADV_DONTFORK> はそのメモリ\n"
6035 "バッファが B<fork>(2) 後に子プロセスからは利用できないことを保証するも\n"
6036 "のである)。"
6037
6038 #. type: Plain text
6039 #: build/C/man2/open.2:1429
6040 msgid "The B<O_DIRECT> flag was introduced in SGI IRIX, where it has alignment restrictions similar to those of Linux 2.4.  IRIX has also a B<fcntl>(2)  call to query appropriate alignments, and sizes.  FreeBSD 4.x introduced a flag of the same name, but without alignment restrictions."
6041 msgstr "B<O_DIRECT> フラグは SGI IRIX で導入された。SGI IRIX にも Linux 2.4 と同様の (ユーザーバッファの) アラインメントの制限がある。 また、IRIX には適切な配置とサイズを取得するための B<fcntl>(2)  コールがある。 FreeBSD 4.x も同じ名前のフラグを導入したが、アラインメントの制限はない。"
6042
6043 #. type: Plain text
6044 #: build/C/man2/open.2:1438
6045 msgid "B<O_DIRECT> support was added under Linux in kernel version 2.4.10.  Older Linux kernels simply ignore this flag.  Some filesystems may not implement the flag and B<open>()  will fail with B<EINVAL> if it is used."
6046 msgstr "B<O_DIRECT> が Linux でサポートされたのは、カーネルバージョン 2.4.10 である。 古い Linux カーネルは、このフラグを単に無視する。 B<O_DIRECT> フラグをサポートしていないファイルシステムもあり、その場合は、 B<O_DIRECT> を使用すると B<open>()  は B<EINVAL> で失敗する。"
6047
6048 #. type: Plain text
6049 #: build/C/man2/open.2:1449
6050 msgid "Applications should avoid mixing B<O_DIRECT> and normal I/O to the same file, and especially to overlapping byte regions in the same file.  Even when the filesystem correctly handles the coherency issues in this situation, overall I/O throughput is likely to be slower than using either mode alone.  Likewise, applications should avoid mixing B<mmap>(2)  of files with direct I/O to the same files."
6051 msgstr "アプリケーションは、同じファイル、 特に同じファイルの重複するバイト領域に対して、 B<O_DIRECT> と通常の I/O を混ぜて使うのは避けるべきである。 ファイルシステムがこのような状況において一貫性の問題を正しく 扱うことができる場合であっても、全体の I/O スループットは どちらか一方を使用するときと比べて低速になるであろう。 同様に、アプリケーションは、同じファイルに対して B<mmap>(2)  と直接 I/O (B<O_DIRECT>)  を混ぜて使うのも避けるべきである。"
6052
6053 #. type: Plain text
6054 #: build/C/man2/open.2:1471
6055 msgid "The behavior of B<O_DIRECT> with NFS will differ from local filesystems.  Older kernels, or kernels configured in certain ways, may not support this combination.  The NFS protocol does not support passing the flag to the server, so B<O_DIRECT> I/O will bypass the page cache only on the client; the server may still cache the I/O.  The client asks the server to make the I/O synchronous to preserve the synchronous semantics of B<O_DIRECT>.  Some servers will perform poorly under these circumstances, especially if the I/O size is small.  Some servers may also be configured to lie to clients about the I/O having reached stable storage; this will avoid the performance penalty at some risk to data integrity in the event of server power failure.  The Linux NFS client places no alignment restrictions on B<O_DIRECT> I/O."
6056 msgstr "NFS で B<O_DIRECT> を使った場合の動作はローカルのファイルシステムの場合と違う。 古いカーネルや、ある種の設定でコンパイルされたカーネルは、 B<O_DIRECT> と NFS の組み合わせをサポートしていないかもしれない。 NFS プロトコル自体はサーバにフラグを渡す機能は持っていないので、 B<O_DIRECT> I/O はクライアント上のページキャッシュをバイパスするだけになり、 サーバは I/O をキャッシュしているかもしれない。 クライアントは、 B<O_DIRECT> の同期機構を保持するため、サーバに対して I/O を同期して行うように依頼する。 サーバによっては、こうした状況下、特に I/O サイズが小さい場合に 性能が大きく劣化する。 また、サーバによっては、I/O が安定したストレージにまで行われたと、 クライアントに対して嘘をつくものもある。 これは、サーバの電源故障が起こった際にデータの完全性が保たれない 危険は少しあるが、性能面での不利な条件を回避するために行われている。 Linux の NFS クライアントでは B<O_DIRECT> I/O でのアラインメントの制限はない。"
6057
6058 #. type: Plain text
6059 #: build/C/man2/open.2:1478
6060 msgid "In summary, B<O_DIRECT> is a potentially powerful tool that should be used with caution.  It is recommended that applications treat use of B<O_DIRECT> as a performance option which is disabled by default."
6061 msgstr "まとめると、 B<O_DIRECT> は、注意して使うべきであるが、強力なツールとなる可能性を持っている。 アプリケーションは B<O_DIRECT> をデフォルトでは無効になっている性能向上のためのオプションと 考えておくのがよいであろう。"
6062
6063 #. type: Plain text
6064 #: build/C/man2/open.2:1483
6065 msgid "\"The thing that has always disturbed me about O_DIRECT is that the whole interface is just stupid, and was probably designed by a deranged monkey on some serious mind-controlling substances.\"\\(emLinus"
6066 msgstr "「O_DIRECT でいつも困るのは、インタフェース全部が本当にお馬鹿な点だ。 たぶん危ないマインドコントロール剤で 頭がおかしくなったサルが設計したんじゃないかな」 \\(em Linus"
6067
6068 #.  FIXME . Check bugzilla report on open(O_ASYNC)
6069 #.  See http://bugzilla.kernel.org/show_bug.cgi?id=5993
6070 #. type: Plain text
6071 #: build/C/man2/open.2:1495
6072 msgid "Currently, it is not possible to enable signal-driven I/O by specifying B<O_ASYNC> when calling B<open>(); use B<fcntl>(2)  to enable this flag."
6073 msgstr "現在のところ、 B<open>()  の呼び出し時に B<O_ASYNC> を指定してシグナル駆動 I/O を有効にすることはできない。 このフラグを有効にするには B<fcntl>(2)  を使用すること。"
6074
6075 #. type: Plain text
6076 #: build/C/man2/open.2:1503
6077 msgid "One must check for two different error codes, B<EISDIR> and B<ENOENT>, when trying to determine whether the kernel supports B<O_TMPFILE> functionality."
6078 msgstr "カーネルが B<O_TMPFILE> 機能をサポートしているかを判定する際に、 B<EISDIR> と B<ENOENT> の 2 つのエラーコードをチェックしなければならない。"
6079
6080 #. type: Plain text
6081 #: build/C/man2/open.2:1525
6082 msgid "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_handle_at>(2), B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
6083 msgstr "B<chmod>(2), B<chown>(2), B<close>(2), B<dup>(2), B<fcntl>(2), B<link>(2), B<lseek>(2), B<mknod>(2), B<mmap>(2), B<mount>(2), B<open_by_handle_at>(2), B<read>(2), B<socket>(2), B<stat>(2), B<umask>(2), B<unlink>(2), B<write>(2), B<fopen>(3), B<fifo>(7), B<path_resolution>(7), B<symlink>(7)"
6084
6085 #. type: TH
6086 #: build/C/man2/open_by_handle_at.2:25
6087 #, no-wrap
6088 msgid "OPEN_BY_HANDLE_AT"
6089 msgstr "OPEN_BY_HANDLE_AT"
6090
6091 #. type: Plain text
6092 #: build/C/man2/open_by_handle_at.2:29
6093 msgid "name_to_handle_at, open_by_handle_at - obtain handle for a pathname and open file via a handle"
6094 msgstr "name_to_handle_at, open_by_handle_at - パス名に対するハンドルの取得とハンドルによるファイルのオープン"
6095
6096 #. type: Plain text
6097 #: build/C/man2/open_by_handle_at.2:35
6098 #, no-wrap
6099 msgid ""
6100 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
6101 "B<#include E<lt>sys/types.hE<gt>>\n"
6102 "B<#include E<lt>sys/stat.hE<gt>>\n"
6103 "B<#include E<lt>fcntl.hE<gt>>\n"
6104 msgstr ""
6105 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
6106 "B<#include E<lt>sys/types.hE<gt>>\n"
6107 "B<#include E<lt>sys/stat.hE<gt>>\n"
6108 "B<#include E<lt>fcntl.hE<gt>>\n"
6109
6110 #. type: Plain text
6111 #: build/C/man2/open_by_handle_at.2:39
6112 #, no-wrap
6113 msgid ""
6114 "B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
6115 "B<                      struct file_handle *>I<handle>B<,>\n"
6116 "B<                      int *>I<mount_id>B<, int >I<flags>B<);>\n"
6117 msgstr ""
6118 "B<int name_to_handle_at(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
6119 "B<                      struct file_handle *>I<handle>B<,>\n"
6120 "B<                      int *>I<mount_id>B<, int >I<flags>B<);>\n"
6121
6122 #. type: Plain text
6123 #: build/C/man2/open_by_handle_at.2:42
6124 #, no-wrap
6125 msgid ""
6126 "B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
6127 "B<                      int >I<flags>B<);>\n"
6128 msgstr ""
6129 "B<int open_by_handle_at(int >I<mount_fd>B<, struct file_handle *>I<handle>B<,>\n"
6130 "B<                      int >I<flags>B<);>\n"
6131
6132 #. type: Plain text
6133 #: build/C/man2/open_by_handle_at.2:59
6134 msgid "The B<name_to_handle_at>()  and B<open_by_handle_at>()  system calls split the functionality of B<openat>(2)  into two parts: B<name_to_handle_at>()  returns an opaque handle that corresponds to a specified file; B<open_by_handle_at>()  opens the file corresponding to a handle returned by a previous call to B<name_to_handle_at>()  and returns an open file descriptor."
6135 msgstr "システムコール B<name_to_handle_at>() と B<open_by_handle_at>() は B<openat>(2) の機能を 2 つに分割したものである。 B<name_to_handle_at>() は指定されたファイルに対応するハンドルを返す。 B<open_by_handle_at>() は B<name_to_handle_at>() が返したハンドルに対応するファイルをオープンし、 オープンされたファイルディスクリプターを返す。 "
6136
6137 #. type: SS
6138 #: build/C/man2/open_by_handle_at.2:59
6139 #, no-wrap
6140 msgid "name_to_handle_at()"
6141 msgstr "name_to_handle_at()"
6142
6143 #. type: Plain text
6144 #: build/C/man2/open_by_handle_at.2:71
6145 msgid "The B<name_to_handle_at>()  system call returns a file handle and a mount ID corresponding to the file specified by the I<dirfd> and I<pathname> arguments.  The file handle is returned via the argument I<handle>, which is a pointer to a structure of the following form:"
6146 msgstr "B<name_to_handle_at>() システムコールは、 引き数 I<dirfd> と I<pathname> で指定されるファイルに対応するファイルハンドルとマウント ID を返す。 ファイルハンドルは引き数 I<handle> で返される。 I<handle> は以下の形式の構造体へのポインターである。"
6147
6148 #. type: Plain text
6149 #: build/C/man2/open_by_handle_at.2:80
6150 #, no-wrap
6151 msgid ""
6152 "struct file_handle {\n"
6153 "    unsigned int  handle_bytes;   /* Size of f_handle [in, out] */\n"
6154 "    int           handle_type;    /* Handle type [out] */\n"
6155 "    unsigned char f_handle[0];    /* File identifier (sized by\n"
6156 "                                     caller) [out] */\n"
6157 "};\n"
6158 msgstr ""
6159 "struct file_handle {\n"
6160 "    unsigned int  handle_bytes;   /* Size of f_handle [in, out] */\n"
6161 "    int           handle_type;    /* Handle type [out] */\n"
6162 "    unsigned char f_handle[0];    /* File identifier (sized by\n"
6163 "                                     caller) [out] */\n"
6164 "};\n"
6165
6166 #. type: Plain text
6167 #: build/C/man2/open_by_handle_at.2:99
6168 msgid "It is the caller's responsibility to allocate the structure with a size large enough to hold the handle returned in I<f_handle>.  Before the call, the I<handle_bytes> field should be initialized to contain the allocated size for I<f_handle>.  (The constant B<MAX_HANDLE_SZ>, defined in I<E<lt>fcntl.hE<gt>>, specifies the maximum possible size for a file handle.)  Upon successful return, the I<handle_bytes> field is updated to contain the number of bytes actually written to I<f_handle>."
6169 msgstr "I<f_handle> で返されるハンドルを保持するのに十分な大きさの構造体を確保するのは、 呼び出し元が責任をもって行う必要がある。 呼び出し前に、 I<handle_bytes> フィールドは I<f_handle> 用に格納されたサイズで初期化すべきである (I<E<lt>fcntl.hE<gt>> で定義されている定数 B<MAX_HANDLE_SZ> でファイルハンドルの最大サイズが規定されている)。 呼び出しが成功でリターンする際、 I<handle_bytes> フィールドは I<f_handle> に実際に書き込まれたバイト数に更新される。"
6170
6171 #. type: Plain text
6172 #: build/C/man2/open_by_handle_at.2:112
6173 msgid "The caller can discover the required size for the I<file_handle> structure by making a call in which I<handle-E<gt>handle_bytes> is zero; in this case, the call fails with the error B<EOVERFLOW> and I<handle-E<gt>handle_bytes> is set to indicate the required size; the caller can then use this information to allocate a structure of the correct size (see EXAMPLE below)."
6174 msgstr "呼び出し元では、 I<handle-E<gt>handle_bytes> を 0 に設定して呼び出しを行うことで、 I<file_handle> 構造体に必要なサイズを知ることができる。 この場合、 この呼び出しはエラー B<EOVERFLOW> で失敗し、 I<handle-E<gt>handle_bytes> に必要なサイズが設定される。 呼び出し元はこの情報を使って、正しいサイズの構造体を割り当てることができる (下記の「例」を参照)。"
6175
6176 #. type: Plain text
6177 #: build/C/man2/open_by_handle_at.2:123
6178 msgid "Other than the use of the I<handle_bytes> field, the caller should treat the I<file_handle> structure as an opaque data type: the I<handle_type> and I<f_handle> fields are needed only by a subsequent call to B<open_by_handle_at>()."
6179 msgstr "I<handle_bytes> フィールドを使用する以外は、 呼び出し元は I<file_handle> 構造体の内容を意識せずに扱うべきである。 フィールド I<handle_type> と I<f_handle> は後で B<open_by_handle_at>() を呼び出す場合にだけ必要である。"
6180
6181 #. type: Plain text
6182 #: build/C/man2/open_by_handle_at.2:131
6183 msgid "The I<flags> argument is a bit mask constructed by ORing together zero or more of B<AT_EMPTY_PATH> and B<AT_SYMLINK_FOLLOW>, described below."
6184 msgstr "I<flags> 引き数は、 下記の B<AT_EMPTY_PATH> と B<AT_SYMLINK_FOLLOW> のうち 0 個以上の論理和を取って構成されるビットマスクである。"
6185
6186 #. type: Plain text
6187 #: build/C/man2/open_by_handle_at.2:138
6188 msgid "Together, the I<pathname> and I<dirfd> arguments identify the file for which a handle is to be obtained.  There are four distinct cases:"
6189 msgstr "引き数 I<pathname> と I<dirfd> はその組み合わせでハンドルを取得するファイルを指定する。 以下の 4 つのパターンがある。"
6190
6191 #. type: Plain text
6192 #: build/C/man2/open_by_handle_at.2:146
6193 msgid "If I<pathname> is a nonempty string containing an absolute pathname, then a handle is returned for the file referred to by that pathname.  In this case, I<dirfd> is ignored."
6194 msgstr "I<pathname> が空でない文字列で絶対パス名を含む場合、 このパス名が参照するファイルに対するハンドルが返される。"
6195
6196 #. type: Plain text
6197 #: build/C/man2/open_by_handle_at.2:157
6198 msgid "If I<pathname> is a nonempty string containing a relative pathname and I<dirfd> has the special value B<AT_FDCWD>, then I<pathname> is interpreted relative to the current working directory of the caller, and a handle is returned for the file to which it refers."
6199 msgstr "I<pathname> が相対パスが入った空でない文字列で、 I<dirfd> が特別な値 B<AT_FDCWD> の場合、 I<pathname> は呼び出し元のカレントワーキングディレクトリに対する相対パスと解釈され、 そのファイルに対するハンドルが返される。"
6200
6201 #. type: Plain text
6202 #: build/C/man2/open_by_handle_at.2:170
6203 msgid "If I<pathname> is a nonempty string containing a relative pathname and I<dirfd> is a file descriptor referring to a directory, then I<pathname> is interpreted relative to the directory referred to by I<dirfd>, and a handle is returned for the file to which it refers.  (See B<openat>(2)  for an explanation of why \"directory file descriptors\" are useful.)"
6204 msgstr "I<pathname> が相対パスが入った空でない文字列で、 I<dirfd> がディレクトリを参照するファイルディスクリプタの場合、 I<pathname> は I<dirfd> が参照するディレクトリに対する相対パスと解釈され、 そのファイルを参照するハンドルが返される。(なぜ「ディレクトリファイルディスクリプタ」が役に立つのかについては B<openat>(2) を参照。)"
6205
6206 #. type: Plain text
6207 #: build/C/man2/open_by_handle_at.2:184
6208 msgid "If I<pathname> is an empty string and I<flags> specifies the value B<AT_EMPTY_PATH>, then I<dirfd> can be an open file descriptor referring to any type of file, or B<AT_FDCWD>, meaning the current working directory, and a handle is returned for the file to which it refers."
6209 msgstr "I<pathname> が空の文字列で I<flags> に B<AT_EMPTY_PATH> が指定されている場合、 I<dirfd> には任意の種別のファイルを参照するオープンされたファイルディスクリプターか B<AT_FDCWD> (カレントワーキングディレクトリを意味する) を指定でき、 I<dirfd> が参照するファイルに対するハンドルが返される。"
6210
6211 #. type: Plain text
6212 #: build/C/man2/open_by_handle_at.2:196
6213 msgid "The I<mount_id> argument returns an identifier for the filesystem mount that corresponds to I<pathname>.  This corresponds to the first field in one of the records in I</proc/self/mountinfo>.  Opening the pathname in the fifth field of that record yields a file descriptor for the mount point; that file descriptor can be used in a subsequent call to B<open_by_handle_at>()."
6214 msgstr "I<mount_id> 引き数は、 I<pathname> に対応するファイルシステムのマウントの識別子を返す。 この識別子は I</proc/self/mountinfo> のいずれかのレコードの最初のフィールドに対応する。 対応するレコードの 5 番目のフィールドのパス名をオープンすると、 このマウントポイントのファイルディスクリプターが得られる。 このファイルディスクリプターはこの後の B<open_by_handle_at>() の呼び出しで使用できる。"
6215
6216 #. type: Plain text
6217 #: build/C/man2/open_by_handle_at.2:209
6218 msgid "By default, B<name_to_handle_at>()  does not dereference I<pathname> if it is a symbolic link, and thus returns a handle for the link itself.  If B<AT_SYMLINK_FOLLOW> is specified in I<flags>, I<pathname> is dereferenced if it is a symbolic link (so that the call returns a handle for the file referred to by the link)."
6219 msgstr "デフォルトでは、 B<name_to_handle_at>() は I<pathname> がシンボリックリンクの場合にその展開 (dereference) を行わず、 リンク自身に対するハンドルを返す。 B<AT_SYMLINK_FOLLOW> が I<flags> に指定されると、 I<pathname> がシンボリックリンクの場合にリンクの展開が行われる (リンクが参照するファイルに対するハンドルが返される)。"
6220
6221 #. type: SS
6222 #: build/C/man2/open_by_handle_at.2:209
6223 #, no-wrap
6224 msgid "open_by_handle_at()"
6225 msgstr "open_by_handle_at()"
6226
6227 #. type: Plain text
6228 #: build/C/man2/open_by_handle_at.2:216
6229 msgid "The B<open_by_handle_at>()  system call opens the file referred to by I<handle>, a file handle returned by a previous call to B<name_to_handle_at>()."
6230 msgstr "B<open_by_handle_at>() システムコールは I<handle> が参照するファイルをオープンする。 I<handle> は 前に呼び出した B<name_to_handle_at>() が返したファイルハンドルである。"
6231
6232 #. type: Plain text
6233 #: build/C/man2/open_by_handle_at.2:226
6234 msgid "The I<mount_fd> argument is a file descriptor for any object (file, directory, etc.)  in the mounted filesystem with respect to which I<handle> should be interpreted.  The special value B<AT_FDCWD> can be specified, meaning the current working directory of the caller."
6235 msgstr "I<mount_fd> 引き数は、 I<handle> がそのファイルシステムに関連すると解釈されるマウントされたファイルシステム内の任意のオブジェクト (ファイル、 ディレクトリなど) のファイルディスクリプターである。 特別な値 B<AT_FDCWD> も指定できる。 この値は呼び出し元のカレントワーキングディレクトリを意味する。"
6236
6237 #. type: Plain text
6238 #: build/C/man2/open_by_handle_at.2:239
6239 msgid "The I<flags> argument is as for B<open>(2).  If I<handle> refers to a symbolic link, the caller must specify the B<O_PATH> flag, and the symbolic link is not dereferenced; the B<O_NOFOLLOW> flag, if specified, is ignored."
6240 msgstr "引き数 I<flags> は B<open>(2) と同じである。 I<handle> がシンボリックリンクを参照している場合、 呼び出し元は B<O_PATH> フラグを指定しなければならず、 そのシンボリックリンクは展開されない。 B<O_NOFOLLOW> が指定された場合は、 B<O_NOFOLLOW> は無視される。"
6241
6242 #. type: Plain text
6243 #: build/C/man2/open_by_handle_at.2:245
6244 msgid "The caller must have the B<CAP_DAC_READ_SEARCH> capability to invoke B<open_by_handle_at>()."
6245 msgstr "B<open_by_handle_at>() を呼び出すには、 呼び出し元が B<CAP_DAC_READ_SEARCH> ケーパビリティーを持っていなければならない。"
6246
6247 #. type: Plain text
6248 #: build/C/man2/open_by_handle_at.2:252
6249 msgid "On success, B<name_to_handle_at>()  returns 0, and B<open_by_handle_at>()  returns a nonnegative file descriptor."
6250 msgstr "成功すると、 B<name_to_handle_at>() は 0 を返し、 B<open_by_handle_at>() は負でないファイルディスクリプターを返す。"
6251
6252 #. type: Plain text
6253 #: build/C/man2/open_by_handle_at.2:256
6254 msgid "In the event of an error, both system calls return -1 and set I<errno> to indicate the cause of the error."
6255 msgstr "エラーの場合、 どちらのシステムコールも -1 を返し、 I<errno> にエラーの原因を示す値を設定する。"
6256
6257 #. type: Plain text
6258 #: build/C/man2/open_by_handle_at.2:263
6259 msgid "B<name_to_handle_at>()  and B<open_by_handle_at>()  can fail for the same errors as B<openat>(2).  In addition, they can fail with the errors noted below."
6260 msgstr "B<name_to_handle_at>() と B<open_by_handle_at>() は B<openat>(2) と同じエラーで失敗する。 また、 これらのシステムコールは以下のエラーで失敗することもある。"
6261
6262 #. type: Plain text
6263 #: build/C/man2/open_by_handle_at.2:266
6264 msgid "B<name_to_handle_at>()  can fail with the following errors:"
6265 msgstr "B<name_to_handle_at>() は以下のエラーで失敗することがある。"
6266
6267 #. type: Plain text
6268 #: build/C/man2/open_by_handle_at.2:273
6269 msgid "I<pathname>, I<mount_id>, or I<handle> points outside your accessible address space."
6270 msgstr "I<pathname>, I<mount_id>, I<handle> のどれかがアクセス可能なアドレス空間の外を指している。"
6271
6272 #. type: Plain text
6273 #: build/C/man2/open_by_handle_at.2:277
6274 msgid "I<flags> includes an invalid bit value."
6275 msgstr "I<flags> に無効なビット値が含まれている。"
6276
6277 #. type: Plain text
6278 #: build/C/man2/open_by_handle_at.2:282
6279 msgid "I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ>."
6280 msgstr "I<handle-E<gt>handle_bytes> が B<MAX_HANDLE_SZ> よりも大きい。"
6281
6282 #. type: Plain text
6283 #: build/C/man2/open_by_handle_at.2:289
6284 msgid "I<pathname> is an empty string, but B<AT_EMPTY_PATH> was not specified in I<flags>."
6285 msgstr "I<pathname> が空文字列だが、 I<flags> に B<AT_EMPTY_PATH> がされていなかった。"
6286
6287 #. type: Plain text
6288 #: build/C/man2/open_by_handle_at.2:301
6289 msgid "The file descriptor supplied in I<dirfd> does not refer to a directory, and it is not the case that both I<flags> includes B<AT_EMPTY_PATH> and I<pathname> is an empty string."
6290 msgstr "I<dirfd> で指定されたファイルディスクリプターがディレクトリを参照しておらず、 両方の I<flags> に B<AT_EMPTY_PATH> が指定され、 かつ I<pathname> が空文字列である場合でもない。"
6291
6292 #. type: Plain text
6293 #: build/C/man2/open_by_handle_at.2:304
6294 msgid "The filesystem does not support decoding of a pathname to a file handle."
6295 msgstr "ファイルシステムがパス名をファイルハンドルへの変換をサポートしていない。"
6296
6297 #. type: Plain text
6298 #: build/C/man2/open_by_handle_at.2:314
6299 msgid "The I<handle-E<gt>handle_bytes> value passed into the call was too small.  When this error occurs, I<handle-E<gt>handle_bytes> is updated to indicate the required size for the handle."
6300 msgstr "呼び出しに渡された I<handle-E<gt>handle_bytes> の値が小さすぎた。 このエラーが発生した際、 I<handle-E<gt>handle_bytes> はハンドルに必要なサイズに更新される。"
6301
6302 #. type: Plain text
6303 #: build/C/man2/open_by_handle_at.2:317
6304 msgid "B<open_by_handle_at>()  can fail with the following errors:"
6305 msgstr "B<open_by_handle_at>() は以下のエラーで失敗することがある。"
6306
6307 #. type: Plain text
6308 #: build/C/man2/open_by_handle_at.2:321
6309 msgid "I<mount_fd> is not an open file descriptor."
6310 msgstr "I<mount_fd> がオープンされたファイルディスクリプタでない。"
6311
6312 #. type: Plain text
6313 #: build/C/man2/open_by_handle_at.2:325
6314 msgid "I<handle> points outside your accessible address space."
6315 msgstr "I<handle> がアクセス可能なアドレス空間の外を指している。"
6316
6317 #. type: Plain text
6318 #: build/C/man2/open_by_handle_at.2:331
6319 msgid "I<handle-E<gt>handle_bytes> is greater than B<MAX_HANDLE_SZ> or is equal to zero."
6320 msgstr "I<handle-E<gt>handle_bytes> が B<MAX_HANDLE_SZ> より大きいか 0 に等しい。"
6321
6322 #. type: Plain text
6323 #: build/C/man2/open_by_handle_at.2:338
6324 msgid "I<handle> refers to a symbolic link, but B<O_PATH> was not specified in I<flags>."
6325 msgstr "I<handle> がシンボリックリンクを参照しているが、 I<flags> に B<O_PATH> がされていなかった。"
6326
6327 #. type: Plain text
6328 #: build/C/man2/open_by_handle_at.2:343
6329 msgid "The caller does not have the B<CAP_DAC_READ_SEARCH> capability."
6330 msgstr "呼び出し元が B<CAP_DAC_READ_SEARCH> ケーパビリティを持っていない。"
6331
6332 #. type: TP
6333 #: build/C/man2/open_by_handle_at.2:343
6334 #, no-wrap
6335 msgid "B<ESTALE>"
6336 msgstr "B<ESTALE>"
6337
6338 #. type: Plain text
6339 #: build/C/man2/open_by_handle_at.2:349
6340 msgid "The specified I<handle> is not valid.  This error will occur if, for example, the file has been deleted."
6341 msgstr "指定された I<handle> が有効ではない。 このエラーは、 例えばファイルが削除された場合などに発生する。"
6342
6343 #. type: Plain text
6344 #: build/C/man2/open_by_handle_at.2:352
6345 msgid "These system calls first appeared in Linux 2.6.39.  Library support is provided in glibc since version 2.14."
6346 msgstr "これらのシステムコールは Linux 2.6.39 で初めて登場した。ライブラリによるサポートはバージョン 2.14 以降の glibc で提供されている。"
6347
6348 #. type: Plain text
6349 #: build/C/man2/open_by_handle_at.2:354
6350 msgid "These system calls are nonstandard Linux extensions."
6351 msgstr "これらのシステムコールは非標準の Linux の拡張である。"
6352
6353 #. type: Plain text
6354 #: build/C/man2/open_by_handle_at.2:359
6355 msgid "FreeBSD has a broadly similar pair of system calls in the form of B<getfh>()  and B<openfh>()."
6356 msgstr "FreeBSD には B<getfh>() と B<openfh>() というほとんど同じ機能のシステムコールのペアが存在する。"
6357
6358 #. type: Plain text
6359 #: build/C/man2/open_by_handle_at.2:364
6360 msgid "A file handle can be generated in one process using B<name_to_handle_at>()  and later used in a different process that calls B<open_by_handle_at>()."
6361 msgstr "あるプロセスで B<name_to_handle_at>() を使ってファイルハンドルを生成して、 そのハンドルを別のプロセスの B<open_by_handle_at>() で使用することができる。"
6362
6363 #. type: Plain text
6364 #: build/C/man2/open_by_handle_at.2:370
6365 msgid "Some filesystem don't support the translation of pathnames to file handles, for example, I</proc>, I</sys>, and various network filesystems."
6366 msgstr "いくつかのファイルシステムでは、 パス名からファイルハンドルへの変換がサポートされていない。 例えば、 I</proc>, I</sys> や種々のネットワークファイルシステムなどである。"
6367
6368 #. type: Plain text
6369 #: build/C/man2/open_by_handle_at.2:377
6370 msgid "A file handle may become invalid (\"stale\") if a file is deleted, or for other filesystem-specific reasons.  Invalid handles are notified by an B<ESTALE> error from B<open_by_handle_at>()."
6371 msgstr "ファイルハンドルは、 ファイルが削除されたり、 その他のファイルシステム固有の理由で、 無効 (\"stale\") になる場合がある。 無効なハンドルであることは、 B<open_by_handle_at>() からエラー B<ESTALE> が返ることで通知される。"
6372
6373 #.  https://lwn.net/Articles/375888/
6374 #.      "Open by handle" - Jonathan Corbet, 2010-02-23
6375 #. type: Plain text
6376 #: build/C/man2/open_by_handle_at.2:387
6377 msgid "These system calls are designed for use by user-space file servers.  For example, a user-space NFS server might generate a file handle and pass it to an NFS client.  Later, when the client wants to open the file, it could pass the handle back to the server.  This sort of functionality allows a user-space file server to operate in a stateless fashion with respect to the files it serves."
6378 msgstr "これらのシステムコールは、 ユーザー空間のファイルサーバーでの使用を意図して設計されている。 例えば、 ユーザー空間 NFS サーバーがファイルハンドルを生成して、 そのハンドルを NFS クライアントに渡すことができる。 その後、 クライアントがファイルをオープンしようとした際に、 このハンドルをサーバーに送り返すことができる。 このような機能により、 ユーザー空間ファイルサーバーは、 そのサーバーが提供するファイルに関してステートレスで (状態を保持せずに) 動作することができる。"
6379
6380 #.  commit bcda76524cd1fa32af748536f27f674a13e56700
6381 #. type: Plain text
6382 #: build/C/man2/open_by_handle_at.2:409
6383 msgid "If I<pathname> refers to a symbolic link and I<flags> does not specify B<AT_SYMLINK_FOLLOW>, then B<name_to_handle_at>()  returns a handle for the link (rather than the file to which it refers).  The process receiving the handle can later perform operations on the symbolic link by converting the handle to a file descriptor using B<open_by_handle_at>()  with the B<O_PATH> flag, and then passing the file descriptor as the I<dirfd> argument in system calls such as B<readlinkat>(2)  and B<fchownat>(2)."
6384 msgstr "I<pathname> がシンボリックリンクを参照していて、 I<flags> に B<AT_SYMLINK_FOLLOW> が指定されていない場合、 B<name_to_handle_at>() は (シンボリックが参照するファイルではなく) リンクに対するハンドルを返す。 ハンドルを受け取ったプロセスは、 B<open_by_handle_at>() の B<O_PATH> フラグを使ってハンドルをファイルディスクリプターに変換し、 そのファイルディスクリプターを B<readlinkat>(2) や B<fchownat>(2) などのシステムコールの I<dirfd> 引き数として渡すことで、 そのシンボリックリンクに対して操作を行うことができる。"
6385
6386 #. type: SS
6387 #: build/C/man2/open_by_handle_at.2:409
6388 #, no-wrap
6389 msgid "Obtaining a persistent filesystem ID"
6390 msgstr "永続的なファイルシステム ID の取得"
6391
6392 #. type: Plain text
6393 #: build/C/man2/open_by_handle_at.2:423
6394 msgid "The mount IDs in I</proc/self/mountinfo> can be reused as filesystems are unmounted and mounted.  Therefore, the mount ID returned by B<name_to_handle_at>()  (in I<*mount_id>)  should not be treated as a persistent identifier for the corresponding mounted filesystem.  However, an application can use the information in the I<mountinfo> record that corresponds to the mount ID to derive a persistent identifier."
6395 msgstr "I</proc/self/mountinfo> のマウント ID は、 ファイルシステムのアンマウント、マウントが行われるに連れて再利用されることがある。 したがって、 B<name_to_handle_at>() (の I<*mount_id>) で返されたマウント ID は対応するマウントされたファイルシステムを表す永続的な ID と考えるべきではない。 ただし、 アプリケーションは、 マウント ID に対応する  I<mountinfo> レコードの情報を使うことで、 永続的な ID を得ることができる。"
6396
6397 #.  e.g., http://stackoverflow.com/questions/6748429/using-libblkid-to-find-uuid-of-a-partition
6398 #. type: Plain text
6399 #: build/C/man2/open_by_handle_at.2:439
6400 msgid "For example, one can use the device name in the fifth field of the I<mountinfo> record to search for the corresponding device UUID via the symbolic links in I</dev/disks/by-uuid>.  (A more comfortable way of obtaining the UUID is to use the B<libblkid>(3)  library.)  That process can then be reversed, using the UUID to look up the device name, and then obtaining the corresponding mount point, in order to produce the I<mount_fd> argument used by B<open_by_handle_at>()."
6401 msgstr "例えば、 I<mountinfo> レコードの 5 番目のフィールドのデバイス名を使って、 I</dev/disks/by-uuid> のシンボリックリンク経由で対応するデバイス UUID を検索できる。 (UUID を取得するもっと便利な方法は B<libblkid>(3) ライブラリを使用することである。) そのプロセスは、逆に、 この UUID を使ってデバイス名を検索し、 対応するマウントポイントを取得することで、 B<open_by_handle_at>() で使用する I<mount_fd> 引き数を生成することができる。"
6402
6403 #. type: Plain text
6404 #: build/C/man2/open_by_handle_at.2:451
6405 msgid "The two programs below demonstrate the use of B<name_to_handle_at>()  and B<open_by_handle_at>().  The first program (I<t_name_to_handle_at.c>)  uses B<name_to_handle_at>()  to obtain the file handle and mount ID for the file specified in its command-line argument; the handle and mount ID are written to standard output."
6406 msgstr "以下の 2 つのプログラムは B<name_to_handle_at>() と B<open_by_handle_at>() の使用例を示したものである。 最初のプログラム (I<t_name_to_handle_at.c>) は B<name_to_handle_at>() を使用して、 コマンドライン引き数で指定されたファイルに対応するファイルハンドルとマウント ID を取得する。 ハンドルとマウント ID は標準出力に出力される。"
6407
6408 #. type: Plain text
6409 #: build/C/man2/open_by_handle_at.2:471
6410 msgid "The second program (I<t_open_by_handle_at.c>)  reads a mount ID and file handle from standard input.  The program then employs B<open_by_handle_at>()  to open the file using that handle.  If an optional command-line argument is supplied, then the I<mount_fd> argument for B<open_by_handle_at>()  is obtained by opening the directory named in that argument.  Otherwise, I<mount_fd> is obtained by scanning I</proc/self/mountinfo> to find a record whose mount ID matches the mount ID read from standard input, and the mount directory specified in that record is opened.  (These programs do not deal with the fact that mount IDs are not persistent.)"
6411 msgstr "2 つ目のプログラム (I<t_open_by_handle_at.c>) は、 標準入力からマウント ID とファイルハンドルを読み込む。 それから、 B<open_by_handle_at>() を利用して、 そのハンドルを使ってファイルをオープンする。 追加のコマンドライン引き数が指定された場合は、 B<open_by_handle_at>() の I<mount_fd> 引き数は、 この引き数で渡された名前のディレクトリをオープンして取得する。 それ以外の場合、 I</proc/self/mountinfo> からスキャンして標準入力から読み込んだマウント ID に一致するマウント ID を検索し、 そのレコードで指定されているマウントディレクトリをオープンして、 I<mount_fd> を入手する。 (これらのプログラムではマウント ID が永続的ではない点についての対処は行わない。)"
6412
6413 #. type: Plain text
6414 #: build/C/man2/open_by_handle_at.2:473
6415 msgid "The following shell session demonstrates the use of these two programs:"
6416 msgstr "以下のシェルセッションは、これら 2 つのプログラムの使用例である。"
6417
6418 #. type: Plain text
6419 #: build/C/man2/open_by_handle_at.2:483
6420 #, no-wrap
6421 msgid ""
6422 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
6423 "$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
6424 "$ B<./t_open_by_handle_at E<lt> fh>\n"
6425 "open_by_handle_at: Operation not permitted\n"
6426 "$ B<sudo ./t_open_by_handle_at E<lt> fh>      # Need CAP_SYS_ADMIN\n"
6427 "Read 31 bytes\n"
6428 "$ B<rm cecilia.txt>\n"
6429 msgstr ""
6430 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
6431 "$ B<./t_name_to_handle_at cecilia.txt E<gt> fh>\n"
6432 "$ B<./t_open_by_handle_at E<lt> fh>\n"
6433 "open_by_handle_at: Operation not permitted\n"
6434 "$ B<sudo ./t_open_by_handle_at E<lt> fh>      # Need CAP_SYS_ADMIN\n"
6435 "Read 31 bytes\n"
6436 "$ B<rm cecilia.txt>\n"
6437
6438 #.  Christoph Hellwig: That's why the file handles contain a generation
6439 #.  counter that gets incremented in this case.
6440 #. type: Plain text
6441 #: build/C/man2/open_by_handle_at.2:494
6442 msgid "Now we delete and (quickly) re-create the file so that it has the same content and (by chance) the same inode.  Nevertheless, B<open_by_handle_at>()  recognizes that the original file referred to by the file handle no longer exists."
6443 msgstr "ここで、 ファイルを削除し (すぐに) 再作成する。 同じ内容で (運がよければ) 同じ inode になる。 この場合でも、 B<open_by_handle_at>() はこのファイルハンドルが参照する元のファイルがすでに存在しないことを認識する。"
6444
6445 #. type: Plain text
6446 #: build/C/man2/open_by_handle_at.2:505
6447 #, no-wrap
6448 msgid ""
6449 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Display inode number\n"
6450 "4072121\n"
6451 "$ B<rm cecilia.txt>\n"
6452 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
6453 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Check inode number\n"
6454 "4072121\n"
6455 "$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
6456 "open_by_handle_at: Stale NFS file handle\n"
6457 msgstr ""
6458 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Display inode number\n"
6459 "4072121\n"
6460 "$ B<rm cecilia.txt>\n"
6461 "$ B<echo 'Can you please think about it?' E<gt> cecilia.txt>\n"
6462 "$ B<stat --printf=\"%i\\en\" cecilia.txt>     # Check inode number\n"
6463 "4072121\n"
6464 "$ B<sudo ./t_open_by_handle_at E<lt> fh>\n"
6465 "open_by_handle_at: Stale NFS file handle\n"
6466
6467 #. type: SS
6468 #: build/C/man2/open_by_handle_at.2:507
6469 #, no-wrap
6470 msgid "Program source: t_name_to_handle_at.c"
6471 msgstr "プログラムのソース: t_name_to_handle_at.c"
6472
6473 #. type: Plain text
6474 #: build/C/man2/open_by_handle_at.2:519
6475 #, no-wrap
6476 msgid ""
6477 "#define _GNU_SOURCE\n"
6478 "#include E<lt>sys/types.hE<gt>\n"
6479 "#include E<lt>sys/stat.hE<gt>\n"
6480 "#include E<lt>fcntl.hE<gt>\n"
6481 "#include E<lt>stdio.hE<gt>\n"
6482 "#include E<lt>stdlib.hE<gt>\n"
6483 "#include E<lt>unistd.hE<gt>\n"
6484 "#include E<lt>errno.hE<gt>\n"
6485 "#include E<lt>string.hE<gt>\n"
6486 msgstr ""
6487 "#define _GNU_SOURCE\n"
6488 "#include E<lt>sys/types.hE<gt>\n"
6489 "#include E<lt>sys/stat.hE<gt>\n"
6490 "#include E<lt>fcntl.hE<gt>\n"
6491 "#include E<lt>stdio.hE<gt>\n"
6492 "#include E<lt>stdlib.hE<gt>\n"
6493 "#include E<lt>unistd.hE<gt>\n"
6494 "#include E<lt>errno.hE<gt>\n"
6495 "#include E<lt>string.hE<gt>\n"
6496
6497 #. type: Plain text
6498 #: build/C/man2/open_by_handle_at.2:522 build/C/man2/open_by_handle_at.2:595
6499 #, no-wrap
6500 msgid ""
6501 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
6502 "                        } while (0)\n"
6503 msgstr ""
6504 "#define errExit(msg)    do { perror(msg); exit(EXIT_FAILURE); \\e\n"
6505 "                        } while (0)\n"
6506
6507 #. type: Plain text
6508 #: build/C/man2/open_by_handle_at.2:529
6509 #, no-wrap
6510 msgid ""
6511 "int\n"
6512 "main(int argc, char *argv[])\n"
6513 "{\n"
6514 "    struct file_handle *fhp;\n"
6515 "    int mount_id, fhsize, flags, dirfd, j;\n"
6516 "    char *pathname;\n"
6517 msgstr ""
6518 "int\n"
6519 "main(int argc, char *argv[])\n"
6520 "{\n"
6521 "    struct file_handle *fhp;\n"
6522 "    int mount_id, fhsize, flags, dirfd, j;\n"
6523 "    char *pathname;\n"
6524
6525 #. type: Plain text
6526 #: build/C/man2/open_by_handle_at.2:534
6527 #, no-wrap
6528 msgid ""
6529 "    if (argc != 2) {\n"
6530 "        fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
6531 "        exit(EXIT_FAILURE);\n"
6532 "    }\n"
6533 msgstr ""
6534 "    if (argc != 2) {\n"
6535 "        fprintf(stderr, \"Usage: %s pathname\\en\", argv[0]);\n"
6536 "        exit(EXIT_FAILURE);\n"
6537 "    }\n"
6538
6539 #. type: Plain text
6540 #: build/C/man2/open_by_handle_at.2:536
6541 #, no-wrap
6542 msgid "    pathname = argv[1];\n"
6543 msgstr "    pathname = argv[1];\n"
6544
6545 #. type: Plain text
6546 #: build/C/man2/open_by_handle_at.2:538
6547 #, no-wrap
6548 msgid "    /* Allocate file_handle structure */\n"
6549 msgstr "    /* file_handle 構造体を確保する */\n"
6550
6551 #. type: Plain text
6552 #: build/C/man2/open_by_handle_at.2:543
6553 #, no-wrap
6554 msgid ""
6555 "    fhsize = sizeof(*fhp);\n"
6556 "    fhp = malloc(fhsize);\n"
6557 "    if (fhp == NULL)\n"
6558 "        errExit(\"malloc\");\n"
6559 msgstr ""
6560 "    fhsize = sizeof(*fhp);\n"
6561 "    fhp = malloc(fhsize);\n"
6562 "    if (fhp == NULL)\n"
6563 "        errExit(\"malloc\");\n"
6564
6565 #. type: Plain text
6566 #: build/C/man2/open_by_handle_at.2:546
6567 #, no-wrap
6568 msgid ""
6569 "    /* Make an initial call to name_to_handle_at() to discover\n"
6570 "       the size required for file handle */\n"
6571 msgstr ""
6572 "    /* name_to_handle_at() を最初に呼び出して\n"
6573 "       ファイルハンドルに必要なサイズを入手する */\n"
6574
6575 #. type: Plain text
6576 #: build/C/man2/open_by_handle_at.2:555
6577 #, no-wrap
6578 msgid ""
6579 "    dirfd = AT_FDCWD;           /* For name_to_handle_at() calls */\n"
6580 "    flags = 0;                  /* For name_to_handle_at() calls */\n"
6581 "    fhp-E<gt>handle_bytes = 0;\n"
6582 "    if (name_to_handle_at(dirfd, pathname, fhp,\n"
6583 "                &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
6584 "        fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
6585 "        exit(EXIT_FAILURE);\n"
6586 "    }\n"
6587 msgstr ""
6588 "    dirfd = AT_FDCWD;           /* For name_to_handle_at() calls */\n"
6589 "    flags = 0;                  /* For name_to_handle_at() calls */\n"
6590 "    fhp-E<gt>handle_bytes = 0;\n"
6591 "    if (name_to_handle_at(dirfd, pathname, fhp,\n"
6592 "                &mount_id, flags) != -1 || errno != EOVERFLOW) {\n"
6593 "        fprintf(stderr, \"Unexpected result from name_to_handle_at()\\en\");\n"
6594 "        exit(EXIT_FAILURE);\n"
6595 "    }\n"
6596
6597 #. type: Plain text
6598 #: build/C/man2/open_by_handle_at.2:557
6599 #, no-wrap
6600 msgid "    /* Reallocate file_handle structure with correct size */\n"
6601 msgstr "    /* file_handle 構造体を正しいサイズに確保し直す */\n"
6602
6603 #. type: Plain text
6604 #: build/C/man2/open_by_handle_at.2:562
6605 #, no-wrap
6606 msgid ""
6607 "    fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
6608 "    fhp = realloc(fhp, fhsize);         /* Copies fhp-E<gt>handle_bytes */\n"
6609 "    if (fhp == NULL)\n"
6610 "        errExit(\"realloc\");\n"
6611 msgstr ""
6612 "    fhsize = sizeof(struct file_handle) + fhp-E<gt>handle_bytes;\n"
6613 "    fhp = realloc(fhp, fhsize);         /* Copies fhp-E<gt>handle_bytes */\n"
6614 "    if (fhp == NULL)\n"
6615 "        errExit(\"realloc\");\n"
6616
6617 #. type: Plain text
6618 #: build/C/man2/open_by_handle_at.2:564
6619 #, no-wrap
6620 msgid "    /* Get file handle from pathname supplied on command line */\n"
6621 msgstr "    /* コマンドラインで指定されたパス名からファイルハンドルを取得 */\n"
6622
6623 #. type: Plain text
6624 #: build/C/man2/open_by_handle_at.2:567
6625 #, no-wrap
6626 msgid ""
6627 "    if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
6628 "        errExit(\"name_to_handle_at\");\n"
6629 msgstr ""
6630 "    if (name_to_handle_at(dirfd, pathname, fhp, &mount_id, flags) == -1)\n"
6631 "        errExit(\"name_to_handle_at\");\n"
6632
6633 #. type: Plain text
6634 #: build/C/man2/open_by_handle_at.2:570
6635 #, no-wrap
6636 msgid ""
6637 "    /* Write mount ID, file handle size, and file handle to stdout,\n"
6638 "       for later reuse by t_open_by_handle_at.c */\n"
6639 msgstr ""
6640 "    /* t_open_by_handle_at.c で後で再利用できるように、マウント ID、\n"
6641 "       ファイルハンドルのサイズ、ファイルハンドルを標準出力に書き出す */\n"
6642
6643 #. type: Plain text
6644 #: build/C/man2/open_by_handle_at.2:576
6645 #, no-wrap
6646 msgid ""
6647 "    printf(\"%d\\en\", mount_id);\n"
6648 "    printf(\"%d %d   \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
6649 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
6650 "        printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
6651 "    printf(\"\\en\");\n"
6652 msgstr ""
6653 "    printf(\"%d\\en\", mount_id);\n"
6654 "    printf(\"%d %d   \", fhp-E<gt>handle_bytes, fhp-E<gt>handle_type);\n"
6655 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
6656 "        printf(\" %02x\", fhp-E<gt>f_handle[j]);\n"
6657 "    printf(\"\\en\");\n"
6658
6659 #. type: SS
6660 #: build/C/man2/open_by_handle_at.2:580
6661 #, no-wrap
6662 msgid "Program source: t_open_by_handle_at.c"
6663 msgstr "プログラムのソース: t_open_by_handle_at.c"
6664
6665 #. type: Plain text
6666 #: build/C/man2/open_by_handle_at.2:592
6667 #, no-wrap
6668 msgid ""
6669 "#define _GNU_SOURCE\n"
6670 "#include E<lt>sys/types.hE<gt>\n"
6671 "#include E<lt>sys/stat.hE<gt>\n"
6672 "#include E<lt>fcntl.hE<gt>\n"
6673 "#include E<lt>limits.hE<gt>\n"
6674 "#include E<lt>stdio.hE<gt>\n"
6675 "#include E<lt>stdlib.hE<gt>\n"
6676 "#include E<lt>unistd.hE<gt>\n"
6677 "#include E<lt>string.hE<gt>\n"
6678 msgstr ""
6679 "#define _GNU_SOURCE\n"
6680 "#include E<lt>sys/types.hE<gt>\n"
6681 "#include E<lt>sys/stat.hE<gt>\n"
6682 "#include E<lt>fcntl.hE<gt>\n"
6683 "#include E<lt>limits.hE<gt>\n"
6684 "#include E<lt>stdio.hE<gt>\n"
6685 "#include E<lt>stdlib.hE<gt>\n"
6686 "#include E<lt>unistd.hE<gt>\n"
6687 "#include E<lt>string.hE<gt>\n"
6688
6689 #. type: Plain text
6690 #: build/C/man2/open_by_handle_at.2:601
6691 #, no-wrap
6692 msgid ""
6693 "/* Scan /proc/self/mountinfo to find the line whose mount ID matches\n"
6694 "   \\(aqmount_id\\(aq. (An easier way to do this is to install and use the\n"
6695 "   \\(aqlibmount\\(aq library provided by the \\(aqutil-linux\\(aq project.)\n"
6696 "   Open the corresponding mount path and return the resulting file\n"
6697 "   descriptor. */\n"
6698 msgstr ""
6699 "/* /proc/self/mountinfo をスキャンして、マウント ID が \\(aqmount_id\\(aq に\n"
6700 "   一致する行を探す。 (もっと簡単な方法は \\(aqutil-linux\\(aq プロジェクト\n"
6701 "   が提供する \\(aqlibmount\\(aq ライブラリをインストールして使うことである)\n"
6702 "   対応するマウントパスをオープンし、得られたファイルディスクリプターを返す。 */\n"
6703
6704 #. type: Plain text
6705 #: build/C/man2/open_by_handle_at.2:611
6706 #, no-wrap
6707 msgid ""
6708 "static int\n"
6709 "open_mount_path_by_id(int mount_id)\n"
6710 "{\n"
6711 "    char *linep;\n"
6712 "    size_t lsize;\n"
6713 "    char mount_path[PATH_MAX];\n"
6714 "    int mi_mount_id, found;\n"
6715 "    ssize_t nread;\n"
6716 "    FILE *fp;\n"
6717 msgstr ""
6718 "static int\n"
6719 "open_mount_path_by_id(int mount_id)\n"
6720 "{\n"
6721 "    char *linep;\n"
6722 "    size_t lsize;\n"
6723 "    char mount_path[PATH_MAX];\n"
6724 "    int mi_mount_id, found;\n"
6725 "    ssize_t nread;\n"
6726 "    FILE *fp;\n"
6727
6728 #. type: Plain text
6729 #: build/C/man2/open_by_handle_at.2:615
6730 #, no-wrap
6731 msgid ""
6732 "    fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
6733 "    if (fp == NULL)\n"
6734 "        errExit(\"fopen\");\n"
6735 msgstr ""
6736 "    fp = fopen(\"/proc/self/mountinfo\", \"r\");\n"
6737 "    if (fp == NULL)\n"
6738 "        errExit(\"fopen\");\n"
6739
6740 #. type: Plain text
6741 #: build/C/man2/open_by_handle_at.2:622
6742 #, no-wrap
6743 msgid ""
6744 "    found = 0;\n"
6745 "    linep = NULL;\n"
6746 "    while (!found) {\n"
6747 "        nread = getline(&linep, &lsize, fp);\n"
6748 "        if (nread == -1)\n"
6749 "            break;\n"
6750 msgstr ""
6751 "    found = 0;\n"
6752 "    linep = NULL;\n"
6753 "    while (!found) {\n"
6754 "        nread = getline(&linep, &lsize, fp);\n"
6755 "        if (nread == -1)\n"
6756 "            break;\n"
6757
6758 #. type: Plain text
6759 #: build/C/man2/open_by_handle_at.2:629
6760 #, no-wrap
6761 msgid ""
6762 "        nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
6763 "                       &mi_mount_id, mount_path);\n"
6764 "        if (nread != 2) {\n"
6765 "            fprintf(stderr, \"Bad sscanf()\\en\");\n"
6766 "            exit(EXIT_FAILURE);\n"
6767 "        }\n"
6768 msgstr ""
6769 "        nread = sscanf(linep, \"%d %*d %*s %*s %s\",\n"
6770 "                       &mi_mount_id, mount_path);\n"
6771 "        if (nread != 2) {\n"
6772 "            fprintf(stderr, \"Bad sscanf()\\en\");\n"
6773 "            exit(EXIT_FAILURE);\n"
6774 "        }\n"
6775
6776 #. type: Plain text
6777 #: build/C/man2/open_by_handle_at.2:634
6778 #, no-wrap
6779 msgid ""
6780 "        if (mi_mount_id == mount_id)\n"
6781 "            found = 1;\n"
6782 "    }\n"
6783 "    free(linep);\n"
6784 msgstr ""
6785 "        if (mi_mount_id == mount_id)\n"
6786 "            found = 1;\n"
6787 "    }\n"
6788 "    free(linep);\n"
6789
6790 #. type: Plain text
6791 #: build/C/man2/open_by_handle_at.2:636
6792 #, no-wrap
6793 msgid "    fclose(fp);\n"
6794 msgstr "    fclose(fp);\n"
6795
6796 #. type: Plain text
6797 #: build/C/man2/open_by_handle_at.2:641
6798 #, no-wrap
6799 msgid ""
6800 "    if (!found) {\n"
6801 "        fprintf(stderr, \"Could not find mount point\\en\");\n"
6802 "        exit(EXIT_FAILURE);\n"
6803 "    }\n"
6804 msgstr ""
6805 "    if (!found) {\n"
6806 "        fprintf(stderr, \"Could not find mount point\\en\");\n"
6807 "        exit(EXIT_FAILURE);\n"
6808 "    }\n"
6809
6810 #. type: Plain text
6811 #: build/C/man2/open_by_handle_at.2:644
6812 #, no-wrap
6813 msgid ""
6814 "    return open(mount_path, O_RDONLY);\n"
6815 "}\n"
6816 msgstr ""
6817 "    return open(mount_path, O_RDONLY);\n"
6818 "}\n"
6819
6820 #. type: Plain text
6821 #: build/C/man2/open_by_handle_at.2:655
6822 #, no-wrap
6823 msgid ""
6824 "int\n"
6825 "main(int argc, char *argv[])\n"
6826 "{\n"
6827 "    struct file_handle *fhp;\n"
6828 "    int mount_id, fd, mount_fd, handle_bytes, j;\n"
6829 "    ssize_t nread;\n"
6830 "    char buf[1000];\n"
6831 "#define LINE_SIZE 100\n"
6832 "    char line1[LINE_SIZE], line2[LINE_SIZE];\n"
6833 "    char *nextp;\n"
6834 msgstr ""
6835 "int\n"
6836 "main(int argc, char *argv[])\n"
6837 "{\n"
6838 "    struct file_handle *fhp;\n"
6839 "    int mount_id, fd, mount_fd, handle_bytes, j;\n"
6840 "    ssize_t nread;\n"
6841 "    char buf[1000];\n"
6842 "#define LINE_SIZE 100\n"
6843 "    char line1[LINE_SIZE], line2[LINE_SIZE];\n"
6844 "    char *nextp;\n"
6845
6846 #. type: Plain text
6847 #: build/C/man2/open_by_handle_at.2:660
6848 #, no-wrap
6849 msgid ""
6850 "    if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
6851 "        fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
6852 "        exit(EXIT_FAILURE);\n"
6853 "    }\n"
6854 msgstr ""
6855 "    if ((argc E<gt> 1 && strcmp(argv[1], \"--help\") == 0) || argc E<gt> 2) {\n"
6856 "        fprintf(stderr, \"Usage: %s [mount-path]\\en\", argv[0]);\n"
6857 "        exit(EXIT_FAILURE);\n"
6858 "    }\n"
6859
6860 #. type: Plain text
6861 #: build/C/man2/open_by_handle_at.2:662
6862 #, no-wrap
6863 msgid "    /* Standard input contains mount ID and file handle information:\n"
6864 msgstr "    /* マウント ID とファイルハンドル情報が入った標準入力:\n"
6865
6866 #. type: Plain text
6867 #: build/C/man2/open_by_handle_at.2:666
6868 #, no-wrap
6869 msgid ""
6870 "         Line 1: E<lt>mount_idE<gt>\n"
6871 "         Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt>   E<lt>bytes of handle in hexE<gt>\n"
6872 "    */\n"
6873 msgstr ""
6874 "         Line 1: E<lt>mount_idE<gt>\n"
6875 "         Line 2: E<lt>handle_bytesE<gt> E<lt>handle_typeE<gt>   E<lt>bytes of handle in hexE<gt>\n"
6876 "    */\n"
6877
6878 #. type: Plain text
6879 #: build/C/man2/open_by_handle_at.2:672
6880 #, no-wrap
6881 msgid ""
6882 "    if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
6883 "           (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
6884 "        fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
6885 "        exit(EXIT_FAILURE);\n"
6886 "    }\n"
6887 msgstr ""
6888 "    if ((fgets(line1, sizeof(line1), stdin) == NULL) ||\n"
6889 "           (fgets(line2, sizeof(line2), stdin) == NULL)) {\n"
6890 "        fprintf(stderr, \"Missing mount_id / file handle\\en\");\n"
6891 "        exit(EXIT_FAILURE);\n"
6892 "    }\n"
6893
6894 #. type: Plain text
6895 #: build/C/man2/open_by_handle_at.2:674
6896 #, no-wrap
6897 msgid "    mount_id = atoi(line1);\n"
6898 msgstr "    mount_id = atoi(line1);\n"
6899
6900 #. type: Plain text
6901 #: build/C/man2/open_by_handle_at.2:676
6902 #, no-wrap
6903 msgid "    handle_bytes = strtoul(line2, &nextp, 0);\n"
6904 msgstr "    handle_bytes = strtoul(line2, &nextp, 0);\n"
6905
6906 #. type: Plain text
6907 #: build/C/man2/open_by_handle_at.2:678
6908 #, no-wrap
6909 msgid "    /* Given handle_bytes, we can now allocate file_handle structure */\n"
6910 msgstr ""
6911 "    /* handle_bytes があれば、\n"
6912 "       file_handle 構造体をここで割り当てできる */\n"
6913
6914 #. type: Plain text
6915 #: build/C/man2/open_by_handle_at.2:682
6916 #, no-wrap
6917 msgid ""
6918 "    fhp = malloc(sizeof(struct file_handle) + handle_bytes);\n"
6919 "    if (fhp == NULL)\n"
6920 "        errExit(\"malloc\");\n"
6921 msgstr ""
6922 "    fhp = malloc(sizeof(struct file_handle) + handle_bytes);\n"
6923 "    if (fhp == NULL)\n"
6924 "        errExit(\"malloc\");\n"
6925
6926 #. type: Plain text
6927 #: build/C/man2/open_by_handle_at.2:684
6928 #, no-wrap
6929 msgid "    fhp-E<gt>handle_bytes = handle_bytes;\n"
6930 msgstr "    fhp-E<gt>handle_bytes = handle_bytes;\n"
6931
6932 #. type: Plain text
6933 #: build/C/man2/open_by_handle_at.2:686
6934 #, no-wrap
6935 msgid "    fhp-E<gt>handle_type = strtoul(nextp, &nextp, 0);\n"
6936 msgstr "    fhp-E<gt>handle_type = strtoul(nextp, &nextp, 0);\n"
6937
6938 #. type: Plain text
6939 #: build/C/man2/open_by_handle_at.2:689
6940 #, no-wrap
6941 msgid ""
6942 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
6943 "        fhp-E<gt>f_handle[j] = strtoul(nextp, &nextp, 16);\n"
6944 msgstr ""
6945 "    for (j = 0; j E<lt> fhp-E<gt>handle_bytes; j++)\n"
6946 "        fhp-E<gt>f_handle[j] = strtoul(nextp, &nextp, 16);\n"
6947
6948 #. type: Plain text
6949 #: build/C/man2/open_by_handle_at.2:694
6950 #, no-wrap
6951 msgid ""
6952 "    /* Obtain file descriptor for mount point, either by opening\n"
6953 "       the pathname specified on the command line, or by scanning\n"
6954 "       /proc/self/mounts to find a mount that matches the \\(aqmount_id\\(aq\n"
6955 "       that we received from stdin. */\n"
6956 msgstr ""
6957 "    /* マウントポイントのファイルディスクリプターを取得する。\n"
6958 "       取得は、コマンドラインで指定されたパス名をオープンするか、\n"
6959 "       /proc/self/mounts をスキャンして標準入力から受け取った\n"
6960 "       \\(aqmount_id\\(aq に一致するマウントを探すことで行う。 */\n"
6961
6962 #. type: Plain text
6963 #: build/C/man2/open_by_handle_at.2:699
6964 #, no-wrap
6965 msgid ""
6966 "    if (argc E<gt> 1)\n"
6967 "        mount_fd = open(argv[1], O_RDONLY);\n"
6968 "    else\n"
6969 "        mount_fd = open_mount_path_by_id(mount_id);\n"
6970 msgstr ""
6971 "    if (argc E<gt> 1)\n"
6972 "        mount_fd = open(argv[1], O_RDONLY);\n"
6973 "    else\n"
6974 "        mount_fd = open_mount_path_by_id(mount_id);\n"
6975
6976 #. type: Plain text
6977 #: build/C/man2/open_by_handle_at.2:702
6978 #, no-wrap
6979 msgid ""
6980 "    if (mount_fd == -1)\n"
6981 "        errExit(\"opening mount fd\");\n"
6982 msgstr ""
6983 "    if (mount_fd == -1)\n"
6984 "        errExit(\"opening mount fd\");\n"
6985
6986 #. type: Plain text
6987 #: build/C/man2/open_by_handle_at.2:704
6988 #, no-wrap
6989 msgid "    /* Open file using handle and mount point */\n"
6990 msgstr "    /* ハンドルとマウントポイントを使ってファイルをオープンする */\n"
6991
6992 #. type: Plain text
6993 #: build/C/man2/open_by_handle_at.2:708
6994 #, no-wrap
6995 msgid ""
6996 "    fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);\n"
6997 "    if (fd == -1)\n"
6998 "        errExit(\"open_by_handle_at\");\n"
6999 msgstr ""
7000 "    fd = open_by_handle_at(mount_fd, fhp, O_RDONLY);\n"
7001 "    if (fd == -1)\n"
7002 "        errExit(\"open_by_handle_at\");\n"
7003
7004 #. type: Plain text
7005 #: build/C/man2/open_by_handle_at.2:710
7006 #, no-wrap
7007 msgid "    /* Try reading a few bytes from the file */\n"
7008 msgstr "    /* そのファイルからバイトを読み出す */\n"
7009
7010 #. type: Plain text
7011 #: build/C/man2/open_by_handle_at.2:714
7012 #, no-wrap
7013 msgid ""
7014 "    nread = read(fd, buf, sizeof(buf));\n"
7015 "    if (nread == -1)\n"
7016 "        errExit(\"read\");\n"
7017 msgstr ""
7018 "    nread = read(fd, buf, sizeof(buf));\n"
7019 "    if (nread == -1)\n"
7020 "        errExit(\"read\");\n"
7021
7022 #. type: Plain text
7023 #: build/C/man2/open_by_handle_at.2:716
7024 #, no-wrap
7025 msgid "    printf(\"Read %zd bytes\\en\", nread);\n"
7026 msgstr "    printf(\"Read %zd bytes\\en\", nread);\n"
7027
7028 #. type: Plain text
7029 #: build/C/man2/open_by_handle_at.2:726
7030 msgid "B<open>(2), B<libblkid>(3), B<blkid>(8), B<findfs>(8), B<mount>(8)"
7031 msgstr "B<open>(2), B<libblkid>(3), B<blkid>(8), B<findfs>(8), B<mount>(8)"
7032
7033 #. type: Plain text
7034 #: build/C/man2/open_by_handle_at.2:736
7035 msgid "The I<libblkid> and I<libmount> documentation in the latest I<util-linux> release at E<.UR https://www.kernel.org/pub/linux/utils/util-linux/> E<.UE>"
7036 msgstr "E<.UR https://www.kernel.org/pub/linux/utils/util-linux/> E<.UE> で入手できる最新の I<util-linux> リリースの I<libblkid> と I<libmount> のドキュメント。"
7037
7038 #. type: TH
7039 #: build/C/man3/perror.3:31
7040 #, no-wrap
7041 msgid "PERROR"
7042 msgstr "PERROR"
7043
7044 #. type: Plain text
7045 #: build/C/man3/perror.3:34
7046 msgid "perror - print a system error message"
7047 msgstr "perror - システムエラーメッセージを出力する"
7048
7049 #. type: Plain text
7050 #: build/C/man3/perror.3:38
7051 msgid "B<void perror(const char *>I<s>B<);>"
7052 msgstr "B<void perror(const char *>I<s>B<);>"
7053
7054 #. type: Plain text
7055 #: build/C/man3/perror.3:40
7056 msgid "B<#include E<lt>errno.hE<gt>>"
7057 msgstr "B<#include E<lt>errno.hE<gt>>"
7058
7059 #. type: Plain text
7060 #: build/C/man3/perror.3:42
7061 msgid "B<const char * const >I<sys_errlist>B<[];>"
7062 msgstr "B<const char * const >I<sys_errlist>B<[];>"
7063
7064 #. type: Plain text
7065 #: build/C/man3/perror.3:44
7066 msgid "B<int >I<sys_nerr>B<;>"
7067 msgstr "B<int >I<sys_nerr>B<;>"
7068
7069 #. type: Plain text
7070 #: build/C/man3/perror.3:46
7071 msgid "B<int >I<errno>B<; /* Not really declared this way; see errno(3). */>"
7072 msgstr "B<int >I<errno>B<; /* 実際にこのように宣言されているわけではない。 errno(3) 参照 */>"
7073
7074 #. type: Plain text
7075 #: build/C/man3/perror.3:55
7076 msgid "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7077 msgstr "I<sys_errlist>, I<sys_nerr>: _BSD_SOURCE"
7078
7079 #. type: Plain text
7080 #: build/C/man3/perror.3:68
7081 msgid "The routine B<perror>()  produces a message on the standard error output, describing the last error encountered during a call to a system or library function.  First (if I<s> is not NULL and I<*s> is not a null byte (\\(aq\\e0\\(aq)) the argument string I<s> is printed, followed by a colon and a blank.  Then the message and a new-line."
7082 msgstr "関数 B<perror>()  は、システムコールやライブラリ関数の呼び出しにおいて、最後に発生した エラーに関する説明メッセージを生成し、標準エラー出力に出力する。 (I<s> が NULL でなく、 I<*s> がヌルバイト (\\(aq\\e0\\(aq) でない場合には) 引き数の文字列 I<s> がまず出力され、続いてコロン、空白が出力され、 それからメッセージと改行が出力される。"
7083
7084 #. type: Plain text
7085 #: build/C/man3/perror.3:76
7086 msgid "To be of most use, the argument string should include the name of the function that incurred the error.  The error number is taken from the external variable I<errno>, which is set when errors occur but not cleared when successful calls are made."
7087 msgstr "このメッセージを最大限活用するためには、引き数文字列にエラーが発生した 関数名を入れておくとよい。 エラー番号は外部変数 I<errno> から取得される。 I<errno> はエラーが発生した時に設定され、 成功した呼び出しではクリアされない。"
7088
7089 #. type: Plain text
7090 #: build/C/man3/perror.3:90
7091 msgid "The global error list I<sys_errlist>[] indexed by I<errno> can be used to obtain the error message without the newline.  The largest message number provided in the table is I<sys_nerr>-1.  Be careful when directly accessing this list because new error values may not have been added to I<sys_errlist>[].  The use of I<sys_errlist>[] is nowadays deprecated."
7092 msgstr ""
7093 "大域変数のエラーリスト I<sys_errlist>[] は I<errno> を添字とする配列で、この\n"
7094 "配列から改行無しのエラーメッセージが取得される。 テーブルでの最大のメッセージ\n"
7095 "番号は I<sys_nerr> -1 となる。 このテーブルを直接参照する際には注意すること。\n"
7096 "なぜなら、新しいエラー番号が I<sys_errlist>[] に追加済とは限らないからである。\n"
7097 "現在では、I<sys_errlist>[] の使用は非推奨となっている。"
7098
7099 #. type: Plain text
7100 #: build/C/man3/perror.3:111
7101 msgid "When a system call fails, it usually returns -1 and sets the variable I<errno> to a value describing what went wrong.  (These values can be found in I<E<lt>errno.hE<gt>>.)  Many library functions do likewise.  The function B<perror>()  serves to translate this error code into human-readable form.  Note that I<errno> is undefined after a successful library call: this call may well change this variable, even though it succeeds, for example because it internally used some other library function that failed.  Thus, if a failing call is not immediately followed by a call to B<perror>(), the value of I<errno> should be saved."
7102 msgstr "システムコールが失敗した場合、通常、返り値として -1 が返り、 I<errno> にエラーを識別する値が設定される (設定されるエラー番号は I<E<lt>errno.hE<gt>> に記載されている)。 多くのライブラリ関数も同様の動作となる。 関数 B<perror>()  は、このエラーコードの可読なメッセージへの変換を行う。 I<errno> は、ライブラリ呼び出しが成功した後には未定義であることに注意が必要である: その呼び出し自身は成功したとしても、内部で呼び出した他のライブラリ関数が 失敗して、その結果をこの変数に設定することがあるからだ。 よって、失敗した呼び出しの直後に B<perror>()  を呼ばない場合には I<errno> の値を 保存しておかなければならない。"
7103
7104 #. type: Plain text
7105 #: build/C/man3/perror.3:124
7106 msgid "The function B<perror>()  and the external I<errno> (see B<errno>(3))  conform to C89, C99, 4.3BSD, POSIX.1-2001.  The externals I<sys_nerr> and I<sys_errlist> conform to BSD."
7107 msgstr "関数 B<perror>()  と外部変数 I<errno> (B<errno>(3)  参照) は C89, 4.3BSD, POSIX.1-2001 に準拠している。 外部変数 I<sys_nerr> と I<sys_errlist> は BSD に準拠している。"
7108
7109 #.  and only when _BSD_SOURCE is defined.
7110 #.  When
7111 #.  .B _GNU_SOURCE
7112 #.  is defined, the symbols
7113 #.  .I _sys_nerr
7114 #.  and
7115 #.  .I _sys_errlist
7116 #.  are provided.
7117 #. type: Plain text
7118 #: build/C/man3/perror.3:139
7119 msgid "The externals I<sys_nerr> and I<sys_errlist> are defined by glibc, but in I<E<lt>stdio.hE<gt>>."
7120 msgstr "外部変数 I<sys_nerr> と I<sys_errlist> は glibc で定義されているが、 I<E<lt>stdio.hE<gt>> に含まれている。"
7121
7122 #. type: Plain text
7123 #: build/C/man3/perror.3:144
7124 msgid "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7125 msgstr "B<err>(3), B<errno>(3), B<error>(3), B<strerror>(3)"
7126
7127 #. type: TH
7128 #: build/C/man2/pipe.2:36
7129 #, no-wrap
7130 msgid "PIPE"
7131 msgstr "PIPE"
7132
7133 #. type: TH
7134 #: build/C/man2/pipe.2:36 build/C/man3/printf.3:34
7135 #, no-wrap
7136 msgid "2014-07-08"
7137 msgstr "2014-07-08"
7138
7139 #. type: Plain text
7140 #: build/C/man2/pipe.2:39
7141 msgid "pipe, pipe2 - create pipe"
7142 msgstr "pipe, pipe2 - パイプを生成する"
7143
7144 #. type: Plain text
7145 #: build/C/man2/pipe.2:44
7146 #, no-wrap
7147 msgid "B<int pipe(int >I<pipefd>B<[2]);>\n"
7148 msgstr "B<int pipe(int >I<pipefd>B<[2]);>\n"
7149
7150 #. type: Plain text
7151 #: build/C/man2/pipe.2:48
7152 #, no-wrap
7153 msgid ""
7154 "B<#define _GNU_SOURCE>             /* See feature_test_macros(7) */\n"
7155 "B<#include E<lt>fcntl.hE<gt>>              /* Obtain O_* constant definitions */\n"
7156 "B<#include E<lt>unistd.hE<gt>>\n"
7157 msgstr ""
7158 "B<#define _GNU_SOURCE>             /* feature_test_macros(7) 参照 */\n"
7159 "B<#include E<lt>fcntl.hE<gt>>              /* O_* 定数の定義の取得 */\n"
7160 "B<#include E<lt>unistd.hE<gt>>\n"
7161
7162 #. type: Plain text
7163 #: build/C/man2/pipe.2:50
7164 #, no-wrap
7165 msgid "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7166 msgstr "B<int pipe2(int >I<pipefd>B<[2], int >I<flags>B<);>\n"
7167
7168 #. type: Plain text
7169 #: build/C/man2/pipe.2:66
7170 msgid "B<pipe>()  creates a pipe, a unidirectional data channel that can be used for interprocess communication.  The array I<pipefd> is used to return two file descriptors referring to the ends of the pipe.  I<pipefd[0]> refers to the read end of the pipe.  I<pipefd[1]> refers to the write end of the pipe.  Data written to the write end of the pipe is buffered by the kernel until it is read from the read end of the pipe.  For further details, see B<pipe>(7)."
7171 msgstr "B<pipe>()  はパイプを生成する。 パイプは、プロセス間通信に使用できる単方向のデータチャネルである。 配列 I<pipefd> は、パイプの両端を参照する二つのファイルディスクリプタを 返すのに使用される。 I<pipefd[0]> がパイプの読み出し側、 I<pipefd[1]> がパイプの書き込み側である。 パイプの書き込み側に書き込まれたデータは、 パイプの読み出し側から読み出されるまでカーネルでバッファリングされる。 さらなる詳細は B<pipe>(7)  を参照のこと。"
7172
7173 #. type: Plain text
7174 #: build/C/man2/pipe.2:76
7175 msgid "If I<flags> is 0, then B<pipe2>()  is the same as B<pipe>().  The following values can be bitwise ORed in I<flags> to obtain different behavior:"
7176 msgstr "B<pipe2>()  は I<flags> が 0 の場合には B<pipe>()  と同じである。 I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることができる。"
7177
7178 #. type: TP
7179 #: build/C/man2/pipe.2:76
7180 #, no-wrap
7181 msgid "B<O_CLOEXEC>"
7182 msgstr "B<O_CLOEXEC>"
7183
7184 #. type: Plain text
7185 #: build/C/man2/pipe.2:84
7186 msgid "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the two new file descriptors.  See the description of the same flag in B<open>(2)  for reasons why this may be useful."
7187 msgstr "新しく生成される二つのファイルディスクリプタの close-on-exec (B<FD_CLOEXEC>)  フラグをセットする。 このフラグが役に立つ理由については、 B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7188
7189 #. type: TP
7190 #: build/C/man2/pipe.2:84
7191 #, no-wrap
7192 msgid "B<O_DIRECT> (since Linux 3.4)"
7193 msgstr "B<O_DIRECT> (Linux 3.4 以降)"
7194
7195 #.  commit 9883035ae7edef3ec62ad215611cb8e17d6a1a5d
7196 #. type: Plain text
7197 #: build/C/man2/pipe.2:94
7198 msgid "Create a pipe that performs I/O in \"packet\" mode.  Each B<write>(2)  to the pipe is dealt with as a separate packet, and B<read>(2)s from the pipe will read one packet at a time.  Note the following points:"
7199 msgstr "「パケット」モードで入出力を行うパイプを作成する。 このパイプへの B<write>(2) それぞれが別のパケットとして扱われ、 このパイプからの B<read>(2) では一度に一つパケットが読み出される。 以下の点に注意すること。"
7200
7201 #. type: Plain text
7202 #: build/C/man2/pipe.2:105
7203 msgid "Writes of greater than B<PIPE_BUF> bytes (see B<pipe>(7))  will be split into multiple packets.  The constant B<PIPE_BUF> is defined in I<E<lt>limits.hE<gt>>."
7204 msgstr ""
7205 "B<PIPE_BUF> バイト (B<pipe>(7) 参照) より大きいデータを書き込んだ場合、複数のパケットに分割される。\n"
7206 "定数 B<PIPE_BUF> は I<E<lt>limits.hE<gt>> で定義されている。"
7207
7208 #. type: Plain text
7209 #: build/C/man2/pipe.2:115
7210 msgid "If a B<read>(2)  specifies a buffer size that is smaller than the next packet, then the requested number of bytes are read, and the excess bytes in the packet are discarded.  Specifying a buffer size of B<PIPE_BUF> will be sufficient to read the largest possible packets (see the previous point)."
7211 msgstr "B<read>(2) で次のパケットよりも小さなバッファサイズを指定した場合、要求されたバイト数のデータが読み出され、そのパケットの超過分のバイトは破棄される。 可能性のある最大サイズのパケットを読み出すには、B<PIPE_BUF> のバッファサイズを指定すれば十分である (上の項目を参照)。"
7212
7213 #. type: Plain text
7214 #: build/C/man2/pipe.2:120
7215 msgid "Zero-length packets are not supported.  (A B<read>(2)  that specifies a buffer size of zero is a no-op, and returns 0.)"
7216 msgstr "長さ 0 のパケットはサポートされていない。 (バッファサイズ 0 を指定した B<read>(2) は何も行わず 0 を返す)。"
7217
7218 #. type: Plain text
7219 #: build/C/man2/pipe.2:125
7220 msgid "Older kernels that do not support this flag will indicate this via an B<EINVAL> error."
7221 msgstr "このフラグをサポートしていない古いカーネルでは、エラー B<EINVAL> が返る。これによりカーネルがサポートしていないことが分かる。"
7222
7223 #. type: TP
7224 #: build/C/man2/pipe.2:125
7225 #, no-wrap
7226 msgid "B<O_NONBLOCK>"
7227 msgstr "B<O_NONBLOCK>"
7228
7229 #. type: Plain text
7230 #: build/C/man2/pipe.2:133
7231 msgid "Set the B<O_NONBLOCK> file status flag on the two new open file descriptions.  Using this flag saves extra calls to B<fcntl>(2)  to achieve the same result."
7232 msgstr "新しく生成される二つのオープンファイル記述 (open file description) の B<O_NONBLOCK> ファイルステータスフラグをセットする。 このフラグを使うことで、 B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなくなる。"
7233
7234 #. type: Plain text
7235 #: build/C/man2/pipe.2:143
7236 msgid "I<pipefd> is not valid."
7237 msgstr "I<pipefd> が無効な値である。"
7238
7239 #. type: Plain text
7240 #: build/C/man2/pipe.2:148
7241 msgid "(B<pipe2>())  Invalid value in I<flags>."
7242 msgstr "(B<pipe2>())  I<flags> に無効な値が入っている。"
7243
7244 #. type: Plain text
7245 #: build/C/man2/pipe.2:151
7246 msgid "Too many file descriptors are in use by the process."
7247 msgstr "このプロセスで使われているファイルディスクリプタが多すぎる。"
7248
7249 #. type: Plain text
7250 #: build/C/man2/pipe.2:159
7251 msgid "B<pipe2>()  was added to Linux in version 2.6.27; glibc support is available starting with version 2.9."
7252 msgstr "B<pipe2>()  はバージョン 2.6.27 で Linux に追加された。 glibc によるサポートはバージョン 2.9 以降で利用できる。"
7253
7254 #. type: Plain text
7255 #: build/C/man2/pipe.2:162
7256 msgid "B<pipe>(): POSIX.1-2001."
7257 msgstr "B<pipe>(): POSIX.1-2001."
7258
7259 #. type: Plain text
7260 #: build/C/man2/pipe.2:165
7261 msgid "B<pipe2>()  is Linux-specific."
7262 msgstr "B<pipe2>()  は Linux 固有である。"
7263
7264 #.  fork.2 refers to this example program.
7265 #. type: Plain text
7266 #: build/C/man2/pipe.2:181
7267 msgid "The following program creates a pipe, and then B<fork>(2)s to create a child process; the child inherits a duplicate set of file descriptors that refer to the same pipe.  After the B<fork>(2), each process closes the descriptors that it doesn't need for the pipe (see B<pipe>(7)).  The parent then writes the string contained in the program's command-line argument to the pipe, and the child reads this string a byte at a time from the pipe and echoes it on standard output."
7268 msgstr "以下のプログラムではパイプを生成し、その後 B<fork>(2)  で子プロセスを生成する。 子プロセスは同じパイプを参照するファイルディスクリプタ集合のコピーを 継承する。 B<fork>(2)  の後、各プロセスはパイプ (B<pipe>(7)  を参照) に必要がなくなったディスクリプタをクローズする。 親プロセスはプログラムのコマンドライン引き数に含まれる 文字列をパイプへ書き込み、 子プロセスはこの文字列をパイプから 1 バイトずつ読み込んで標準出力にエコーする。"
7269
7270 #. type: Plain text
7271 #: build/C/man2/pipe.2:189
7272 #, no-wrap
7273 msgid ""
7274 "#include E<lt>sys/types.hE<gt>\n"
7275 "#include E<lt>sys/wait.hE<gt>\n"
7276 "#include E<lt>stdio.hE<gt>\n"
7277 "#include E<lt>stdlib.hE<gt>\n"
7278 "#include E<lt>unistd.hE<gt>\n"
7279 "#include E<lt>string.hE<gt>\n"
7280 msgstr ""
7281 "#include E<lt>sys/types.hE<gt>\n"
7282 "#include E<lt>sys/wait.hE<gt>\n"
7283 "#include E<lt>stdio.hE<gt>\n"
7284 "#include E<lt>stdlib.hE<gt>\n"
7285 "#include E<lt>unistd.hE<gt>\n"
7286 "#include E<lt>string.hE<gt>\n"
7287
7288 #. type: Plain text
7289 #: build/C/man2/pipe.2:196
7290 #, no-wrap
7291 msgid ""
7292 "int\n"
7293 "main(int argc, char *argv[])\n"
7294 "{\n"
7295 "    int pipefd[2];\n"
7296 "    pid_t cpid;\n"
7297 "    char buf;\n"
7298 msgstr ""
7299 "int\n"
7300 "main(int argc, char *argv[])\n"
7301 "{\n"
7302 "    int pipefd[2];\n"
7303 "    pid_t cpid;\n"
7304 "    char buf;\n"
7305
7306 #. type: Plain text
7307 #: build/C/man2/pipe.2:201
7308 #, no-wrap
7309 msgid ""
7310 "    if (argc != 2) {\n"
7311 "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7312 "        exit(EXIT_FAILURE);\n"
7313 "    }\n"
7314 msgstr ""
7315 "    if (argc != 2) {\n"
7316 "        fprintf(stderr, \"Usage: %s E<lt>stringE<gt>\\en\", argv[0]);\n"
7317 "        exit(EXIT_FAILURE);\n"
7318 "    }\n"
7319
7320 #. type: Plain text
7321 #: build/C/man2/pipe.2:206
7322 #, no-wrap
7323 msgid ""
7324 "    if (pipe(pipefd) == -1) {\n"
7325 "        perror(\"pipe\");\n"
7326 "        exit(EXIT_FAILURE);\n"
7327 "    }\n"
7328 msgstr ""
7329 "    if (pipe(pipefd) == -1) {\n"
7330 "        perror(\"pipe\");\n"
7331 "        exit(EXIT_FAILURE);\n"
7332 "    }\n"
7333
7334 #. type: Plain text
7335 #: build/C/man2/pipe.2:212
7336 #, no-wrap
7337 msgid ""
7338 "    cpid = fork();\n"
7339 "    if (cpid == -1) {\n"
7340 "        perror(\"fork\");\n"
7341 "        exit(EXIT_FAILURE);\n"
7342 "    }\n"
7343 msgstr ""
7344 "    cpid = fork();\n"
7345 "    if (cpid == -1) {\n"
7346 "        perror(\"fork\");\n"
7347 "        exit(EXIT_FAILURE);\n"
7348 "    }\n"
7349
7350 #. type: Plain text
7351 #: build/C/man2/pipe.2:215
7352 #, no-wrap
7353 msgid ""
7354 "    if (cpid == 0) {    /* Child reads from pipe */\n"
7355 "        close(pipefd[1]);          /* Close unused write end */\n"
7356 msgstr ""
7357 "    if (cpid == 0) {    /* 子プロセスがパイプから読み込む */\n"
7358 "        close(pipefd[1]);  /* 使用しない write 側はクローズする */\n"
7359
7360 #. type: Plain text
7361 #: build/C/man2/pipe.2:218
7362 #, no-wrap
7363 msgid ""
7364 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7365 "            write(STDOUT_FILENO, &buf, 1);\n"
7366 msgstr ""
7367 "        while (read(pipefd[0], &buf, 1) E<gt> 0)\n"
7368 "            write(STDOUT_FILENO, &buf, 1);\n"
7369
7370 #. type: Plain text
7371 #: build/C/man2/pipe.2:222
7372 #, no-wrap
7373 msgid ""
7374 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7375 "        close(pipefd[0]);\n"
7376 "        _exit(EXIT_SUCCESS);\n"
7377 msgstr ""
7378 "        write(STDOUT_FILENO, \"\\en\", 1);\n"
7379 "        close(pipefd[0]);\n"
7380 "        _exit(EXIT_SUCCESS);\n"
7381
7382 #. type: Plain text
7383 #: build/C/man2/pipe.2:231
7384 #, no-wrap
7385 msgid ""
7386 "    } else {            /* Parent writes argv[1] to pipe */\n"
7387 "        close(pipefd[0]);          /* Close unused read end */\n"
7388 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7389 "        close(pipefd[1]);          /* Reader will see EOF */\n"
7390 "        wait(NULL);                /* Wait for child */\n"
7391 "        exit(EXIT_SUCCESS);\n"
7392 "    }\n"
7393 "}\n"
7394 msgstr ""
7395 "    } else {            /* 親プロセスは argv[1] をパイプへ書き込む */\n"
7396 "        close(pipefd[0]);          /* 使用しない read 側はクローズする */\n"
7397 "        write(pipefd[1], argv[1], strlen(argv[1]));\n"
7398 "        close(pipefd[1]);          /* 読み込み側が EOF に出会う */\n"
7399 "        wait(NULL);                /* 子プロセスを待つ */\n"
7400 "        exit(EXIT_SUCCESS);\n"
7401 "    }\n"
7402 "}\n"
7403
7404 #. type: Plain text
7405 #: build/C/man2/pipe.2:239
7406 msgid "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>(7)"
7407 msgstr "B<fork>(2), B<read>(2), B<socketpair>(2), B<write>(2), B<popen>(3), B<pipe>(7)"
7408
7409 #. type: TH
7410 #: build/C/man3/popen.3:40
7411 #, no-wrap
7412 msgid "POPEN"
7413 msgstr "POPEN"
7414
7415 #. type: Plain text
7416 #: build/C/man3/popen.3:43
7417 msgid "popen, pclose - pipe stream to or from a process"
7418 msgstr "popen, pclose - プロセスとの入力/出力用のパイプストリーム"
7419
7420 #. type: Plain text
7421 #: build/C/man3/popen.3:48
7422 #, no-wrap
7423 msgid "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7424 msgstr "B<FILE *popen(const char *>I<command>B<, const char *>I<type>B<);>\n"
7425
7426 #. type: Plain text
7427 #: build/C/man3/popen.3:50
7428 #, no-wrap
7429 msgid "B<int pclose(FILE *>I<stream>B<);>\n"
7430 msgstr "B<int pclose(FILE *>I<stream>B<);>\n"
7431
7432 #. type: Plain text
7433 #: build/C/man3/popen.3:60
7434 msgid "B<popen>(), B<pclose>():"
7435 msgstr "B<popen>(), B<pclose>():"
7436
7437 #. type: Plain text
7438 #: build/C/man3/popen.3:62
7439 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7440 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 2 || _XOPEN_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
7441
7442 #. type: Plain text
7443 #: build/C/man3/popen.3:73
7444 msgid "The B<popen>()  function opens a process by creating a pipe, forking, and invoking the shell.  Since a pipe is by definition unidirectional, the I<type> argument may specify only reading or writing, not both; the resulting stream is correspondingly read-only or write-only."
7445 msgstr "B<popen>()  関数は、プロセスをオープンする。具体的には、 パイプを生成し、フォークを行い、シェルを起動する。 定義から分かるように、パイプは一方向なので、 I<type> 引き数には読み込みか書き込みのどちらか一方だけを指定できる (両方は指定できない)。 生成されるストリームは、この指定に対応して、読み取り専用または 書き込み専用のいずれかとなる。"
7446
7447 #. type: Plain text
7448 #: build/C/man3/popen.3:97
7449 msgid "The I<command> argument is a pointer to a null-terminated string containing a shell command line.  This command is passed to I</bin/sh> using the B<-c> flag; interpretation, if any, is performed by the shell.  The I<type> argument is a pointer to a null-terminated string which must contain either the letter \\(aqr\\(aq for reading or the letter \\(aqw\\(aq for writing.  Since glibc 2.9, this argument can additionally include the letter \\(aqe\\(aq, which causes the close-on-exec flag (B<FD_CLOEXEC>)  to be set on the underlying file descriptor; see the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this may be useful."
7450 msgstr "I<command> 引き数は、シェルのコマンドラインを含むヌル終端された文字列へのポインタである。 このコマンドは B<-c> フラグを用いて I</bin/sh> に渡される。 コマンドの解釈は (もし必要ならば) シェルによって行われる。 I<type> 引き数は、ヌル終端された文字列へのポインタで、 読み込みを示す文字 \\(aqr\\(aq か、書き込みを示す文字 \\(aqw\\(aq の どちらか一方を指定しなければならない。 glibc 2.9 以降では、この引き数に文字 \\(aqe\\(aq を追加で指定できる。 文字 \\(aqe\\(aq を指定すると、 対応するファイルディスクリプタにおいて、 close-on-exec フラグ (B<FD_CLOEXEC>)  がセットされる。 これが役に立つ理由については、 B<open>(2)  の B<O_CLOEXEC> フラグの説明を参照のこと。"
7451
7452 #. type: Plain text
7453 #: build/C/man3/popen.3:113
7454 msgid "The return value from B<popen>()  is a normal standard I/O stream in all respects save that it must be closed with B<pclose>()  rather than B<fclose>(3).  Writing to such a stream writes to the standard input of the command; the command's standard output is the same as that of the process that called B<popen>(), unless this is altered by the command itself.  Conversely, reading from the stream reads the command's standard output, and the command's standard input is the same as that of the process that called B<popen>()."
7455 msgstr "B<popen>()  からの返り値は、通常の標準 I/O ストリームと同じであるが、 B<fclose>(3)  ではなく B<pclose>()  で閉じなくてはならないことだけが異なる。 このストリームへ書き込んだ結果はコマンドの標準入力に書き込まれる。 そして、コマンドの標準出力は、 コマンドそのものが置き換わってしまわない限り、 B<popen>()  を呼んだプロセスの標準出力と同じことになる。 逆に、 ストリームからの読み込みは、 そのコマンドの標準出力を読み込むことになる。 そして、そのコマンドの標準入力は B<popen>()  を呼んだプロセスの標準入力と同一である。"
7456
7457 #. type: Plain text
7458 #: build/C/man3/popen.3:117
7459 msgid "Note that output B<popen>()  streams are fully buffered by default."
7460 msgstr "デフォルトでは、 B<popen>()  の出力ストリームは完全にバッファリングされることに注意しよう。"
7461
7462 #. type: Plain text
7463 #: build/C/man3/popen.3:123
7464 msgid "The B<pclose>()  function waits for the associated process to terminate and returns the exit status of the command as returned by B<wait4>(2)."
7465 msgstr "B<pclose>()  関数は、(パイプに) 関連づけられたプロセスが終了するのを待ち、 B<wait4>(2)  によって返されたコマンドの終了状態を返す。"
7466
7467 #. type: Plain text
7468 #: build/C/man3/popen.3:131
7469 msgid "The B<popen>()  function returns NULL if the B<fork>(2)  or B<pipe>(2)  calls fail, or if it cannot allocate memory."
7470 msgstr "B<popen>()  関数は、 B<fork>(2)  または B<pipe>(2)  呼び出しが失敗した場合や、 メモリ割り当てができなかった場合、 NULL を返す。"
7471
7472 #.  These conditions actually give undefined results, so I commented
7473 #.  them out.
7474 #.  .I stream
7475 #.  is not associated with a "popen()ed" command, if
7476 #. .I stream
7477 #.  already "pclose()d", or if
7478 #. type: Plain text
7479 #: build/C/man3/popen.3:146
7480 msgid "The B<pclose>()  function returns -1 if B<wait4>(2)  returns an error, or some other error is detected.  In the event of an error, these functions set I<errno> to indicate the cause of the error."
7481 msgstr "B<pclose>()  関数は、 B<wait4>(2)  がエラーを返したり、何か他のエラーが見つかった場合、 -1 を返す。 その場合、 I<errno> にエラーの原因を示す値が設定される。"
7482
7483 #. type: Plain text
7484 #: build/C/man3/popen.3:165
7485 msgid "The B<popen>()  function does not set I<errno> if memory allocation fails.  If the underlying B<fork>(2)  or B<pipe>(2)  fails, I<errno> is set appropriately.  If the I<type> argument is invalid, and this condition is detected, I<errno> is set to B<EINVAL>."
7486 msgstr "B<popen>()  関数は、メモリアロケーションに失敗しても I<errno> をセットしない。 B<popen>()  が中で呼び出す B<fork>(2)  や B<pipe>(2)  が失敗した場合には、 I<errno> が適切にセットされる。 引き数 I<type> が無効であり、この状態が検知された場合には、 I<errno> が B<EINVAL> にセットされる。"
7487
7488 #. type: Plain text
7489 #: build/C/man3/popen.3:172
7490 msgid "If B<pclose>()  cannot obtain the child status, I<errno> is set to B<ECHILD>."
7491 msgstr "B<pclose>()  が、子プロセスの状態を取得できなかった場合、 I<errno> が B<ECHILD> にセットされる。"
7492
7493 #. type: Plain text
7494 #: build/C/man3/popen.3:178
7495 msgid "The \\(aqe\\(aq value for I<type> is a Linux extension."
7496 msgstr "I<type> に指定できる \\(aqe\\(aq は Linux での拡張である。"
7497
7498 #. type: Plain text
7499 #: build/C/man3/popen.3:191
7500 msgid "Since the standard input of a command opened for reading shares its seek offset with the process that called B<popen>(), if the original process has done a buffered read, the command's input position may not be as expected.  Similarly, the output from a command opened for writing may become intermingled with that of the original process.  The latter can be avoided by calling B<fflush>(3)  before B<popen>()."
7501 msgstr "読み込みのために開かれたコマンドの標準入力は B<popen>(), を呼んだプロセスと一緒に、その読み取り位置を共有する。 そのため、もとのプロセスがバッファリングされた読み取りを終了したら、 そのコマンドの入力位置は予想されたものには なっていないかもしれない。 同様に、書き込みのために開かれたコマンドからの出力は、 もとのプロセスの出力と混ざり合うことになるかもしれない。 後者は B<popen>()  の前に B<fflush>(3)  を呼び出すことによって回避可能である。"
7502
7503 #.  .SH HISTORY
7504 #.  A
7505 #.  .BR popen ()
7506 #.  and a
7507 #.  .BR pclose ()
7508 #.  function appeared in Version 7 AT&T UNIX.
7509 #. type: Plain text
7510 #: build/C/man3/popen.3:201
7511 msgid "Failure to execute the shell is indistinguishable from the shell's failure to execute command, or an immediate exit of the command.  The only hint is an exit status of 127."
7512 msgstr "シェルの実行の失敗は、 シェルがコマンドの実行に失敗したことや、 コマンドがすぐに終了してしまったことと、区別がつかない。 唯一のヒントは終了状態が 127 になることである。"
7513
7514 #. type: Plain text
7515 #: build/C/man3/popen.3:211
7516 msgid "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<stdio>(3), B<system>(3)"
7517 msgstr "B<sh>(1), B<fork>(2), B<pipe>(2), B<wait4>(2), B<fclose>(3), B<fflush>(3), B<fopen>(3), B<stdio>(3), B<system>(3)"
7518
7519 #. type: TH
7520 #: build/C/man3/printf.3:34
7521 #, no-wrap
7522 msgid "PRINTF"
7523 msgstr "PRINTF"
7524
7525 #. type: Plain text
7526 #: build/C/man3/printf.3:38
7527 msgid "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - formatted output conversion"
7528 msgstr "printf, fprintf, sprintf, snprintf, vprintf, vfprintf, vsprintf, vsnprintf - 指定された書式に変換して出力を行う"
7529
7530 #. type: Plain text
7531 #: build/C/man3/printf.3:42
7532 msgid "B<int printf(const char *>I<format>B<, ...);>"
7533 msgstr "B<int printf(const char *>I<format>B<, ...);>"
7534
7535 #. type: Plain text
7536 #: build/C/man3/printf.3:44
7537 msgid "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7538 msgstr "B<int fprintf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>"
7539
7540 #. type: Plain text
7541 #: build/C/man3/printf.3:46
7542 msgid "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7543 msgstr "B<int sprintf(char *>I<str>B<, const char *>I<format>B<, ...);>"
7544
7545 #. type: Plain text
7546 #: build/C/man3/printf.3:48
7547 msgid "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char *>I<format>B<, ...);>"
7548 msgstr "B<int snprintf(char *>I<str>B<, size_t >I<size>B<, const char *>I<format>B<, ...);>"
7549
7550 #. type: Plain text
7551 #: build/C/man3/printf.3:50
7552 msgid "B<#include E<lt>stdarg.hE<gt>>"
7553 msgstr "B<#include E<lt>stdarg.hE<gt>>"
7554
7555 #. type: Plain text
7556 #: build/C/man3/printf.3:52
7557 msgid "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7558 msgstr "B<int vprintf(const char *>I<format>B<, va_list >I<ap>B<);>"
7559
7560 #. type: Plain text
7561 #: build/C/man3/printf.3:54
7562 msgid "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7563 msgstr "B<int vfprintf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7564
7565 #. type: Plain text
7566 #: build/C/man3/printf.3:56
7567 msgid "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7568 msgstr "B<int vsprintf(char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7569
7570 #. type: Plain text
7571 #: build/C/man3/printf.3:59
7572 msgid "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7573 msgstr "B<int vsnprintf(char *>I<str>B<, size_t >I<size>B<, const char *>I<format>B<, va_list >I<ap>B<);>"
7574
7575 #. type: Plain text
7576 #: build/C/man3/printf.3:68
7577 msgid "B<snprintf>(), B<vsnprintf>():"
7578 msgstr "B<snprintf>(), B<vsnprintf>():"
7579
7580 #. type: Plain text
7581 #: build/C/man3/printf.3:71
7582 msgid "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7583 msgstr "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
7584
7585 #. type: Plain text
7586 #: build/C/man3/printf.3:74 build/C/man3/scanf.3:85
7587 msgid "or I<cc -std=c99>"
7588 msgstr "または I<cc -std=c99>"
7589
7590 #. type: Plain text
7591 #: build/C/man3/printf.3:101
7592 msgid "The functions in the B<printf>()  family produce output according to a I<format> as described below.  The functions B<printf>()  and B<vprintf>()  write output to I<stdout>, the standard output stream; B<fprintf>()  and B<vfprintf>()  write output to the given output I<stream>; B<sprintf>(), B<snprintf>(), B<vsprintf>()  and B<vsnprintf>()  write to the character string I<str>."
7593 msgstr "B<printf>()  関数グループは、以下で述べるように、 I<format> に従って出力を生成するものである。 B<printf>()  と B<vprintf>()  は出力を I<stdout> (標準出力ストリーム) に書き出す。 B<fprintf>()  と B<vfprintf>()  は出力を指定された出力 I<stream> に書き出す。 B<sprintf>(), B<snprintf>(), B<vsprintf>(), B<vsnprintf>()  は出力を文字列 I<str> に書き込む。"
7594
7595 #. type: Plain text
7596 #: build/C/man3/printf.3:110
7597 msgid "The functions B<snprintf>()  and B<vsnprintf>()  write at most I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)) to I<str>."
7598 msgstr "B<snprintf>()  と B<vsnprintf>()  は最大で I<size> バイトを I<str> に書き込む (I<size> には文字列を終端するヌルバイト (\\(aq\\e0\\(aq) もを含まれる)。"
7599
7600 #. type: Plain text
7601 #: build/C/man3/printf.3:134
7602 msgid "The functions B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  are equivalent to the functions B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), respectively, except that they are called with a I<va_list> instead of a variable number of arguments.  These functions do not call the I<va_end> macro.  Because they invoke the I<va_arg> macro, the value of I<ap> is undefined after the call.  See B<stdarg>(3)."
7603 msgstr "B<vprintf>(), B<vfprintf>(), B<vsprintf>(), B<vsnprintf>()  の各関数はそれぞれ B<printf>(), B<fprintf>(), B<sprintf>(), B<snprintf>(), の各関数と等価であり、可変数引き数の代わりに I<va_list> を引き数として呼び出される点だけが異なる。 これらの関数では I<va_end> マクロは呼び出されない。 これらの関数は I<va_arg> を呼び出すので、呼び出し後の I<ap> の値は未定義である。 B<stdarg>(3)  を参照のこと。"
7604
7605 #. type: Plain text
7606 #: build/C/man3/printf.3:141
7607 msgid "These eight functions write the output under the control of a I<format> string that specifies how subsequent arguments (or arguments accessed via the variable-length argument facilities of B<stdarg>(3))  are converted for output."
7608 msgstr "これらの 8 つの関数は I<format> 文字列の制御に従って出力を書き出す。 I<format> 文字列は、これに続く引き数 (または B<stdarg>(3)  の可変長引き数機構を使ってアクセスできる引き数)  をどのように変換して出力するかを指定する。"
7609
7610 #. type: Plain text
7611 #: build/C/man3/printf.3:152
7612 msgid "C99 and POSIX.1-2001 specify that the results are undefined if a call to B<sprintf>(), B<snprintf>(), B<vsprintf>(), or B<vsnprintf>()  would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer).  See NOTES."
7613 msgstr "C99 と POSIX.1-2001 では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), B<vsnprintf>()  の呼び出しで、範囲が重複するオブジェクト間でコピーが発生する場合の 結果は不定であると規定されている (例えば、出力先の文字列と入力された 引き数の一つが同じバッファを参照している場合などである)。 「注意」の節を参照。"
7614
7615 #. type: SS
7616 #: build/C/man3/printf.3:152
7617 #, no-wrap
7618 msgid "Return value"
7619 msgstr "Return Values"
7620
7621 #. type: Plain text
7622 #: build/C/man3/printf.3:155
7623 msgid "Upon successful return, these functions return the number of characters printed (excluding the null byte used to end output to strings)."
7624 msgstr "成功時には、上記の関数は書き込まれた文字数を返す (文字列の最後を示すために使用するヌルバイトは数に含まれない)。"
7625
7626 #. type: Plain text
7627 #: build/C/man3/printf.3:171
7628 msgid "The functions B<snprintf>()  and B<vsnprintf>()  do not write more than I<size> bytes (including the terminating null byte (\\(aq\\e0\\(aq)).  If the output was truncated due to this limit, then the return value is the number of characters (excluding the terminating null byte)  which would have been written to the final string if enough space had been available.  Thus, a return value of I<size> or more means that the output was truncated.  (See also below under NOTES.)"
7629 msgstr "B<snprintf>()  と B<vsnprintf>()  は、 I<size> バイトを越える文字数を書き込まない (I<size> には文字列を終端するヌルバイト (\\(aq\\e0\\(aq) も含まれる)。 この制限によって出力が切り詰められた場合には、 もし十分なスペースがあれば書き込まれたであろう文字の個数 (文字列を終端するヌルバイトを除く) を返す。 従って、返り値が I<size> 以上だった場合、出力が切り詰められたことを意味する (後述の注意も参照のこと)。"
7630
7631 #. type: Plain text
7632 #: build/C/man3/printf.3:173
7633 msgid "If an output error is encountered, a negative value is returned."
7634 msgstr "エラーが発生した場合は、負の数を返す。"
7635
7636 #. type: SS
7637 #: build/C/man3/printf.3:173
7638 #, no-wrap
7639 msgid "Format of the format string"
7640 msgstr "フォーマット文字列のフォーマット"
7641
7642 #. type: Plain text
7643 #: build/C/man3/printf.3:195
7644 msgid "The format string is a character string, beginning and ending in its initial shift state, if any.  The format string is composed of zero or more directives: ordinary characters (not B<%>), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching zero or more subsequent arguments.  Each conversion specification is introduced by the character B<%>, and ends with a I<conversion specifier>.  In between there may be (in this order) zero or more I<flags>, an optional minimum I<field width>, an optional I<precision> and an optional I<length modifier>."
7645 msgstr "フォーマット文字列は文字の列で、 (もしあるなら) 初期シフト状態で始まり、初期シフト状態で終わる。 フォーマット用の文字列は 0 個以上の命令 (directives) によって構成される。 命令には、通常文字と変換指定 (conversion specifications) がある。 通常文字は B<%> 以外の文字で、出力ストリームにそのままコピーされる。 変換指定は、それぞれが 0 個以上の引き数を取る。 各変換指定は文字 B<%> で始まり、 I<変換指定子 (conversion specifier)> で終わる。 B<%> と変換指定子の間には、0 個以上の I<フラグ 、> 最小 I<フィールド幅 、> I<精度 、> I<長さ修飾子> を (この順序で) 置くことができる。"
7646
7647 #. type: Plain text
7648 #: build/C/man3/printf.3:208
7649 msgid "The arguments must correspond properly (after type promotion) with the conversion specifier.  By default, the arguments are used in the order given, where each \\(aq*\\(aq and each conversion specifier asks for the next argument (and it is an error if insufficiently many arguments are given).  One can also specify explicitly which argument is taken, at each place where an argument is required, by writing \"%m$\" instead of \\(aq%\\(aq and \"*m$\" instead of \\(aq*\\(aq, where the decimal integer m denotes the position in the argument list of the desired argument, indexed starting from 1.  Thus,"
7650 msgstr "引き数は (型の格上げの後は) 変換指定子が表す型と正確に対応しなければならない。 デフォルトでは、\\(aq*\\(aq や変換指定子が出てくる毎に次の引き数を要求され、 引き数は指定された順序で使用されていく (指定された引き数の個数が不十分ならエラーとなる)。 また、引き数が必要な箇所で \\(aq%\\(aq の代わりに \"%m$\"、 \\(aq*\\(aqの代わりに \"*m$\" と書くことで、 明示的にどの引き数を使用するかを指定することもできる。 ここで 10進の整数 m は希望の引き数の引き数リストでの位置を示す (最初の引き数の番号が 1 である)。 従って、"
7651
7652 #. type: Plain text
7653 #: build/C/man3/printf.3:212
7654 #, no-wrap
7655 msgid "printf(\"%*d\", width, num);\n"
7656 msgstr "printf(\"%*d\", width, num);\n"
7657
7658 #. type: Plain text
7659 #: build/C/man3/printf.3:216
7660 msgid "and"
7661 msgstr "と"
7662
7663 #. type: Plain text
7664 #: build/C/man3/printf.3:220
7665 #, no-wrap
7666 msgid "printf(\"%2$*1$d\", width, num);\n"
7667 msgstr "printf(\"%2$*1$d\", width, num);\n"
7668
7669 #. type: Plain text
7670 #: build/C/man3/printf.3:236
7671 msgid "are equivalent.  The second style allows repeated references to the same argument.  The C99 standard does not include the style using \\(aq$\\(aq, which comes from the Single UNIX Specification.  If the style using \\(aq$\\(aq is used, it must be used throughout for all conversions taking an argument and all width and precision arguments, but it may be mixed with \"%%\" formats which do not consume an argument.  There may be no gaps in the numbers of arguments specified using \\(aq$\\(aq; for example, if arguments 1 and 3 are specified, argument 2 must also be specified somewhere in the format string."
7672 msgstr "は等価である。 二番目の書き方では同じ引き数を繰り返し参照することができる。 C99 標準には、 Single UNIX Specification 由来の \\(aq$\\(aq を使った書き方は含まれていない。 \\(aq$\\(aq を使ったスタイルを使うと、引き数を取る変換及び幅と精度の引き数を 全てこのスタイルで指定しなければならないが、 引き数を消費しない \"%%\" フォーマットと混ざっているかもしれない。 \\(aq$\\(aq で指定される引き数の番号に空きがあってはならない。 例えば、もし引き数 1 と 3 が指定されると、引き数 2 もフォーマット文字列のどこかで 指定されなければならない。"
7673
7674 #. type: Plain text
7675 #: build/C/man3/printf.3:246
7676 msgid "For some numeric conversions a radix character (\"decimal point\") or thousands' grouping character is used.  The actual character used depends on the B<LC_NUMERIC> part of the locale.  The POSIX locale uses \\(aq.\\(aq as radix character, and does not have a grouping character.  Thus,"
7677 msgstr "数値変換には小数点や 1000 単位の区切り文字を使うものもある。 実際にどの文字を使うかはロケールの B<LC_NUMERIC> による。 POSIX ロケールでは小数点に \\(aq.\\(aq を用い、 区切り文字は使わない。 従って、"
7678
7679 #. type: Plain text
7680 #: build/C/man3/printf.3:250
7681 #, no-wrap
7682 msgid "    printf(\"%\\(aq.2f\", 1234567.89);\n"
7683 msgstr "printf(\"%\\(aq.2f\", 1234567.89);\n"
7684
7685 #. type: Plain text
7686 #: build/C/man3/printf.3:255
7687 msgid "results in \"1234567.89\" in the POSIX locale, in \"1234567,89\" in the nl_NL locale, and in \"1.234.567,89\" in the da_DK locale."
7688 msgstr "は、 POSIX ロケールでは \"1234567.89\" 、 nl_NL ロケールでは \"1234567,89\"、 da_DK ロケールでは \"1.234.567,89\" となる。"
7689
7690 #. type: SS
7691 #: build/C/man3/printf.3:255
7692 #, no-wrap
7693 msgid "The flag characters"
7694 msgstr "フラグ文字"
7695
7696 #. type: Plain text
7697 #: build/C/man3/printf.3:257
7698 msgid "The character % is followed by zero or more of the following flags:"
7699 msgstr "% 文字の後ろには 0 個以上のフラグ文字が続く。"
7700
7701 #. type: TP
7702 #: build/C/man3/printf.3:257
7703 #, no-wrap
7704 msgid "B<#>"
7705 msgstr "B<#>"
7706
7707 #. type: Plain text
7708 #: build/C/man3/printf.3:291
7709 msgid "The value should be converted to an \"alternate form\".  For B<o> conversions, the first character of the output string is made zero (by prefixing a 0 if it was not zero already).  For B<x> and B<X> conversions, a nonzero result has the string \"0x\" (or \"0X\" for B<X> conversions) prepended to it.  For B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the result will always contain a decimal point, even if no digits follow it (normally, a decimal point appears in the results of those conversions only if a digit follows).  For B<g> and B<G> conversions, trailing zeros are not removed from the result as they would otherwise be.  For other conversions, the result is undefined."
7710 msgstr "値は「別の形式」に変換される。 B<o> 変換の場合、(先頭文字が 0 になっていない場合に先頭に 0 を追加することで)  出力文字列の最初の文字を 0 にする。 B<x> と B<X> 変換の場合、数値が 0 でないときには文字列 \"0x\" (B<X> 変換の場合には \"0X\") が前に付与される。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換では、 小数点に続く数字がなくても、 出力には常に小数点が含まれる (通常は、小数点の後に数字が続く場合にのみ、 小数点が表示される)。 B<g> と B<G> 変換の場合、他の変換とは異なり、末尾のゼロが変換結果から削除されない。 その他の変換では、結果は未定義である。"
7711
7712 #. type: TP
7713 #: build/C/man3/printf.3:291
7714 #, no-wrap
7715 msgid "B<\\&0>"
7716 msgstr "B<\\&0>"
7717
7718 #. type: Plain text
7719 #: build/C/man3/printf.3:331
7720 msgid "The value should be zero padded.  For B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, and B<G> conversions, the converted value is padded on the left with zeros rather than blanks.  If the B<\\&0> and B<-> flags both appear, the B<\\&0> flag is ignored.  If a precision is given with a numeric conversion (B<d>, B<i>, B<o>, B<u>, B<x>, and B<X>), the B<\\&0> flag is ignored.  For other conversions, the behavior is undefined."
7721 msgstr "値をゼロで埋める。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換では、変換した値の左側を空白文字の代わりにゼロで埋める。 B<\\&0> と B<-> が両方とも指定された場合は、 B<\\&0> フラグは無視される。 精度が数値変換 (B<d>, B<i>, B<o>, B<u>, B<x>, B<X>)  と同時に指定された場合には、 B<\\&0> フラグは無視される。 その他の変換では、動作は未定義である。"
7722
7723 #. type: TP
7724 #: build/C/man3/printf.3:331
7725 #, no-wrap
7726 msgid "B<->"
7727 msgstr "B<->"
7728
7729 #. type: Plain text
7730 #: build/C/man3/printf.3:342
7731 msgid "The converted value is to be left adjusted on the field boundary.  (The default is right justification.)  The converted value is padded on the right with blanks, rather than on the left with blanks or zeros.  A B<-> overrides a B<\\&0> if both are given."
7732 msgstr "変換値をフィールド境界で左揃えにする (デフォルトは右揃えである)。 変換された値は 左側ではなく右側を空白文字やゼロで埋められる。 B<-> と B<\\&0> の両方が指定された場合には、 B<-> が優先される。"
7733
7734 #. type: TP
7735 #: build/C/man3/printf.3:342
7736 #, no-wrap
7737 msgid "B<\\(aq \\(aq>"
7738 msgstr "B<' '>"
7739
7740 #. type: Plain text
7741 #: build/C/man3/printf.3:346
7742 msgid "(a space) A blank should be left before a positive number (or empty string) produced by a signed conversion."
7743 msgstr "(1個の半角スペース)  符号付き変換で生成された正の数字の前に空白 (または空文字列) が置かれる。"
7744
7745 #. type: TP
7746 #: build/C/man3/printf.3:346
7747 #, no-wrap
7748 msgid "B<+>"
7749 msgstr "B<+>"
7750
7751 #. type: Plain text
7752 #: build/C/man3/printf.3:354
7753 msgid "A sign (+ or -) should always be placed before a number produced by a signed conversion.  By default a sign is used only for negative numbers.  A B<+> overrides a space if both are used."
7754 msgstr "符号付き変換によって出力される数字の前に、常に符号 (+ か -) が置かれる。 デフォルトでは、符号は負の数字の場合のみ付与される。 B<+> と半角スペースの 両方が使われている場合には、 B<+> が優先される。"
7755
7756 #. type: Plain text
7757 #: build/C/man3/printf.3:357
7758 msgid "The five flag characters above are defined in the C99 standard.  The Single UNIX Specification specifies one further flag character."
7759 msgstr "上記の 5 つのフラグは C99 標準で定義されている。 Single UNIX Specified では、さらにもう一つフラグ文字が規定されている。"
7760
7761 #. type: TP
7762 #: build/C/man3/printf.3:357
7763 #, no-wrap
7764 msgid "B<\\(aq>"
7765 msgstr "B<\\(aq>"
7766
7767 #. type: Plain text
7768 #: build/C/man3/printf.3:374
7769 msgid "For decimal conversion (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  the output is to be grouped with thousands' grouping characters if the locale information indicates any.  Note that many versions of B<gcc>(1)  cannot parse this option and will issue a warning.  (SUSv2 did not include I<%\\(aqF>, but SUSv3 added it.)"
7770 msgstr "10進数変換 (B<i>, B<d>, B<u>, B<f>, B<F>, B<g>, B<G>)  において、ロケール情報に指定があれば 1000 単位の区切り文字を出力する。 B<gcc>(1)  の多くのバージョンは、このオプションを解釈することができず、 警告を出力することに注意せよ。 (I<%\\(aqF> は SUSv2 には含まれていなかったが、 SUSv3 で追加された。"
7771
7772 #. type: Plain text
7773 #: build/C/man3/printf.3:376
7774 msgid "glibc 2.2 adds one further flag character."
7775 msgstr "glibc 2.2 では、さらに一つフラグ文字が追加されている。"
7776
7777 #. type: TP
7778 #: build/C/man3/printf.3:376
7779 #, no-wrap
7780 msgid "B<I>"
7781 msgstr "B<I>"
7782
7783 #.  outdigits keyword in locale file
7784 #. type: Plain text
7785 #: build/C/man3/printf.3:386
7786 msgid "For decimal integer conversion (B<i>, B<d>, B<u>)  the output uses the locale's alternative output digits, if any.  For example, since glibc 2.2.3 this will give Arabic-Indic digits in the Persian (\"fa_IR\") locale."
7787 msgstr "10進整数変換 (B<i>, B<d>, B<u>)  において、ロケールの代替出力数字があれば、それを用いて出力する。 例えば、 glibc 2.2.3 以降では、ペルシア (\"fa_IR\") ロケールで アラビア数字 (Arabic-Indic digits) を出力できる。"
7788
7789 #. type: SS
7790 #: build/C/man3/printf.3:386
7791 #, no-wrap
7792 msgid "The field width"
7793 msgstr "フィールド幅"
7794
7795 #. type: Plain text
7796 #: build/C/man3/printf.3:402
7797 msgid "An optional decimal digit string (with nonzero first digit) specifying a minimum field width.  If the converted value has fewer characters than the field width, it will be padded with spaces on the left (or right, if the left-adjustment flag has been given).  Instead of a decimal digit string one may write \"*\" or \"*m$\" (for some decimal integer I<m>) to specify that the field width is given in the next argument, or in the I<m>-th argument, respectively, which must be of type I<int>.  A negative field width is taken as a \\(aq-\\(aq flag followed by a positive field width.  In no case does a nonexistent or small field width cause truncation of a field; if the result of a conversion is wider than the field width, the field is expanded to contain the conversion result."
7798 msgstr "最小のフィールド幅を指定する 10進数の数値文字列 (文字列の最初の文字は ゼロ以外)。本項目はオプションである。 変換された値の文字数がフィールド長よりも少ない場合、 フィールドの左側をスペースで埋める (左揃えのフラグがある場合は右側を埋める)。 10進数の文字列の代わりに \"*\" や \"*m$\" (I<m> は 10進整数) を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と I<m> 番目の引き数をフィールド幅として 使うことを指定する (これらの引き数は I<int> 型でなければならない)。 フィールド幅に負の数が指定された場合は、 \\(aq-\\(aq フラグと正の数のフィールド幅として扱われる。 フィールド幅が小さかったり指定がなかったりしても、フィールドが切り詰められる ことはない。もし変換結果がフィールド幅よりも広かった場合、 フィールドは変換結果が入る幅に広げられる。"
7799
7800 #. type: SS
7801 #: build/C/man3/printf.3:402
7802 #, no-wrap
7803 msgid "The precision"
7804 msgstr "精度"
7805
7806 #. type: Plain text
7807 #: build/C/man3/printf.3:439
7808 msgid "An optional precision, in the form of a period (\\(aq.\\(aq)  followed by an optional decimal digit string.  Instead of a decimal digit string one may write \"*\" or \"*m$\" (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, respectively, which must be of type I<int>.  If the precision is given as just \\(aq.\\(aq, the precision is taken to be zero.  A negative precision is taken as if the precision were omitted.  This gives the minimum number of digits to appear for B<d>, B<i>, B<o>, B<u>, B<x>, and B<X> conversions, the number of digits to appear after the radix character for B<a>, B<A>, B<e>, B<E>, B<f>, and B<F> conversions, the maximum number of significant digits for B<g> and B<G> conversions, or the maximum number of characters to be printed from a string for B<s> and B<S> conversions."
7809 msgstr "オプションである精度は、ピリオド (\\(aq.\\(aq) とそれに続く10進数という 形式で指定する (10進数はオプション) 。 10進数の文字列の代わりに \"*\" や \"*m$\" (m は 10 進整数)を書くこともできる。 \"*\" と \"*m$\" はそれぞれ、次の引き数と m 番目の引き数を精度として 使うことを指定する (これらの引き数は I<int> 型でなければならない)。 精度として \\(aq.\\(aq だけが指定された場合、 精度はゼロとみなされる。 精度が負の数だった場合、 精度は指定されなかったものとみなされる。 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換では、表示される最小の桁数を指定する。 B<a>, B<A>, B<e>, B<E>, B<f>, B<F> 変換では、小数点以下に表示される数字の桁数を指定する。 B<g> と B<G> 変換では、有効数字の最大桁数を指定する。 B<s> と B<S> 変換では、文字列から出力される最大文字数を指定する。"
7810
7811 #. type: SS
7812 #: build/C/man3/printf.3:439
7813 #, no-wrap
7814 msgid "The length modifier"
7815 msgstr "長さ修飾子"
7816
7817 #. type: Plain text
7818 #: build/C/man3/printf.3:449
7819 msgid "Here, \"integer conversion\" stands for B<d>, B<i>, B<o>, B<u>, B<x>, or B<X> conversion."
7820 msgstr "「整数変換」とは、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換のことである。"
7821
7822 #. type: TP
7823 #: build/C/man3/printf.3:449 build/C/man3/scanf.3:294
7824 #, no-wrap
7825 msgid "B<hh>"
7826 msgstr "B<hh>"
7827
7828 #. type: Plain text
7829 #: build/C/man3/printf.3:460
7830 msgid "A following integer conversion corresponds to a I<signed char> or I<unsigned char> argument, or a following B<n> conversion corresponds to a pointer to a I<signed char> argument."
7831 msgstr "整数変換に対応する引き数が I<signed char> か I<unsigned char> で、 B<n> 変換に対応する引き数が I<signed char> へのポインタであることを示す。"
7832
7833 #. type: TP
7834 #: build/C/man3/printf.3:460 build/C/man3/scanf.3:284
7835 #, no-wrap
7836 msgid "B<h>"
7837 msgstr "B<h>"
7838
7839 #. type: Plain text
7840 #: build/C/man3/printf.3:471
7841 msgid "A following integer conversion corresponds to a I<short int> or I<unsigned short int> argument, or a following B<n> conversion corresponds to a pointer to a I<short int> argument."
7842 msgstr "整数変換に対応する引き数が I<short int> か I<unsigned short int> で、 B<n> 変換に対応する引き数が I<short int> へのポインタであることを示す。"
7843
7844 #. type: TP
7845 #: build/C/man3/printf.3:471 build/C/man3/scanf.3:311
7846 #, no-wrap
7847 msgid "B<l>"
7848 msgstr "B<l>"
7849
7850 #. type: Plain text
7851 #: build/C/man3/printf.3:490
7852 msgid "(ell) A following integer conversion corresponds to a I<long int> or I<unsigned long int> argument, or a following B<n> conversion corresponds to a pointer to a I<long int> argument, or a following B<c> conversion corresponds to a I<wint_t> argument, or a following B<s> conversion corresponds to a pointer to I<wchar_t> argument."
7853 msgstr "各変換に対応する引き数が、 整数変換では I<long int>か I<unsigned long int>、 B<n> 変換では I<long long int> へのポインタ、 B<c> 変換では I<wint_t>、 B<s> 変換では I<wchar_t> へのポインタであることを示す。"
7854
7855 #. type: TP
7856 #: build/C/man3/printf.3:490
7857 #, no-wrap
7858 msgid "B<ll>"
7859 msgstr "B<ll> (エルエル)"
7860
7861 #. type: Plain text
7862 #: build/C/man3/printf.3:502
7863 msgid "(ell-ell).  A following integer conversion corresponds to a I<long long int> or I<unsigned long long int> argument, or a following B<n> conversion corresponds to a pointer to a I<long long int> argument."
7864 msgstr "整数変換に対応する引き数が I<long long int> か I<unsigned long long int> で、 B<n> 変換に対応する引き数が I<long int> へのポインタであることを示す。"
7865
7866 #. type: TP
7867 #: build/C/man3/printf.3:502 build/C/man3/scanf.3:338
7868 #, no-wrap
7869 msgid "B<L>"
7870 msgstr "B<L>"
7871
7872 #.  .TP
7873 #.  .B q
7874 #.  ("quad". 4.4BSD and Linux libc5 only.
7875 #.  Don't use.)
7876 #. type: Plain text
7877 #: build/C/man3/printf.3:524
7878 msgid "A following B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, or B<G> conversion corresponds to a I<long double> argument.  (C99 allows %LF, but SUSv2 does not.)  This is a synonym for B<ll>."
7879 msgstr "B<a>, B<A>, B<e>, B<E>, B<f>, B<F>, B<g>, B<G> 変換に対応する引き数が I<long double> であることを示す。 (C99 では %LF を使うことを認めているが、SUSv2 では認められていない。) これは B<ll> の同義語である。"
7880
7881 #. type: TP
7882 #: build/C/man3/printf.3:524 build/C/man3/scanf.3:302
7883 #, no-wrap
7884 msgid "B<j>"
7885 msgstr "B<j>"
7886
7887 #. type: Plain text
7888 #: build/C/man3/printf.3:535
7889 msgid "A following integer conversion corresponds to an I<intmax_t> or I<uintmax_t> argument, or a following B<n> conversion corresponds to a pointer to an I<intmax_t> argument."
7890 msgstr "整数変換に対応する引き数が I<intmax_t> か I<uintmax_t> で、 B<n> 変換に対応する引き数が I<intmax_t> へのポインタであることを示す。"
7891
7892 #. type: TP
7893 #: build/C/man3/printf.3:535 build/C/man3/scanf.3:366
7894 #, no-wrap
7895 msgid "B<z>"
7896 msgstr "B<z>"
7897
7898 #.  (Linux libc5 has
7899 #.  .B Z
7900 #.  with this meaning.
7901 #.  Don't use it.)
7902 #. type: Plain text
7903 #: build/C/man3/printf.3:550
7904 msgid "A following integer conversion corresponds to a I<size_t> or I<ssize_t> argument, or a following B<n> conversion corresponds to a pointer to a I<size_t> argument."
7905 msgstr "整数変換に対応する引き数が I<size_t> か I<ssize_t> で、 B<n> 変換に対応する引き数が I<size_t> へのポインタであることを示す。"
7906
7907 #. type: TP
7908 #: build/C/man3/printf.3:550 build/C/man3/scanf.3:359
7909 #, no-wrap
7910 msgid "B<t>"
7911 msgstr "B<t>"
7912
7913 #. type: Plain text
7914 #: build/C/man3/printf.3:559
7915 msgid "A following integer conversion corresponds to a I<ptrdiff_t> argument, or a following B<n> conversion corresponds to a pointer to a I<ptrdiff_t> argument."
7916 msgstr "整数変換に対応する引き数が I<ptrdiff_t> で、 B<n> 変換に対応する引き数が I<ptrdiff_t> へのポインタであることを示す。"
7917
7918 #. type: Plain text
7919 #: build/C/man3/printf.3:589
7920 msgid "SUSv3 specifies all of the above.  SUSv2 specified only the length modifiers B<h> (in B<hd>, B<hi>, B<ho>, B<hx>, B<hX>, B<hn>)  and B<l> (in B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, B<ls>)  and B<L> (in B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)."
7921 msgstr "SUSv3 では上記のすべてが規定されている。 SUSv2 で規定されていたのは、 長さ修飾子 B<h> (B<hd>, B<hi>, B<ho>, B<hx>, B<hX>, B<hn>), B<l> (B<ld>, B<li>, B<lo>, B<lx>, B<lX>, B<ln>, B<lc>, B<ls>), B<L> (B<Le>, B<LE>, B<Lf>, B<Lg>, B<LG>)  だけであった。"
7922
7923 #. type: SS
7924 #: build/C/man3/printf.3:589
7925 #, no-wrap
7926 msgid "The conversion specifier"
7927 msgstr "変換指定子"
7928
7929 #. type: Plain text
7930 #: build/C/man3/printf.3:592
7931 msgid "A character that specifies the type of conversion to be applied.  The conversion specifiers and their meanings are:"
7932 msgstr "適用される変換の型を指定する文字。 変換指定子とその意味は以下の通りである。"
7933
7934 #. type: TP
7935 #: build/C/man3/printf.3:592
7936 #, no-wrap
7937 msgid "B<d>, B<i>"
7938 msgstr "B<d>, B<i>"
7939
7940 #. type: Plain text
7941 #: build/C/man3/printf.3:602
7942 msgid "The I<int> argument is converted to signed decimal notation.  The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros.  The default precision is 1.  When 0 is printed with an explicit precision 0, the output is empty."
7943 msgstr "I<int> 引き数を符号付き 10 進表記に変換する。 精度指定があれば、精度で指定した桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋められる。 デフォルトの精度は 1 である。 0 を表示しようとした時に、明示的に精度として 0 が指定されていると、 出力は空文字列となる。"
7944
7945 #. type: TP
7946 #: build/C/man3/printf.3:602
7947 #, no-wrap
7948 msgid "B<o>, B<u>, B<x>, B<X>"
7949 msgstr "B<o>, B<u>, B<x>, B<X>"
7950
7951 #. type: Plain text
7952 #: build/C/man3/printf.3:629
7953 msgid "The I<unsigned int> argument is converted to unsigned octal (B<o>), unsigned decimal (B<u>), or unsigned hexadecimal (B<x> and B<X>)  notation.  The letters B<abcdef> are used for B<x> conversions; the letters B<ABCDEF> are used for B<X> conversions.  The precision, if any, gives the minimum number of digits that must appear; if the converted value requires fewer digits, it is padded on the left with zeros.  The default precision is 1.  When 0 is printed with an explicit precision 0, the output is empty."
7954 msgstr "I<unsigned int> 引き数を、 符号なし8進数 (B<o>), 符号なし10進数 (B<u>), 符号なし16進数 (B<x> と B<X>)  に変換する。 B<x> 変換では B<abcdef> が使用され、 B<X> 変換では B<ABCDEF> が使用される。 精度指定があれば、精度で指定した桁数は必ず出力される。変換後の値が 指定された桁数に足りない場合は、左側が 0 で埋められる。"
7955
7956 #. type: TP
7957 #: build/C/man3/printf.3:629
7958 #, no-wrap
7959 msgid "B<e>, B<E>"
7960 msgstr "B<e>, B<E>"
7961
7962 #. type: Plain text
7963 #: build/C/man3/printf.3:648
7964 msgid "The I<double> argument is rounded and converted in the style [-]dB<\\&.>dddB<e>\\(+-dd where there is one digit before the decimal-point character and the number of digits after it is equal to the precision; if the precision is missing, it is taken as 6; if the precision is zero, no decimal-point character appears.  An B<E> conversion uses the letter B<E> (rather than B<e>)  to introduce the exponent.  The exponent always contains at least two digits; if the value is zero, the exponent is 00."
7965 msgstr ""
7966 "I<double> 引き数を丸めて [-]dB<\\&.>dddB<e>\\(+-dd の形に変換する。\n"
7967 "小数点の前には一桁の数字があり、小数点以下の桁数は精度で指定された桁数\n"
7968 "になる。精度は指定されなかった場合 6 とみなされる。 精度が 0 の場合には、\n"
7969 "小数点以下は表示されない。B<E> 変換では、指数を表現するときに (B<e> で\n"
7970 "はなく) B<E> が使われる。指数部分は少なくとも 2桁表示される。つまり、\n"
7971 "指数の値が 0 の場合には、00 と表示される。"
7972
7973 #. type: TP
7974 #: build/C/man3/printf.3:648
7975 #, no-wrap
7976 msgid "B<f>, B<F>"
7977 msgstr "B<f>, B<F>"
7978
7979 #. type: Plain text
7980 #: build/C/man3/printf.3:659
7981 msgid "The I<double> argument is rounded and converted to decimal notation in the style [-]dddB<\\&.>ddd, where the number of digits after the decimal-point character is equal to the precision specification.  If the precision is missing, it is taken as 6; if the precision is explicitly zero, no decimal-point character appears.  If a decimal point appears, at least one digit appears before it."
7982 msgstr "I<double> 引き数を丸めて [-]dddB<\\&.>ddd の形の10進表現に変換する。 小数点の後の桁数は、精度で指定された値となる。 精度が指定されていない場合には 6 として扱われる。 精度として明示的に 0 が指定されたときには、小数点以下は表示されない。 小数点を表示する際には、小数点の前に少なくとも一桁は数字が表示される。"
7983
7984 #. type: Plain text
7985 #: build/C/man3/printf.3:672
7986 msgid "(SUSv2 does not know about B<F> and says that character string representations for infinity and NaN may be made available.  SUSv3 adds a specification for B<F>.  The C99 standard specifies \"[-]inf\" or \"[-]infinity\" for infinity, and a string starting with \"nan\" for NaN, in the case of B<f> conversion, and \"[-]INF\" or \"[-]INFINITY\" or \"NAN*\" in the case of B<F> conversion.)"
7987 msgstr "(SUSv2 では、B<F> は規定されておらず、無限や NaN に関する文字列表現を行ってもよいことになっている。 SUSv3 では B<F> の規定が追加された。 C99 標準では、B<f> 変換では、無限は \"[-]inf\" か \"[-]infinity\" と表示し、 NaN は文字列の先頭に `nan' をつけて表示するように規定されている。 B<F> 変換の場合は \"[-]INF\", \"[-]INFINITY\", \"NAN*\" と表示される。)"
7988
7989 #. type: TP
7990 #: build/C/man3/printf.3:672
7991 #, no-wrap
7992 msgid "B<g>, B<G>"
7993 msgstr "B<g>, B<G>"
7994
7995 #. type: Plain text
7996 #: build/C/man3/printf.3:697
7997 msgid "The I<double> argument is converted in style B<f> or B<e> (or B<F> or B<E> for B<G> conversions).  The precision specifies the number of significant digits.  If the precision is missing, 6 digits are given; if the precision is zero, it is treated as 1.  Style B<e> is used if the exponent from its conversion is less than -4 or greater than or equal to the precision.  Trailing zeros are removed from the fractional part of the result; a decimal point appears only if it is followed by at least one digit."
7998 msgstr "I<double> 引き数を B<f> か B<e> (B<G> 変換の場合は B<F> か B<E>)  の形式に変換する。 精度は表示する桁数を指定する。 精度が指定されない場合は、6桁とみなされる。 精度が 0 の場合は、1桁とみなされる。 変換される値の指数が、 -4 より小さいか、精度以上の場合に、 B<e> 形式が使用される。 変換された結果の小数部分の末尾の 0 は削除される。小数点が表示されるのは、 小数点以下に数字が少なくとも一つある場合にだけである。"
7999
8000 #. type: TP
8001 #: build/C/man3/printf.3:697
8002 #, no-wrap
8003 msgid "B<a>, B<A>"
8004 msgstr "B<a>, B<A>"
8005
8006 #. type: Plain text
8007 #: build/C/man3/printf.3:722
8008 msgid "(C99; not in SUSv2, but added in SUSv3)  For B<a> conversion, the I<double> argument is converted to hexadecimal notation (using the letters abcdef)  in the style [-]B<0x>hB<\\&.>hhhhB<p>\\(+-; for B<A> conversion the prefix B<0X>, the letters ABCDEF, and the exponent separator B<P> is used.  There is one hexadecimal digit before the decimal point, and the number of digits after it is equal to the precision.  The default precision suffices for an exact representation of the value if an exact representation in base 2 exists and otherwise is sufficiently large to distinguish values of type I<double>.  The digit before the decimal point is unspecified for nonnormalized numbers, and nonzero but otherwise unspecified for normalized numbers."
8009 msgstr ""
8010 "(C99 にはあるが SUSv2 にはないが SUSv3 で追加された) \n"
8011 "B<a> 変換では、 I<double> 引き数を\n"
8012 "(abcdef の文字を使って) [-]B<0x>hB<\\&.>hhhhB<p>\\(+- 形式の\n"
8013 "16 進表記に変換する。\n"
8014 "B<A> 変換では、前置文字列 B<0X>, 文字 ABCDEF, 指数文字 B<P> を用いる。\n"
8015 "小数点の前には 1 桁の 16 進数が置かれ、小数点の後ろの桁数は 精度で指定\n"
8016 "された値となる。デフォルトの精度は、その値が 2 進数で正確に表現できる\n"
8017 "場合には、その値を正確に表現できる桁数となる。それ以外の場合は、\n"
8018 "I<double> 型の値を区別するのに十分な大きさとなる。 小数点の前の数字は、\n"
8019 "正規化されていない数の場合はいくつになるか分からない。 正規化された数の\n"
8020 "場合は、 0 以外の値になるが、いくつになるかは分からない。"
8021
8022 #. type: TP
8023 #: build/C/man3/printf.3:722 build/C/man3/scanf.3:459
8024 #: build/C/man3/wprintf.3:149
8025 #, no-wrap
8026 msgid "B<c>"
8027 msgstr "B<c>"
8028
8029 #. type: Plain text
8030 #: build/C/man3/printf.3:740
8031 msgid "If no B<l> modifier is present, the I<int> argument is converted to an I<unsigned char>, and the resulting character is written.  If an B<l> modifier is present, the I<wint_t> (wide character) argument is converted to a multibyte sequence by a call to the B<wcrtomb>(3)  function, with a conversion state starting in the initial state, and the resulting multibyte string is written."
8032 msgstr "B<l> 修飾子がなければ、 I<int> 引き数を I<unsigned char> に変換して、その結果に対応する文字を出力する。 B<l> 修飾子があれば、 I<wint_t> (ワイド文字) 引き数を、 B<wcrtomb>(3)  関数を初期シフト状態で呼び出してマルチバイト文字列に変換し、 変換されたマルチバイト文字列を出力する。"
8033
8034 #. type: TP
8035 #: build/C/man3/printf.3:740 build/C/man3/scanf.3:451
8036 #: build/C/man3/wprintf.3:163
8037 #, no-wrap
8038 msgid "B<s>"
8039 msgstr "B<s>"
8040
8041 #. type: Plain text
8042 #: build/C/man3/printf.3:755
8043 msgid "If no B<l> modifier is present: The I<const char\\ *> argument is expected to be a pointer to an array of character type (pointer to a string).  Characters from the array are written up to (but not including) a terminating null byte (\\(aq\\e0\\(aq); if a precision is specified, no more than the number specified are written.  If a precision is given, no null byte need be present; if the precision is not specified, or is greater than the size of the array, the array must contain a terminating null byte."
8044 msgstr "B<l> 修飾子がない場合、 引き数は I<const char\\ *> 型で文字型の配列へのポインタ (文字列へのポインタ) であることが 期待されている。配列中の文字は、終端の ヌルバイト (\\(aq\\e0\\(aq)  が出てくるまで出力される (終端文字は出力されない)。 精度が指定されていると、指定された字数以上は出力されない。 精度が指定された場合には、終端バイトが存在する必要はない。 精度が指定されていなかったり、精度の値が配列の大きさより大きい場合には、 配列は終端のヌルバイトを含んでいなければならない。"
8045
8046 #. type: Plain text
8047 #: build/C/man3/printf.3:782
8048 msgid "If an B<l> modifier is present: The I<const wchar_t\\ *> argument is expected to be a pointer to an array of wide characters.  Wide characters from the array are converted to multibyte characters (each by a call to the B<wcrtomb>(3)  function, with a conversion state starting in the initial state before the first wide character), up to and including a terminating null wide character.  The resulting multibyte characters are written up to (but not including) the terminating null byte.  If a precision is specified, no more bytes than the number specified are written, but no partial multibyte characters are written.  Note that the precision determines the number of I<bytes> written, not the number of I<wide characters> or I<screen positions>.  The array must contain a terminating null wide character, unless a precision is given and it is so small that the number of bytes written exceeds it before the end of the array is reached."
8049 msgstr "B<l> 修飾子が指定されている場合、 引き数は I<const wchar_t\\ *> 型でワイド文字の配列へのポインタであることが期待されている。 配列中のワイド文字は (1文字毎に B<wcrtomb>(3)  を呼び出して) マルチバイト文字に変換される (最初のワイド文字の変換の前に B<wcrtomb>()  のシフト状態を初期状態に戻してから変換は行われる)。 マルチバイト文字への変換は、文字列を終端するヌルワイド文字が 出てくるまで行われ、終端ヌルワイド文字も含めて変換される。 結果のマルチバイト文字列は、終端のヌルバイトが出てくるまで 出力される (終端のヌルバイトは出力されない)。 精度が指定された場合、指定されたバイト数以上には出力されない。 但し、マルチバイト文字の一部分だけが出力されることはない。 精度は「バイト」数を指定するものであり、「ワイド文字」数や 「画面での位置」を指定するものではないことに注意。 精度が指定されていて、さらに出力が配列の末尾に達する前に出力バイト数が 精度の値を超える場合だけは、配列はヌルワイド文字で終端されていなくてもよい。 それ以外の場合は、必ず配列はヌルワイド文字で終端されていなければならない。"
8050
8051 #. type: TP
8052 #: build/C/man3/printf.3:782
8053 #, no-wrap
8054 msgid "B<C>"
8055 msgstr "B<C>"
8056
8057 #. type: Plain text
8058 #: build/C/man3/printf.3:788
8059 msgid "(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.)  Synonym for B<lc>.  Don't use."
8060 msgstr "(C99, C11 にはないが SUSv2, SUSv3, SUSv4 にはある)  B<lc> と同じ。使ってはならない。"
8061
8062 #. type: TP
8063 #: build/C/man3/printf.3:788
8064 #, no-wrap
8065 msgid "B<S>"
8066 msgstr "B<S>"
8067
8068 #. type: Plain text
8069 #: build/C/man3/printf.3:794
8070 msgid "(Not in C99 or C11, but in SUSv2, SUSv3, and SUSv4.)  Synonym for B<ls>.  Don't use."
8071 msgstr "(C99, C11 にはないが SUSv2, SUSv3, SUSv4 にはある)  B<ls> と同じ。使ってはならない。"
8072
8073 #. type: TP
8074 #: build/C/man3/printf.3:794 build/C/man3/scanf.3:502
8075 #, no-wrap
8076 msgid "B<p>"
8077 msgstr "B<p>"
8078
8079 #. type: Plain text
8080 #: build/C/man3/printf.3:802
8081 msgid "The I<void\\ *> pointer argument is printed in hexadecimal (as if by B<%#x> or B<%#lx>)."
8082 msgstr "I<void\\ *> ポインタ引き数を (B<%#x> や B<%#lx> のような) 16 進数で出力する。"
8083
8084 #. type: TP
8085 #: build/C/man3/printf.3:802 build/C/man3/scanf.3:510
8086 #, no-wrap
8087 msgid "B<n>"
8088 msgstr "B<n>"
8089
8090 #. type: Plain text
8091 #: build/C/man3/printf.3:813
8092 msgid "The number of characters written so far is stored into the integer pointed to by the corresponding argument.  That argument shall be an I<int\\ *>, or variant whose size matches the (optionally)  supplied integer length modifier.  No argument is converted.  The behavior is undefined if the conversion specification includes any flags, a field width, or a precision."
8093 msgstr "これまでに書き込まれた文字数が対応する引き数が指す整数に格納される。 この引き数は I<int\\ *> 系でなければならず、そのサイズは指定された整数の長さ修飾子 (省略可能) と一致していなければならない。 引き数の変換は行われない。 変換指定にフラグ、フィールド幅、精度に含まれていた場合の動作は不定である。"
8094
8095 #. type: TP
8096 #: build/C/man3/printf.3:813
8097 #, no-wrap
8098 msgid "B<m>"
8099 msgstr "B<m>"
8100
8101 #. type: Plain text
8102 #: build/C/man3/printf.3:819
8103 msgid "(Glibc extension.)  Print output of I<strerror(errno)>.  No argument is required."
8104 msgstr "(glibc での拡張)  I<strerror(errno)> の出力を表示する。引き数は必要ない。"
8105
8106 #. type: TP
8107 #: build/C/man3/printf.3:819 build/C/man3/scanf.3:377
8108 #, no-wrap
8109 msgid "B<%>"
8110 msgstr "B<%>"
8111
8112 #. type: Plain text
8113 #: build/C/man3/printf.3:825
8114 msgid "A \\(aq%\\(aq is written.  No argument is converted.  The complete conversion specification is \\(aq%%\\(aq."
8115 msgstr "\\(aq%\\(aq 文字を出力する。変換される引き数は無い。 変換指定全体を書くと \"%%\" となる。"
8116
8117 #. type: Plain text
8118 #: build/C/man3/printf.3:840
8119 msgid "The B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), and B<vsprintf>()  functions conform to C89 and C99.  The B<snprintf>()  and B<vsnprintf>()  functions conform to C99."
8120 msgstr "B<fprintf>(), B<printf>(), B<sprintf>(), B<vprintf>(), B<vfprintf>(), B<vsprintf>()  関数は、C89 と C99 に準拠している。 B<snprintf>()  と B<vsnprintf>()  は C99 に準拠している。"
8121
8122 #.  .PP
8123 #.  Linux libc4 knows about the five C standard flags.
8124 #.  It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
8125 #.  and the conversions
8126 #.  \fBc\fP, \fBd\fP, \fBe\fP, \fBE\fP, \fBf\fP, \fBF\fP,
8127 #.  \fBg\fP, \fBG\fP, \fBi\fP, \fBn\fP, \fBo\fP, \fBp\fP,
8128 #.  \fBs\fP, \fBu\fP, \fBx\fP, and \fBX\fP,
8129 #.  where \fBF\fP is a synonym for \fBf\fP.
8130 #.  Additionally, it accepts \fBD\fP, \fBO\fP, and \fBU\fP as synonyms
8131 #.  for \fBld\fP, \fBlo\fP, and \fBlu\fP.
8132 #.  (This is bad, and caused serious bugs later, when
8133 #.  support for \fB%D\fP disappeared.)
8134 #.  No locale-dependent radix character,
8135 #.  no thousands' separator, no NaN or infinity, no "%m$" and "*m$".
8136 #.  .PP
8137 #.  Linux libc5 knows about the five C standard flags and the \(aq flag,
8138 #.  locale, "%m$" and "*m$".
8139 #.  It knows about the length modifiers \fBh\fP, \fBl\fP, \fBL\fP,
8140 #.  \fBZ\fP, and \fBq\fP, but accepts \fBL\fP and \fBq\fP
8141 #.  both for \fIlong double\fP and for \fIlong long int\fP (this is a bug).
8142 #.  It no longer recognizes \fBF\fP, \fBD\fP, \fBO\fP, and \fBU\fP,
8143 #.  but adds the conversion character
8144 #.  .BR m ,
8145 #.  which outputs
8146 #.  .IR strerror(errno) .
8147 #.  .PP
8148 #.  glibc 2.0 adds conversion characters \fBC\fP and \fBS\fP.
8149 #. type: Plain text
8150 #: build/C/man3/printf.3:883
8151 msgid "Concerning the return value of B<snprintf>(), SUSv2 and C99 contradict each other: when B<snprintf>()  is called with I<size>=0 then SUSv2 stipulates an unspecified return value less than 1, while C99 allows I<str> to be NULL in this case, and gives the return value (as always)  as the number of characters that would have been written in case the output string has been large enough.  SUSv3 and later align their specification of B<snprintf>()  with C99."
8152 msgstr "B<snprintf>()  の返り値を見ると、 SUSv2 と C99 標準は互いに矛盾している。 SUSv2 では、 B<snprintf>()  が I<size>=0 で呼び出された場合、 1 未満の値を何か返り値とするように規定している。 一方 C99 では、このような場合 I<str> を NULL とし、返り値として (通常通り) 出力バッファが十分な大きさが あった場合に出力されるであろう文字数を返す。 SUSv3 やそれ以降では C99 の B<snprintf>() の規定にあわせたものとなっている。"
8153
8154 #. type: Plain text
8155 #: build/C/man3/printf.3:886
8156 msgid "glibc 2.1 adds length modifiers B<hh>, B<j>, B<t>, and B<z> and conversion characters B<a> and B<A>."
8157 msgstr "glibc 2.1 では、長さ修飾子 B<hh>, B<j>, B<t>, B<z> と変換文字 B<a>, B<A> が追加された。"
8158
8159 #. type: Plain text
8160 #: build/C/man3/printf.3:889
8161 msgid "glibc 2.2 adds the conversion character B<F> with C99 semantics, and the flag character B<I>."
8162 msgstr "glibc 2.2 では、 C99 で規定された意味での変換文字 B<F> と フラグ文字 B<I> が追加された。"
8163
8164 #. type: Plain text
8165 #: build/C/man3/printf.3:891
8166 msgid "Some programs imprudently rely on code such as the following"
8167 msgstr "テキストを I<buf> に追加するのに、軽率にも次のようなコードを使っているプログラムがある。"
8168
8169 #. type: Plain text
8170 #: build/C/man3/printf.3:893
8171 #, no-wrap
8172 msgid "    sprintf(buf, \"%s some further text\", buf);\n"
8173 msgstr "    sprintf(buf, \"%s some further text\", buf);\n"
8174
8175 #.  http://sourceware.org/bugzilla/show_bug.cgi?id=7075
8176 #. type: Plain text
8177 #: build/C/man3/printf.3:909
8178 msgid "to append text to I<buf>.  However, the standards explicitly note that the results are undefined if source and destination buffers overlap when calling B<sprintf>(), B<snprintf>(), B<vsprintf>(), and B<vsnprintf>().  Depending on the version of B<gcc>(1)  used, and the compiler options employed, calls such as the above will B<not> produce the expected results."
8179 msgstr "しかしながら、標準規格では、 B<sprintf>(), B<snprintf>(), B<vsprintf>(), B<vsnprintf>()  の呼び出しにおいて、コピー元とコピー先のバッファが重なっていた場合の 結果は不定である、と明記されている。 使用する B<gcc>(1)  のバージョンや指定したコンパイラのオプション次第では、 上記のような呼び出しで、期待した結果が得られ「ない」ことがある。"
8180
8181 #.  .SH HISTORY
8182 #.  UNIX V7 defines the three routines
8183 #.  .BR printf (),
8184 #.  .BR fprintf (),
8185 #.  .BR sprintf (),
8186 #.  and has the flag \-, the width or precision *, the length modifier l,
8187 #.  and the conversions doxfegcsu, and also D,O,U,X as synonyms for ld,lo,lu,lx.
8188 #.  This is still true for 2.9.1BSD, but 2.10BSD has the flags
8189 #.  #, + and <space> and no longer mentions D,O,U,X.
8190 #.  2.11BSD has
8191 #.  .BR vprintf (),
8192 #.  .BR vfprintf (),
8193 #.  .BR vsprintf (),
8194 #.  and warns not to use D,O,U,X.
8195 #.  4.3BSD Reno has the flag 0, the length modifiers h and L,
8196 #.  and the conversions n, p, E, G, X (with current meaning)
8197 #.  and deprecates D,O,U.
8198 #.  4.4BSD introduces the functions
8199 #.  .BR snprintf ()
8200 #.  and
8201 #.  .BR vsnprintf (),
8202 #.  and the length modifier q.
8203 #.  FreeBSD also has functions
8204 #.  .BR asprintf ()
8205 #.  and
8206 #.  .BR vasprintf (),
8207 #.  that allocate a buffer large enough for
8208 #.  .BR sprintf ().
8209 #.  In glibc there are functions
8210 #.  .BR dprintf ()
8211 #.  and
8212 #.  .BR vdprintf ()
8213 #.  that print to a file descriptor instead of a stream.
8214 #. type: Plain text
8215 #: build/C/man3/printf.3:951
8216 msgid "The glibc implementation of the functions B<snprintf>()  and B<vsnprintf>()  conforms to the C99 standard, that is, behaves as described above, since glibc version 2.1.  Until glibc 2.0.6, they would return -1 when the output was truncated."
8217 msgstr "glibc の B<snprintf>()  と B<vsnprintf>()  の実装は、バージョン 2.1 以降は C99 標準に準拠しており、 上記の通りの動作をする。 glibc 2.0.6 までは、出力が切り詰められた場合は -1 を返す。"
8218
8219 #.  .PP
8220 #.  Linux libc4.[45] does not have a
8221 #.  .BR snprintf (),
8222 #.  but provides a libbsd that contains an
8223 #.  .BR snprintf ()
8224 #.  equivalent to
8225 #.  .BR sprintf (),
8226 #.  that is, one that ignores the
8227 #.  .I size
8228 #.  argument.
8229 #.  Thus, the use of
8230 #.  .BR snprintf ()
8231 #.  with early libc4 leads to serious security problems.
8232 #. type: Plain text
8233 #: build/C/man3/printf.3:981
8234 msgid "Because B<sprintf>()  and B<vsprintf>()  assume an arbitrarily long string, callers must be careful not to overflow the actual space; this is often impossible to assure.  Note that the length of the strings produced is locale-dependent and difficult to predict.  Use B<snprintf>()  and B<vsnprintf>()  instead (or B<asprintf>(3)  and B<vasprintf>(3))."
8235 msgstr "B<sprintf>()  と B<vsprintf>()  は勝手に十分に長い文字列領域があると仮定するので、呼び出し側は 実際の領域からあふれないように注意しなければならない。 しかし、これを保証することが不可能な場合が多い。 生成される文字列の長さはロケール依存であり、予測が難しいことに注意。 代わりに B<snprintf>()  と B<vsnprintf>()  (または B<asprintf>(3)  と B<vasprintf>(3))  を使うこと。"
8236
8237 #.  .PP
8238 #.  Some floating-point conversions under early libc4
8239 #.  caused memory leaks.
8240 #. type: Plain text
8241 #: build/C/man3/printf.3:995
8242 msgid "Code such as B<printf(>I<foo>B<);> often indicates a bug, since I<foo> may contain a % character.  If I<foo> comes from untrusted user input, it may contain B<%n>, causing the B<printf>()  call to write to memory and creating a security hole."
8243 msgstr "B<printf(>I<foo>B<);> のようなコードはしばしばバグを引き起こす。 なぜなら I<foo> に % 文字が含まれてるかもしれないからである。 I<foo> が信頼できないユーザー入力から作られている場合には、 その中に B<%n> が含まれていることがあり、 B<printf>()  呼び出し時にメモリへの書き込みが起こり、 セキュリティーホールを作ることになるかもしれない。"
8244
8245 #. type: Plain text
8246 #: build/C/man3/printf.3:999
8247 msgid "To print I<Pi> to five decimal places:"
8248 msgstr "I<Pi> を 5 桁で出力する。"
8249
8250 #. type: Plain text
8251 #: build/C/man3/printf.3:1005
8252 #, no-wrap
8253 msgid ""
8254 "#include E<lt>math.hE<gt>\n"
8255 "#include E<lt>stdio.hE<gt>\n"
8256 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
8257 msgstr ""
8258 "#include E<lt>math.hE<gt>\n"
8259 "#include E<lt>stdio.hE<gt>\n"
8260 "fprintf(stdout, \"pi = %.5f\\en\", 4 * atan(1.0));\n"
8261
8262 #. type: Plain text
8263 #: build/C/man3/printf.3:1014
8264 msgid "To print a date and time in the form \"Sunday, July 3, 10:02\", where I<weekday> and I<month> are pointers to strings:"
8265 msgstr "日付と時間を \"Sunday, July 3, 10:02\" の形式で出力する。 (I<weekday> と I<month> は文字列へのポインタである)"
8266
8267 #. type: Plain text
8268 #: build/C/man3/printf.3:1020
8269 #, no-wrap
8270 msgid ""
8271 "#include E<lt>stdio.hE<gt>\n"
8272 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
8273 "        weekday, month, day, hour, min);\n"
8274 msgstr ""
8275 "#include E<lt>stdio.hE<gt>\n"
8276 "fprintf(stdout, \"%s, %s %d, %.2d:%.2d\\en\",\n"
8277 "\tweekday, month, day, hour, min);\n"
8278
8279 #. type: Plain text
8280 #: build/C/man3/printf.3:1026
8281 msgid "Many countries use the day-month-year order.  Hence, an internationalized version must be able to print the arguments in an order specified by the format:"
8282 msgstr "日 - 月 - 年 の順序で表示を行う国も多い。 従って、国際版では書式で指定された順番で 引き数を表示できなければならない。"
8283
8284 #. type: Plain text
8285 #: build/C/man3/printf.3:1032
8286 #, no-wrap
8287 msgid ""
8288 "#include E<lt>stdio.hE<gt>\n"
8289 "fprintf(stdout, format,\n"
8290 "        weekday, month, day, hour, min);\n"
8291 msgstr ""
8292 "#include E<lt>stdio.hE<gt>\n"
8293 "fprintf(stdout, format,\n"
8294 "\tweekday, month, day, hour, min);\n"
8295
8296 #. type: Plain text
8297 #: build/C/man3/printf.3:1039
8298 msgid "where I<format> depends on locale, and may permute the arguments.  With the value:"
8299 msgstr "I<format> はロケールに依存しており、引き数の順番を変えることもできる。 I<format> が"
8300
8301 #. type: Plain text
8302 #: build/C/man3/printf.3:1043
8303 #, no-wrap
8304 msgid "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
8305 msgstr "\"%1$s, %3$d. %2$s, %4$d:%5$.2d\\en\"\n"
8306
8307 #. type: Plain text
8308 #: build/C/man3/printf.3:1047
8309 msgid "one might obtain \"Sonntag, 3. Juli, 10:02\"."
8310 msgstr "であれば、 \"Sonntag, 3. Juli, 10:02\" という結果になる。"
8311
8312 #. type: Plain text
8313 #: build/C/man3/printf.3:1050
8314 msgid "To allocate a sufficiently large string and print into it (code correct for both glibc 2.0 and glibc 2.1):"
8315 msgstr "十分に大きな文字列領域を確保して、そこにメッセージを格納するには (glibc 2.0 と glibc 2.1 の両方で正しく動作するコード):"
8316
8317 #. type: Plain text
8318 #: build/C/man3/printf.3:1055
8319 #, no-wrap
8320 msgid ""
8321 "#include E<lt>stdio.hE<gt>\n"
8322 "#include E<lt>stdlib.hE<gt>\n"
8323 "#include E<lt>stdarg.hE<gt>\n"
8324 msgstr ""
8325 "#include E<lt>stdio.hE<gt>\n"
8326 "#include E<lt>stdlib.hE<gt>\n"
8327 "#include E<lt>stdarg.hE<gt>\n"
8328
8329 #. type: Plain text
8330 #: build/C/man3/printf.3:1063
8331 #, no-wrap
8332 msgid ""
8333 "char *\n"
8334 "make_message(const char *fmt, ...)\n"
8335 "{\n"
8336 "    int n;\n"
8337 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
8338 "    char *p, *np;\n"
8339 "    va_list ap;\n"
8340 msgstr ""
8341 "char *\n"
8342 "make_message(const char *fmt, ...)\n"
8343 "{\n"
8344 "    int n;\n"
8345 "    int size = 100;     /* Guess we need no more than 100 bytes */\n"
8346 "    char *p, *np;\n"
8347 "    va_list ap;\n"
8348
8349 #. type: Plain text
8350 #: build/C/man3/printf.3:1067
8351 #, no-wrap
8352 msgid ""
8353 "    p = malloc(size);\n"
8354 "    if (p == NULL)\n"
8355 "        return NULL;\n"
8356 msgstr ""
8357 "    p = malloc(size);\n"
8358 "    if (p == NULL)\n"
8359 "        return NULL;\n"
8360
8361 #. type: Plain text
8362 #: build/C/man3/printf.3:1069
8363 #, no-wrap
8364 msgid "    while (1) {\n"
8365 msgstr "    while (1) {\n"
8366
8367 #. type: Plain text
8368 #: build/C/man3/printf.3:1071
8369 #, no-wrap
8370 msgid "        /* Try to print in the allocated space */\n"
8371 msgstr "        /* Try to print in the allocated space */\n"
8372
8373 #. type: Plain text
8374 #: build/C/man3/printf.3:1075
8375 #, no-wrap
8376 msgid ""
8377 "        va_start(ap, fmt);\n"
8378 "        n = vsnprintf(p, size, fmt, ap);\n"
8379 "        va_end(ap);\n"
8380 msgstr ""
8381 "        va_start(ap, fmt);\n"
8382 "        n = vsnprintf(p, size, fmt, ap);\n"
8383 "        va_end(ap);\n"
8384
8385 #. type: Plain text
8386 #: build/C/man3/printf.3:1077
8387 #, no-wrap
8388 msgid "        /* Check error code */\n"
8389 msgstr "        /* Check error code */\n"
8390
8391 #. type: Plain text
8392 #: build/C/man3/printf.3:1082
8393 #, no-wrap
8394 msgid ""
8395 "        if (n E<lt> 0) {\n"
8396 "            free(p);\n"
8397 "            return NULL;\n"
8398 "        }\n"
8399 msgstr ""
8400 "        if (n E<lt> 0) {\n"
8401 "            free(p);\n"
8402 "            return NULL;\n"
8403 "        }\n"
8404
8405 #. type: Plain text
8406 #: build/C/man3/printf.3:1084
8407 #, no-wrap
8408 msgid "        /* If that worked, return the string */\n"
8409 msgstr "        /* If that worked, return the string */\n"
8410
8411 #. type: Plain text
8412 #: build/C/man3/printf.3:1087
8413 #, no-wrap
8414 msgid ""
8415 "        if (n E<lt> size)\n"
8416 "            return p;\n"
8417 msgstr ""
8418 "        if (n E<lt> size)\n"
8419 "            return p;\n"
8420
8421 #. type: Plain text
8422 #: build/C/man3/printf.3:1089
8423 #, no-wrap
8424 msgid "        /* Else try again with more space */\n"
8425 msgstr "        /* Else try again with more space */\n"
8426
8427 #. type: Plain text
8428 #: build/C/man3/printf.3:1091
8429 #, no-wrap
8430 msgid "        size = n + 1;       /* Precisely what is needed */\n"
8431 msgstr "        size = n + 1;       /* Precisely what is needed */\n"
8432
8433 #. type: Plain text
8434 #: build/C/man3/printf.3:1102
8435 #, no-wrap
8436 msgid ""
8437 "        np = realloc(p, size);\n"
8438 "        if (np == NULL) {\n"
8439 "            free(p);\n"
8440 "            return NULL;\n"
8441 "        } else {\n"
8442 "            p = np;\n"
8443 "        }\n"
8444 "    }\n"
8445 "}\n"
8446 msgstr ""
8447 "        np = realloc(p, size);\n"
8448 "        if (np == NULL) {\n"
8449 "            free(p);\n"
8450 "            return NULL;\n"
8451 "        } else {\n"
8452 "            p = np;\n"
8453 "        }\n"
8454 "    }\n"
8455 "}\n"
8456
8457 #. type: Plain text
8458 #: build/C/man3/printf.3:1106
8459 msgid "If truncation occurs in glibc versions prior to 2.0.6, this is treated as an error instead of being handled gracefully."
8460 msgstr "バージョン 2.0.6 より前の glibc で切り詰めが起こった場合、切り詰めは適切に処理されず、エラーとして扱われる。"
8461
8462 #. type: Plain text
8463 #: build/C/man3/printf.3:1115
8464 msgid "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
8465 msgstr "B<printf>(1), B<asprintf>(3), B<dprintf>(3), B<scanf>(3), B<setlocale>(3), B<wcrtomb>(3), B<wprintf>(3), B<locale>(5)"
8466
8467 #. type: TH
8468 #: build/C/man3/puts.3:26
8469 #, no-wrap
8470 msgid "PUTS"
8471 msgstr "PUTS"
8472
8473 #. type: TH
8474 #: build/C/man3/puts.3:26 build/C/man3/scanf.3:52
8475 #, no-wrap
8476 msgid "2014-01-11"
8477 msgstr "2014-01-11"
8478
8479 #. type: Plain text
8480 #: build/C/man3/puts.3:29
8481 msgid "fputc, fputs, putc, putchar, puts - output of characters and strings"
8482 msgstr "fputc, fputs, putc, putchar, puts - 文字と文字列の出力"
8483
8484 #. type: Plain text
8485 #: build/C/man3/puts.3:34
8486 #, no-wrap
8487 msgid "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
8488 msgstr "B<int fputc(int >I<c>B<, FILE *>I<stream>B<);>\n"
8489
8490 #. type: Plain text
8491 #: build/C/man3/puts.3:36
8492 #, no-wrap
8493 msgid "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
8494 msgstr "B<int fputs(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
8495
8496 #. type: Plain text
8497 #: build/C/man3/puts.3:38
8498 #, no-wrap
8499 msgid "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
8500 msgstr "B<int putc(int >I<c>B<, FILE *>I<stream>B<);>\n"
8501
8502 #. type: Plain text
8503 #: build/C/man3/puts.3:40
8504 #, no-wrap
8505 msgid "B<int putchar(int >I<c>B<);>\n"
8506 msgstr "B<int putchar(int >I<c>B<);>\n"
8507
8508 #. type: Plain text
8509 #: build/C/man3/puts.3:42
8510 #, no-wrap
8511 msgid "B<int puts(const char *>I<s>B<);>\n"
8512 msgstr "B<int puts(const char *>I<s>B<);>\n"
8513
8514 #. type: Plain text
8515 #: build/C/man3/puts.3:51
8516 msgid "B<fputc>()  writes the character I<c>, cast to an I<unsigned char>, to I<stream>."
8517 msgstr "B<fputc>()  は、キャラクタ I<c> を I<unsigned char> にキャストし、 I<stream> に書き込む。"
8518
8519 #. type: Plain text
8520 #: build/C/man3/puts.3:58
8521 msgid "B<fputs>()  writes the string I<s> to I<stream>, without its terminating null byte (\\(aq\\e0\\(aq)."
8522 msgstr "B<fputs>()  は、文字列 I<s> を I<stream> に書き込む。 文字列終端のヌルバイト (\\(aq\\e0\\(aq) は出力しない。"
8523
8524 #. type: Plain text
8525 #: build/C/man3/puts.3:65
8526 msgid "B<putc>()  is equivalent to B<fputc>()  except that it may be implemented as a macro which evaluates I<stream> more than once."
8527 msgstr "B<putc>()  は、 I<stream> を一度以上評価するマクロとして実装されているかも知れないという点を除き、 B<fputc>()  と同じである。"
8528
8529 #. type: Plain text
8530 #: build/C/man3/puts.3:69
8531 msgid "B<putchar(>I<c>B<)> is equivalent to B<putc(>I<c>B<, >I<stdout>B<).>"
8532 msgstr "B<putchar(>I<c>B<)> は、 B<putc(>I<c>B<,>I<stdout>B<)> と同じである。"
8533
8534 #. type: Plain text
8535 #: build/C/man3/puts.3:76
8536 msgid "B<puts>()  writes the string I<s> and a trailing newline to I<stdout>."
8537 msgstr "B<puts>()  は、文字列 I<s> と改行を I<stdout> に書き込む。"
8538
8539 #. type: Plain text
8540 #: build/C/man3/puts.3:81
8541 msgid "Calls to the functions described here can be mixed with each other and with calls to other output functions from the I<stdio> library for the same output stream."
8542 msgstr "ここで説明された関数はお互いに混在して使用することができ、また、 I<stdio> ライブラリに含まれる他の出力関数を同じ出力ストリームに対して 呼び出す事が出来る。"
8543
8544 #. type: Plain text
8545 #: build/C/man3/puts.3:96
8546 msgid "B<fputc>(), B<putc>()  and B<putchar>()  return the character written as an I<unsigned char> cast to an I<int> or B<EOF> on error."
8547 msgstr "B<fputc>(), B<putc>(), B<putchar>()  は I<unsigned char> として書き込まれた文字を I<int> にキャストして返す。 エラーが発生した場合は B<EOF> を返す。"
8548
8549 #. type: Plain text
8550 #: build/C/man3/puts.3:103
8551 msgid "B<puts>()  and B<fputs>()  return a nonnegative number on success, or B<EOF> on error."
8552 msgstr "B<puts>()  と B<fputs>()  は、成功すると負ではない数を、エラーが発生した場合は B<EOF> を返す。"
8553
8554 #. type: Plain text
8555 #: build/C/man3/puts.3:112
8556 msgid "It is not advisable to mix calls to output functions from the I<stdio> library with low-level calls to B<write>(2)  for the file descriptor associated with the same output stream; the results will be undefined and very probably not what you want."
8557 msgstr "I<stdio> ライブラリに含まれる出力関数と、同じ出力ストリームに結びつけられた ファイルディスクリプタに対する B<write>(2)  の低レベル呼び出しを混在して 使用することは賢明ではない。 その結果は定義されておらず、望む結果が得られない可能性が高い。"
8558
8559 #. type: Plain text
8560 #: build/C/man3/puts.3:124
8561 msgid "B<write>(2), B<ferror>(3), B<fgets>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>(3), B<fwrite>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>(3)"
8562 msgstr "B<write>(2), B<ferror>(3), B<fgets>(3), B<fopen>(3), B<fputwc>(3), B<fputws>(3), B<fseek>(3), B<fwrite>(3), B<putwchar>(3), B<scanf>(3), B<unlocked_stdio>(3)"
8563
8564 #. type: TH
8565 #: build/C/man2/read.2:35
8566 #, no-wrap
8567 msgid "READ"
8568 msgstr "READ"
8569
8570 #. type: TH
8571 #: build/C/man2/read.2:35
8572 #, no-wrap
8573 msgid "2014-05-04"
8574 msgstr "2014-05-04"
8575
8576 #. type: Plain text
8577 #: build/C/man2/read.2:38
8578 msgid "read - read from a file descriptor"
8579 msgstr "read - ファイルディスクリプタから読み込む"
8580
8581 #. type: Plain text
8582 #: build/C/man2/read.2:43
8583 #, no-wrap
8584 msgid "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
8585 msgstr "B<ssize_t read(int >I<fd>B<, void *>I<buf>B<, size_t >I<count>B<);>\n"
8586
8587 #. type: Plain text
8588 #: build/C/man2/read.2:52
8589 msgid "B<read>()  attempts to read up to I<count> bytes from file descriptor I<fd> into the buffer starting at I<buf>."
8590 msgstr "B<read>()  はファイルディスクリプタ (file descriptor)  I<fd> から最大 I<count> バイトを I<buf> で始まるバッファーへ読み込もうとする。"
8591
8592 #. type: Plain text
8593 #: build/C/man2/read.2:60
8594 msgid "On files that support seeking, the read operation commences at the current file offset, and the file offset is incremented by the number of bytes read.  If the current file offset is at or past the end of file, no bytes are read, and B<read>()  returns zero."
8595 msgstr "seek に対応しているファイルでは、read は現在のファイルオフセットから行われ、ファイルオフセットは読み込んだバイト数分だけ進められる。現在のファイルオフセットがファイル末尾かそれより先の場合は、読み出しは行われず、 B<read>() は 0 を返す。"
8596
8597 #. type: Plain text
8598 #: build/C/man2/read.2:75
8599 msgid "If I<count> is zero, B<read>()  I<may> detect the errors described below.  In the absence of any errors, or if B<read>()  does not check for errors, a B<read>()  with a I<count> of 0 returns zero and has no other effects."
8600 msgstr "I<count> が 0 の場合、 B<read>() は以下で説明するエラーを検出するI<場合がある>。 どのエラーもなかった場合、もしくは B<read>() がエラーのチェックを行わない場合、 I<count> が 0 で呼び出された B<read>() は 0 を返し、何も行わない。"
8601
8602 #. type: Plain text
8603 #: build/C/man2/read.2:81
8604 msgid "If I<count> is greater than B<SSIZE_MAX>, the result is unspecified."
8605 msgstr "I<count> が B<SSIZE_MAX> より大きければ、結果は規定できない。"
8606
8607 #. type: Plain text
8608 #: build/C/man2/read.2:95
8609 msgid "On success, the number of bytes read is returned (zero indicates end of file), and the file position is advanced by this number.  It is not an error if this number is smaller than the number of bytes requested; this may happen for example because fewer bytes are actually available right now (maybe because we were close to end-of-file, or because we are reading from a pipe, or from a terminal), or because B<read>()  was interrupted by a signal.  On error, -1 is returned, and I<errno> is set appropriately.  In this case, it is left unspecified whether the file position (if any) changes."
8610 msgstr "成功した場合、読み込んだバイト数を返す (0 はファイルの終りを意味する)。 ファイル位置はこの数だけ進められる。 この数が要求した数より小さかったとしてもエラーではない; 例えば今すぐには実際にそれだけの数しかない場合 (ファイルの最後に近いのかも しれないし、パイプ (pipe) や端末 (terminal) から読み込んでいるかもしれない) や B<read>()  がシグナル (signal) によって割り込まれた場合にこれは起こりえる。 エラーの場合は、-1 が返され、 I<errno> が適切に設定される。この場合はファイル位置が変更されるかどうかは 不定である。"
8611
8612 #. type: TP
8613 #: build/C/man2/read.2:96 build/C/man3/scanf.3:548 build/C/man2/write.2:108
8614 #, no-wrap
8615 msgid "B<EAGAIN>"
8616 msgstr "B<EAGAIN>"
8617
8618 #. type: Plain text
8619 #: build/C/man2/read.2:103
8620 msgid "The file descriptor I<fd> refers to a file other than a socket and has been marked nonblocking (B<O_NONBLOCK>), and the read would block."
8621 msgstr "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 (nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にある。"
8622
8623 #. type: TP
8624 #: build/C/man2/read.2:103 build/C/man2/write.2:115
8625 #, no-wrap
8626 msgid "B<EAGAIN> or B<EWOULDBLOCK>"
8627 msgstr "B<EAGAIN> または B<EWOULDBLOCK>"
8628
8629 #.  Actually EAGAIN on Linux
8630 #. type: Plain text
8631 #: build/C/man2/read.2:114
8632 msgid "The file descriptor I<fd> refers to a socket and has been marked nonblocking (B<O_NONBLOCK>), and the read would block.  POSIX.1-2001 allows either error to be returned for this case, and does not require these constants to have the same value, so a portable application should check for both possibilities."
8633 msgstr "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) モード (B<O_NONBLOCK>)  に設定されており、読み込みを行うと停止する状況にある。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なアプリケーションでは、両方の可能性を 確認すべきである。"
8634
8635 #. type: Plain text
8636 #: build/C/man2/read.2:118
8637 msgid "I<fd> is not a valid file descriptor or is not open for reading."
8638 msgstr "I<fd> が有効なファイルディスクリプタでないか、読み込みのために オープン (open) されていない。"
8639
8640 #. type: Plain text
8641 #: build/C/man2/read.2:122 build/C/man2/write.2:145
8642 msgid "I<buf> is outside your accessible address space."
8643 msgstr "I<buf> がアクセス可能なアドレス空間の外にある。"
8644
8645 #. type: Plain text
8646 #: build/C/man2/read.2:126
8647 msgid "The call was interrupted by a signal before any data was read; see B<signal>(7)."
8648 msgstr "何のデータも読み込まないうちにシグナルに割り込まれた。 B<signal>(7)  参照。"
8649
8650 #. type: Plain text
8651 #: build/C/man2/read.2:137
8652 msgid "I<fd> is attached to an object which is unsuitable for reading; or the file was opened with the B<O_DIRECT> flag, and either the address specified in I<buf>, the value specified in I<count>, or the current file offset is not suitably aligned."
8653 msgstr "I<fd> は読み込みに適していないオブジェクトを参照している。 もしくは、ファイルが B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アラインメントが不適切である。"
8654
8655 #. type: Plain text
8656 #: build/C/man2/read.2:147
8657 msgid "I<fd> was created via a call to B<timerfd_create>(2)  and the wrong size buffer was given to B<read>(); see B<timerfd_create>(2)  for further information."
8658 msgstr "I<fd> が B<timerfd_create>(2)  の呼び出しで作成されたが、 B<read>()  に間違ったサイズのバッファが渡された。 さらなる情報は B<timerfd_create>(2)  を参照のこと。"
8659
8660 #. type: Plain text
8661 #: build/C/man2/read.2:158
8662 msgid "I/O error.  This will happen for example when the process is in a background process group, tries to read from its controlling terminal, and either it is ignoring or blocking B<SIGTTIN> or its process group is orphaned.  It may also occur when there is a low-level I/O error while reading from a disk or tape."
8663 msgstr "I/O エラー。これは例えばプロセスがバックグランド・プロセスグループで、それを制御している端末から読み込もうとし、 B<SIGTTIN> が無視 (ignore) または禁止 (blocking) されている場合や、 そのプロセスグループが孤立 (orphan) している場合に起こる。 またディスクやテープを読んでいる時に低レベル I/O エラー が発生した場合にも起こる。"
8664
8665 #. type: Plain text
8666 #: build/C/man2/read.2:162
8667 msgid "I<fd> refers to a directory."
8668 msgstr "I<fd> がディレクトリを参照している。"
8669
8670 #. type: Plain text
8671 #: build/C/man2/read.2:173
8672 msgid "Other errors may occur, depending on the object connected to I<fd>.  POSIX allows a B<read>()  that is interrupted after reading some data to return -1 (with I<errno> set to B<EINTR>)  or to return the number of bytes already read."
8673 msgstr "I<fd> が接続しているオブジェクトによっては他のエラーも起こりえる。 POSIX では、 いくらかのデータを読んだ後に割り込みが起こった場合、 B<read>()  は (I<errno> に B<EINTR> を設定して) -1 を返してもよいし、 既に読み込んだバイト数を返してもよい。"
8674
8675 #. type: Plain text
8676 #: build/C/man2/read.2:187
8677 msgid "On NFS filesystems, reading small amounts of data will update the timestamp only the first time, subsequent calls may not do so.  This is caused by client side attribute caching, because most if not all NFS clients leave st_atime (last file access time)  updates to the server and client side reads satisfied from the client's cache will not cause st_atime updates on the server as there are no server side reads.  UNIX semantics can be obtained by disabling client side attribute caching, but in most situations this will substantially increase server load and decrease performance."
8678 msgstr "NFS において。少量のデータを読み込む場合、最初の時のみにタイム スタンプが更新され、続くコールでは更新されないだろう。 これはクライアント側で属性のキャッシングを行なうためである。 なぜならば、もし全ての NFS クライアントが st_atime (最終ファイルアクセス時刻)  の更新をサーバーに送らず、クライアント側でキャッシュを読むことに満足して いれば、サーバー側での read は発生しないので st_atime の更新は行なわれからだ。 UNIX の方式では、クライアント側の属性のキャッシングを無効にすることで、 これを得ることができる。しかしほとんどの状況ではこれは続くサーバーの 負荷を増加させ、パフォーマンスの低下をもたらす。"
8679
8680 #. type: Plain text
8681 #: build/C/man2/read.2:190 build/C/man2/write.2:218
8682 msgid "According to POSIX.1-2008/SUSv4 Section XSI 2.9.7 (\"Thread Interactions with Regular File Operations\"):"
8683 msgstr "POSIX.1-2008/SUSv4 セクション XSI 2.9.7 (\"Thread Interactions with Regular File Operations\") によると、"
8684
8685 #. type: Plain text
8686 #: build/C/man2/read.2:195 build/C/man2/write.2:223
8687 msgid "All of the following functions shall be atomic with respect to each other in the effects specified in POSIX.1-2008 when they operate on regular files or symbolic links: ..."
8688 msgstr "以下のすべての関数では、 通常ファイルもしくはシンボリックリンクに対する操作では POSIX.1-2008 で規定された効果が互いにアトミックに行われなければならない: ..."
8689
8690 #
8691 #.  http://thread.gmane.org/gmane.linux.kernel/1649458
8692 #.     From: Michael Kerrisk (man-pages <mtk.manpages <at> gmail.com>
8693 #.     Subject: Update of file offset on write() etc. is non-atomic with I/O
8694 #.     Date: 2014-02-17 15:41:37 GMT
8695 #.     Newsgroups: gmane.linux.kernel, gmane.linux.file-systems
8696 #.  commit 9c225f2655e36a470c4f58dbbc99244c5fc7f2d4
8697 #.     Author: Linus Torvalds <torvalds@linux-foundation.org>
8698 #.     Date:   Mon Mar 3 09:36:58 2014 -0800
8699 #.         vfs: atomic f_pos accesses as per POSIX
8700 #. type: Plain text
8701 #: build/C/man2/read.2:226
8702 msgid "Among the APIs subsequently listed are B<read>()  and B<readv>(2).  And among the effects that should be atomic across threads (and processes)  are updates of the file offset.  However, on Linux before version 3.14, this was not the case: if two processes that share an open file description (see B<open>(2))  perform a B<read>()  (or B<readv>(2))  at the same time, then the I/O operations were not atomic with respect updating the file offset, with the result that the reads in the two processes might (incorrectly) overlap in the blocks of data that they obtained.  This problem was fixed in Linux 3.14."
8703 msgstr "この後に書かれている API の中に B<read>() と B<readv>(2) である。 スレッド(やプロセス) 間でアトミックに適用することが求められる効果の一つとして、 ファイルオフセットの更新がある。 しかしながら、 バージョン 3.14 より前の Linux では、 この限りではない。 オープンファイル記述 (open file description) を共有する 2 つのプロセスが同時に B<read>() (や B<readv>(2)) を実行した場合、 この I/O 操作ではファイルオフセットの更新に関してはアトミックではなく、 2 つのプロセスの read で取得されるデータブロックが (間違って) 重なる可能性がある。 この問題は Linux 3.14 で修正された。"
8704
8705 #. type: Plain text
8706 #: build/C/man2/read.2:239
8707 msgid "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), B<fread>(3)"
8708 msgstr "B<close>(2), B<fcntl>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pread>(2), B<readdir>(2), B<readlink>(2), B<readv>(2), B<select>(2), B<write>(2), B<fread>(3)"
8709
8710 #. type: TH
8711 #: build/C/man2/readlink.2:44
8712 #, no-wrap
8713 msgid "READLINK"
8714 msgstr "READLINK"
8715
8716 #. type: TH
8717 #: build/C/man2/readlink.2:44
8718 #, no-wrap
8719 msgid "2014-10-15"
8720 msgstr "2014-10-15"
8721
8722 #. type: Plain text
8723 #: build/C/man2/readlink.2:47
8724 msgid "readlink, readlinkat - read value of a symbolic link"
8725 msgstr "readlink, readlinkat - シンボリックリンクの値を読む"
8726
8727 #. type: Plain text
8728 #: build/C/man2/readlink.2:53
8729 #, no-wrap
8730 msgid "B<ssize_t readlink(const char *>I<pathname>B<, char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
8731 msgstr "B<ssize_t readlink(const char *>I<pathname>B<, char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
8732
8733 #. type: Plain text
8734 #: build/C/man2/readlink.2:59
8735 #, no-wrap
8736 msgid ""
8737 "B<ssize_t readlinkat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
8738 "B<                   char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
8739 msgstr ""
8740 "B<ssize_t readlinkat(int >I<dirfd>B<, const char *>I<pathname>B<,>\n"
8741 "B<                   char *>I<buf>B<, size_t >I<bufsiz>B<);>\n"
8742
8743 #. type: Plain text
8744 #: build/C/man2/readlink.2:68
8745 msgid "B<readlink>():"
8746 msgstr "B<readlink>():"
8747
8748 #. type: Plain text
8749 #: build/C/man2/readlink.2:71 build/C/man2/symlink.2:59
8750 msgid "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
8751 msgstr "_BSD_SOURCE || _XOPEN_SOURCE\\ E<gt>=\\ 500 || _XOPEN_SOURCE\\ &&\\ _XOPEN_SOURCE_EXTENDED || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L"
8752
8753 #. type: Plain text
8754 #: build/C/man2/readlink.2:74
8755 msgid "B<readlinkat>():"
8756 msgstr "B<readlinkat>():"
8757
8758 #. type: Plain text
8759 #: build/C/man2/readlink.2:100
8760 msgid "B<readlink>()  places the contents of the symbolic link I<pathname> in the buffer I<buf>, which has size I<bufsiz>.  B<readlink>()  does not append a null byte to I<buf>.  It will truncate the contents (to a length of I<bufsiz> characters), in case the buffer is too small to hold all of the contents."
8761 msgstr "B<readlink>()  は I<pathname> で与えられたシンボリックリンクの内容を I<buf> バッファーへ格納する、 I<buf> のサイズは I<bufsiz> である。 B<readlink>()  はヌルバイトを I<buf> に追加しない。 その内容全てを格納するのにバッファーが小さ過ぎる場合は、 (I<bufsiz> バイトの長さに) 内容を切り詰める。"
8762
8763 #. type: SS
8764 #: build/C/man2/readlink.2:100
8765 #, no-wrap
8766 msgid "readlinkat()"
8767 msgstr "readlinkat()"
8768
8769 #. type: Plain text
8770 #: build/C/man2/readlink.2:106
8771 msgid "The B<readlinkat>()  system call operates in exactly the same way as B<readlink>(), except for the differences described here."
8772 msgstr "B<readlinkat>() システムコールは B<readlink>() と全く同様に動作するが、以下で説明する点が異なる。"
8773
8774 #. type: Plain text
8775 #: build/C/man2/readlink.2:116
8776 msgid "If the pathname given in I<pathname> is relative, then it is interpreted relative to the directory referred to by the file descriptor I<dirfd> (rather than relative to the current working directory of the calling process, as is done by B<readlink>()  for a relative pathname)."
8777 msgstr "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される (B<readlink>() に相対パス名を渡した場合のように、呼び出したプロセスのカレントワーキングディレクトリに対する相対パスではない)。"
8778
8779 #. type: Plain text
8780 #: build/C/man2/readlink.2:128
8781 msgid "If I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, then I<pathname> is interpreted relative to the current working directory of the calling process (like B<readlink>())."
8782 msgstr "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> の場合、 (B<readlink>() と同様に) I<pathname> は呼び出したプロセスのカレントワーキングディレクトリに対する相対パスと解釈される。"
8783
8784 #.  commit 65cfc6722361570bfe255698d9cd4dccaf47570d
8785 #. type: Plain text
8786 #: build/C/man2/readlink.2:148
8787 msgid "Since Linux 2.6.39, I<pathname> can be an empty string, in which case the call operates on the symbolic link referred to by I<dirfd> (which should have been obtained using B<open>(2)  with the B<O_PATH> and B<O_NOFOLLOW> flags)."
8788 msgstr "Linux 2.6.39 以降では、 I<pathname> に空文字列を指定できる。 その場合、呼び出しは I<dirfd> が参照するシンボリックリンクに対して行われる (I<dirfd> はフラグ B<O_PATH> と B<O_NOFOLLOW> を指定した B<open>(2) を使って取得すべきである)。"
8789
8790 #. type: Plain text
8791 #: build/C/man2/readlink.2:153
8792 msgid "See B<openat>(2)  for an explanation of the need for B<readlinkat>()."
8793 msgstr "B<readlinkat>() の必要性についての説明については B<openat>(2) を参照。"
8794
8795 #. type: Plain text
8796 #: build/C/man2/readlink.2:159
8797 msgid "On success, these calls return the number of bytes placed in I<buf>.  On error, -1 is returned and I<errno> is set to indicate the error."
8798 msgstr "成功すると、これらのシステムコールは I<buf> に格納されたバイト数を返す。 エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
8799
8800 #. type: Plain text
8801 #: build/C/man2/readlink.2:165
8802 msgid "Search permission is denied for a component of the path prefix.  (See also B<path_resolution>(7).)"
8803 msgstr "パスのディレクトリ部分に検索許可が与えられていない (B<path_resolution>(7)  も参照すること)。"
8804
8805 #. type: Plain text
8806 #: build/C/man2/readlink.2:169
8807 msgid "I<buf> extends outside the process's allocated address space."
8808 msgstr "I<buf> がプロセスに割り当てられたアドレス空間の外を指している。"
8809
8810 #.  At the glibc level, bufsiz is unsigned, so this error can only occur
8811 #.  if bufsiz==0.  However, the in the kernel syscall, bufsiz is signed,
8812 #.  and this error can also occur if bufsiz < 0.
8813 #.  See: http://thread.gmane.org/gmane.linux.man/380
8814 #.  Subject: [patch 0/3] [RFC] kernel/glibc mismatch of "readlink" syscall?
8815 #. type: Plain text
8816 #: build/C/man2/readlink.2:178
8817 msgid "I<bufsiz> is not positive."
8818 msgstr "I<bufsiz> が正でない。"
8819
8820 #. type: Plain text
8821 #: build/C/man2/readlink.2:181
8822 msgid "The named file is not a symbolic link."
8823 msgstr "指定したファイルがシンボリックリンクでない。"
8824
8825 #. type: Plain text
8826 #: build/C/man2/readlink.2:184
8827 msgid "An I/O error occurred while reading from the filesystem."
8828 msgstr "ファイルシステムの読み込み中に I/O エラーが起こった。"
8829
8830 #. type: Plain text
8831 #: build/C/man2/readlink.2:187
8832 msgid "Too many symbolic links were encountered in translating the pathname."
8833 msgstr "パス名にシンボリックリンクが多すぎる。"
8834
8835 #. type: Plain text
8836 #: build/C/man2/readlink.2:190
8837 msgid "A pathname, or a component of a pathname, was too long."
8838 msgstr "パス名かパス名の一部分が長過ぎる。"
8839
8840 #. type: Plain text
8841 #: build/C/man2/readlink.2:193
8842 msgid "The named file does not exist."
8843 msgstr "その名前のファイルが存在しない。"
8844
8845 #. type: Plain text
8846 #: build/C/man2/readlink.2:199
8847 msgid "A component of the path prefix is not a directory."
8848 msgstr "パスのディレクトリ部分がディレクトリでない。"
8849
8850 #. type: Plain text
8851 #: build/C/man2/readlink.2:202
8852 msgid "The following additional errors can occur for B<readlinkat>():"
8853 msgstr "B<readlinkat>() では以下のエラーも発生する。"
8854
8855 #. type: Plain text
8856 #: build/C/man2/readlink.2:212 build/C/man2/unlink.2:269
8857 msgid "I<pathname> is relative and I<dirfd> is a file descriptor referring to a file other than a directory."
8858 msgstr "I<pathname> が相対パスで、 I<dirfd> がディレクトリ以外のファイルを参照しているファイルディスクリプタである。"
8859
8860 #. type: Plain text
8861 #: build/C/man2/readlink.2:216
8862 msgid "B<readlinkat>()  was added to Linux in kernel 2.6.16; library support was added to glibc in version 2.4."
8863 msgstr "B<readlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポートはバージョン 2.4 で glibc に追加された。"
8864
8865 #. type: Plain text
8866 #: build/C/man2/readlink.2:222
8867 msgid "B<readlink>(): 4.4BSD (B<readlink>()  first appeared in 4.2BSD), POSIX.1-2001, POSIX.1-2008."
8868 msgstr "4.4BSD (B<readlink>()  は 4.2BSD で初めて登場した), POSIX.1-2001, POSIX.1-2008."
8869
8870 #. type: Plain text
8871 #: build/C/man2/readlink.2:225
8872 msgid "B<readlinkat>(): POSIX.1-2008."
8873 msgstr "B<readlinkat>(): POSIX.1-2008."
8874
8875 #. type: Plain text
8876 #: build/C/man2/readlink.2:233
8877 msgid "In versions of glibc up to and including glibc 2.4, the return type of B<readlink>()  was declared as I<int>.  Nowadays, the return type is declared as I<ssize_t>, as (newly) required in POSIX.1-2001."
8878 msgstr "バージョン 2.4 以前の glibc (バージョン 2.4 を含む) では、 B<readlink>()  の返り値の型は I<int> で宣言されていた。現在では、返り値の型は I<ssize_t> である (返り値 I<ssize_t> は POSIX.1-2001 で (新たに) 必須となった)。"
8879
8880 #. type: Plain text
8881 #: build/C/man2/readlink.2:256
8882 msgid "Using a statically sized buffer might not provide enough room for the symbolic link contents.  The required size for the buffer can be obtained from the I<stat.st_size> value returned by a call to B<lstat>(2)  on the link.  However, the number of bytes written by B<readlink>()  and B<readlinkat>()  should be checked to make sure that the size of the symbolic link did not increase between the calls.  Dynamically allocating the buffer for B<readlink>()  and B<readlinkat>()  also addresses a common portability problem when using I<PATH_MAX> for the buffer size, as this constant is not guaranteed to be defined per POSIX if the system does not have such limit."
8883 msgstr "静的な大きさのバッファを使うと、 シンボリックリンクの内容を格納するのに十分な領域がない場合がある。 バッファに必要なサイズは、 そのシンボリックリンクに対して B<lstat>(2) の呼び出しで返される I<stat.st_size> の値から取得できる。 ただし、 B<readlink>() や B<readlinkat>() が書き込んだバイト数をチェックして、 シンボリックリンクのサイズが二つの呼び出しの間で増えていないことを確認すべきである。 B<readlink>() や B<readlinkat>() 用のバッファを動的に割り当てる方法でも、 バッファサイズとして I<PATH_MAX> を使用する場合に共通する移植性の問題を解決することができる。 なぜなら、POSIX では、 システムがそのような上限値を定義していない場合には、 I<PATH_MAX> が定義されることが保証されていないからである。"
8884
8885 #. type: Plain text
8886 #: build/C/man2/readlink.2:269
8887 msgid "On older kernels where B<readlinkat>()  is unavailable, the glibc wrapper function falls back to the use of B<readlink>().  When I<pathname> is a relative pathname, glibc constructs a pathname based on the symbolic link in I</proc/self/fd> that corresponds to the I<dirfd> argument."
8888 msgstr "B<readlinkat>() が利用できない古いカーネルでは、 glibc ラッパー関数は B<readlink>() を使用するモードにフォールバックする。 I<pathname> が相対パスの場合、 glibc は I<dirfd> 引き数に対応する I</proc/self/fd> のシンボリックリンクに基づいてパス名を構成する。"
8889
8890 #. type: Plain text
8891 #: build/C/man2/readlink.2:275
8892 msgid "The following program allocates the buffer needed by B<readlink>()  dynamically from the information provided by B<lstat>(), making sure there's no race condition between the calls."
8893 msgstr ""
8894 "以下のプログラムは、 B<readlink>() が必要とするバッファを、\n"
8895 "B<lstat>() が提供する情報に基づいて動的に割り当てる。\n"
8896 "また、両方の呼び出し間で競合条件がないことを保証している。"
8897
8898 #. type: Plain text
8899 #: build/C/man2/readlink.2:282
8900 #, no-wrap
8901 msgid ""
8902 "#include E<lt>sys/types.hE<gt>\n"
8903 "#include E<lt>sys/stat.hE<gt>\n"
8904 "#include E<lt>stdio.hE<gt>\n"
8905 "#include E<lt>stdlib.hE<gt>\n"
8906 "#include E<lt>unistd.hE<gt>\n"
8907 msgstr ""
8908 "#include E<lt>sys/types.hE<gt>\n"
8909 "#include E<lt>sys/stat.hE<gt>\n"
8910 "#include E<lt>stdio.hE<gt>\n"
8911 "#include E<lt>stdlib.hE<gt>\n"
8912 "#include E<lt>unistd.hE<gt>\n"
8913
8914 #. type: Plain text
8915 #: build/C/man2/readlink.2:289
8916 #, no-wrap
8917 msgid ""
8918 "int\n"
8919 "main(int argc, char *argv[])\n"
8920 "{\n"
8921 "    struct stat sb;\n"
8922 "    char *linkname;\n"
8923 "    ssize_t r;\n"
8924 msgstr ""
8925 "int\n"
8926 "main(int argc, char *argv[])\n"
8927 "{\n"
8928 "    struct stat sb;\n"
8929 "    char *linkname;\n"
8930 "    ssize_t r;\n"
8931
8932 #. type: Plain text
8933 #: build/C/man2/readlink.2:294
8934 #, no-wrap
8935 msgid ""
8936 "    if (argc != 2) {\n"
8937 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
8938 "        exit(EXIT_FAILURE);\n"
8939 "    }\n"
8940 msgstr ""
8941 "    if (argc != 2) {\n"
8942 "        fprintf(stderr, \"Usage: %s E<lt>pathnameE<gt>\\en\", argv[0]);\n"
8943 "        exit(EXIT_FAILURE);\n"
8944 "    }\n"
8945
8946 #. type: Plain text
8947 #: build/C/man2/readlink.2:299
8948 #, no-wrap
8949 msgid ""
8950 "    if (lstat(argv[1], &sb) == -1) {\n"
8951 "        perror(\"lstat\");\n"
8952 "        exit(EXIT_FAILURE);\n"
8953 "    }\n"
8954 msgstr ""
8955 "    if (lstat(argv[1], &sb) == -1) {\n"
8956 "        perror(\"lstat\");\n"
8957 "        exit(EXIT_FAILURE);\n"
8958 "    }\n"
8959
8960 #. type: Plain text
8961 #: build/C/man2/readlink.2:305
8962 #, no-wrap
8963 msgid ""
8964 "    linkname = malloc(sb.st_size + 1);\n"
8965 "    if (linkname == NULL) {\n"
8966 "        fprintf(stderr, \"insufficient memory\\en\");\n"
8967 "        exit(EXIT_FAILURE);\n"
8968 "    }\n"
8969 msgstr ""
8970 "    linkname = malloc(sb.st_size + 1);\n"
8971 "    if (linkname == NULL) {\n"
8972 "        fprintf(stderr, \"insufficient memory\\en\");\n"
8973 "        exit(EXIT_FAILURE);\n"
8974 "    }\n"
8975
8976 #. type: Plain text
8977 #: build/C/man2/readlink.2:307
8978 #, no-wrap
8979 msgid "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
8980 msgstr "    r = readlink(argv[1], linkname, sb.st_size + 1);\n"
8981
8982 #. type: Plain text
8983 #: build/C/man2/readlink.2:312
8984 #, no-wrap
8985 msgid ""
8986 "    if (r == -1) {\n"
8987 "        perror(\"readlink\");\n"
8988 "        exit(EXIT_FAILURE);\n"
8989 "    }\n"
8990 msgstr ""
8991 "    if (r == -1) {\n"
8992 "        perror(\"readlink\");\n"
8993 "        exit(EXIT_FAILURE);\n"
8994 "    }\n"
8995
8996 #. type: Plain text
8997 #: build/C/man2/readlink.2:318
8998 #, no-wrap
8999 msgid ""
9000 "    if (r E<gt> sb.st_size) {\n"
9001 "        fprintf(stderr, \"symlink increased in size \"\n"
9002 "                        \"between lstat() and readlink()\\en\");\n"
9003 "        exit(EXIT_FAILURE);\n"
9004 "    }\n"
9005 msgstr ""
9006 "    if (r E<gt> sb.st_size) {\n"
9007 "        fprintf(stderr, \"symlink increased in size \"\n"
9008 "                        \"between lstat() and readlink()\\en\");\n"
9009 "        exit(EXIT_FAILURE);\n"
9010 "    }\n"
9011
9012 #. type: Plain text
9013 #: build/C/man2/readlink.2:320
9014 #, no-wrap
9015 msgid "    linkname[r] = \\(aq\\e0\\(aq;\n"
9016 msgstr "    linkname[r] = \\(aq\\e0\\(aq;\n"
9017
9018 #. type: Plain text
9019 #: build/C/man2/readlink.2:322
9020 #, no-wrap
9021 msgid "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
9022 msgstr "    printf(\"\\(aq%s\\(aq points to \\(aq%s\\(aq\\en\", argv[1], linkname);\n"
9023
9024 #. type: Plain text
9025 #: build/C/man2/readlink.2:324
9026 #, no-wrap
9027 msgid "    free(linkname);\n"
9028 msgstr "    free(linkname);\n"
9029
9030 #. type: Plain text
9031 #: build/C/man2/readlink.2:336
9032 msgid "B<readlink>(1), B<lstat>(2), B<stat>(2), B<symlink>(2), B<realpath>(3), B<path_resolution>(7), B<symlink>(7)"
9033 msgstr "B<readlink>(1), B<lstat>(2), B<stat>(2), B<symlink>(2), B<realpath>(3), B<path_resolution>(7), B<symlink>(7)"
9034
9035 #. type: TH
9036 #: build/C/man2/readv.2:32
9037 #, no-wrap
9038 msgid "READV"
9039 msgstr "READV"
9040
9041 #. type: Plain text
9042 #: build/C/man2/readv.2:35
9043 msgid "readv, writev, preadv, pwritev - read or write data into multiple buffers"
9044 msgstr "readv, writev, preadv, pwritev - 複数のバッファへの読み書きを行なう"
9045
9046 #. type: Plain text
9047 #: build/C/man2/readv.2:38
9048 #, no-wrap
9049 msgid "B<#include E<lt>sys/uio.hE<gt>>\n"
9050 msgstr "B<#include E<lt>sys/uio.hE<gt>>\n"
9051
9052 #. type: Plain text
9053 #: build/C/man2/readv.2:40
9054 #, no-wrap
9055 msgid "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9056 msgstr "B<ssize_t readv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9057
9058 #. type: Plain text
9059 #: build/C/man2/readv.2:42
9060 #, no-wrap
9061 msgid "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9062 msgstr "B<ssize_t writev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<);>\n"
9063
9064 #. type: Plain text
9065 #: build/C/man2/readv.2:45
9066 #, no-wrap
9067 msgid ""
9068 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9069 "B<               off_t >I<offset>B<);>\n"
9070 msgstr ""
9071 "B<ssize_t preadv(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9072 "B<               off_t >I<offset>B<);>\n"
9073
9074 #. type: Plain text
9075 #: build/C/man2/readv.2:48
9076 #, no-wrap
9077 msgid ""
9078 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9079 "B<                off_t >I<offset>B<);>\n"
9080 msgstr ""
9081 "B<ssize_t pwritev(int >I<fd>B<, const struct iovec *>I<iov>B<, int >I<iovcnt>B<,>\n"
9082 "B<                off_t >I<offset>B<);>\n"
9083
9084 #. type: Plain text
9085 #: build/C/man2/readv.2:58
9086 msgid "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
9087 msgstr "B<preadv>(), B<pwritev>(): _BSD_SOURCE"
9088
9089 #. type: Plain text
9090 #: build/C/man2/readv.2:68
9091 msgid "The B<readv>()  system call reads I<iovcnt> buffers from the file associated with the file descriptor I<fd> into the buffers described by I<iov> (\"scatter input\")."
9092 msgstr ""
9093 "B<readv>() システムコールは、ファイルディスクリプタ I<fd> に関連付けられた\n"
9094 "ファイルから、 I<iovcnt> 個のバッファ分のデータを読み込み、 I<iov> で指定\n"
9095 "されたバッファに格納する (\"scatter input\";「ばらまき入力」)。"
9096
9097 #. type: Plain text
9098 #: build/C/man2/readv.2:78
9099 msgid "The B<writev>()  system call writes I<iovcnt> buffers of data described by I<iov> to the file associated with the file descriptor I<fd> (\"gather output\")."
9100 msgstr ""
9101 "B<writev>() システムコールは、 I<iov> で指定されたバッファから最大 I<iovcnt>\n"
9102 "個のバッファ分のデータを取り出し、 ファイルディスクリプタ I<fd> に関連付けら\n"
9103 "れたファイルに書き込む (\"gather output\";「かき集め出力」)。"
9104
9105 #. type: Plain text
9106 #: build/C/man2/readv.2:87
9107 msgid "The pointer I<iov> points to an array of I<iovec> structures, defined in I<E<lt>sys/uio.hE<gt>> as:"
9108 msgstr "ポインタ I<iov> は I<iovec> 構造体の配列へのポインタである。 I<iovec> 構造体は I<E<lt>sys/uio.hE<gt>> で以下のように定義されている:"
9109
9110 #. type: Plain text
9111 #: build/C/man2/readv.2:95
9112 #, no-wrap
9113 msgid ""
9114 "struct iovec {\n"
9115 "    void  *iov_base;    /* Starting address */\n"
9116 "    size_t iov_len;     /* Number of bytes to transfer */\n"
9117 "};\n"
9118 msgstr ""
9119 "struct iovec {\n"
9120 "    void  *iov_base;    /* Starting address */\n"
9121 "    size_t iov_len;     /* Number of bytes to transfer */\n"
9122 "};\n"
9123
9124 #. type: Plain text
9125 #: build/C/man2/readv.2:103
9126 msgid "The B<readv>()  system call works just like B<read>(2)  except that multiple buffers are filled."
9127 msgstr ""
9128 "B<readv>() システムコールは、複数のバッファにデータを読み込む点を除いて\n"
9129 "B<read>(2) と全く同様の動作を行う。"
9130
9131 #. type: Plain text
9132 #: build/C/man2/readv.2:109
9133 msgid "The B<writev>()  system call works just like B<write>(2)  except that multiple buffers are written out."
9134 msgstr ""
9135 "B<writev>() システムコールは、複数のバッファのデータを書き出す点以外は\n"
9136 "B<write>(2) と全く同様の動作を行う。"
9137
9138 #. type: Plain text
9139 #: build/C/man2/readv.2:128
9140 msgid "Buffers are processed in array order.  This means that B<readv>()  completely fills I<iov>[0] before proceeding to I<iov>[1], and so on.  (If there is insufficient data, then not all buffers pointed to by I<iov> may be filled.)  Similarly, B<writev>()  writes out the entire contents of I<iov>[0] before proceeding to I<iov>[1], and so on."
9141 msgstr "バッファは配列の順序で処理される。これは、 B<readv>()  が I<iov>[0] が完全に一杯になるまでデータを詰めてから、 I<iov>[1] などに進むことを意味する (データが十分ない場合は、 I<iov> が指すバッファのいずれも一杯にならない)。 同様に、 B<writev>()  は I<iov>[0] の内容を全部書き出してから I<iov>[1] などに進む。"
9142
9143 #. type: Plain text
9144 #: build/C/man2/readv.2:146
9145 msgid "The data transfers performed by B<readv>()  and B<writev>()  are atomic: the data written by B<writev>()  is written as a single block that is not intermingled with output from writes in other processes (but see B<pipe>(7)  for an exception); analogously, B<readv>()  is guaranteed to read a contiguous block of data from the file, regardless of read operations performed in other threads or processes that have file descriptors referring to the same open file description (see B<open>(2))."
9146 msgstr "B<readv>()  と B<writev>()  によるデータ転送は atomic に行われる。つまり、 B<writev>()  によるデータ書き込みは一つのブロックとして行われ、他のプロセスの write による書き込みと混ざり合うことはない (例外に関しては B<pipe>(7)  を参照のこと)。同様に、 B<readv>()  はファイルから連続するデータブロックが読み出すことが保証され、 同じファイル記述 (file description; B<open>(2)  参照) を参照するファイルディスクリプタを持つ他のスレッドやプロセスが 実行した read 操作の影響を受けることはない。"
9147
9148 #. type: SS
9149 #: build/C/man2/readv.2:146
9150 #, no-wrap
9151 msgid "preadv() and pwritev()"
9152 msgstr "preadv() と pwritev()"
9153
9154 #. type: Plain text
9155 #: build/C/man2/readv.2:159
9156 msgid "The B<preadv>()  system call combines the functionality of B<readv>()  and B<pread>(2).  It performs the same task as B<readv>(), but adds a fourth argument, I<offset>, which specifies the file offset at which the input operation is to be performed."
9157 msgstr ""
9158 "B<preadv>() システムコールは B<readv>() と B<preadv>(2) の機能を\n"
9159 "組み合わせたものである。\n"
9160 "B<readv>() と同じ処理を実行するが、\n"
9161 "4 番目の引き数 I<offset> が追加されており、\n"
9162 "この引き数は入力操作を行うファイルオフセットを指定する。"
9163
9164 #. type: Plain text
9165 #: build/C/man2/readv.2:172
9166 msgid "The B<pwritev>()  system call combines the functionality of B<writev>()  and B<pwrite>(2).  It performs the same task as B<writev>(), but adds a fourth argument, I<offset>, which specifies the file offset at which the output operation is to be performed."
9167 msgstr ""
9168 "B<pwritev>() システムコールは B<writev>() と B<pwrite>(2) の機能を\n"
9169 "組み合わせたものである。\n"
9170 "B<writev>() と同じ処理を実行するが、\n"
9171 "4 番目の引き数 I<offset> が追加されており、\n"
9172 "この引き数は出力操作を行うファイルオフセットを指定する。"
9173
9174 #. type: Plain text
9175 #: build/C/man2/readv.2:177
9176 msgid "The file offset is not changed by these system calls.  The file referred to by I<fd> must be capable of seeking."
9177 msgstr ""
9178 "これらのシステムコールで、ファイルオフセットは変更されない。\n"
9179 "I<fd> が参照するファイルは seek 可能でなければならない。"
9180
9181 #. type: Plain text
9182 #: build/C/man2/readv.2:188
9183 msgid "On success, B<readv>()  and B<preadv>()  return the number of bytes read; B<writev>()  and B<pwritev>()  return the number of bytes written.  On error, -1 is returned, and I<errno> is set appropriately."
9184 msgstr ""
9185 "成功した場合、 B<readv>() と B<preadv> は読み込んだバイト数を返し、\n"
9186 "B<writev>() と B<pwritev>()は書き込んだバイト数を返す。\n"
9187 "エラーの場合 -1 を返し、I<errno> を適切に設定する。"
9188
9189 #. type: Plain text
9190 #: build/C/man2/readv.2:200
9191 msgid "The errors are as given for B<read>(2)  and B<write>(2).  Furthermore, B<preadv>()  and B<pwritev>()  can also fail for the same reasons as B<lseek>(2).  Additionally, the following error is defined:"
9192 msgstr ""
9193 "B<read>(2)  や B<write>(2)  と同じエラーが定義されている。\n"
9194 "さらに、 B<preadv>() と B<pwritev>() は B<lseek>(2) と同じ理由でも失敗する。\n"
9195 "また、追加で以下のエラーが定義されている:"
9196
9197 #. type: Plain text
9198 #: build/C/man2/readv.2:207
9199 msgid "The sum of the I<iov_len> values overflows an I<ssize_t> value."
9200 msgstr "I<iov_len> の合計が I<ssize_t> の範囲をオーバーフローした。"
9201
9202 #. type: Plain text
9203 #: build/C/man2/readv.2:211
9204 msgid "The vector count I<iovcnt> is less than zero or greater than the permitted maximum."
9205 msgstr "ベクタ数 I<iovcnt> が 0 より小さいか許可された最大値よりも大きかった。"
9206
9207 #. type: Plain text
9208 #: build/C/man2/readv.2:216
9209 msgid "B<preadv>()  and B<pwritev>()  first appeared in Linux 2.6.30; library support was added in glibc 2.10."
9210 msgstr ""
9211 "B<preadv>() と B<pwritev>() は Linux 2.6.30 で初めて登場した。\n"
9212 "ライブラリによるサポートは glibc 2.10 で追加された。"
9213
9214 #.  Linux libc5 used \fIsize_t\fP as the type of the \fIiovcnt\fP argument,
9215 #.  and \fIint\fP as the return type.
9216 #.  The readv/writev system calls were buggy before Linux 1.3.40.
9217 #.  (Says release.libc.)
9218 #. type: Plain text
9219 #: build/C/man2/readv.2:224
9220 msgid "B<readv>(), B<writev>(): 4.4BSD (these system calls first appeared in 4.2BSD), POSIX.1-2001."
9221 msgstr "B<readv>(), B<writev>(): 4.4BSD (これらのシステムコールは 4.2BSD で初めて登場した), POSIX.1-2001."
9222
9223 #. type: Plain text
9224 #: build/C/man2/readv.2:228
9225 msgid "B<preadv>(), B<pwritev>(): nonstandard, but present also on the modern BSDs."
9226 msgstr "B<preadv>(), B<pwritev>(): 非標準だが、最近の BSD にも存在する。"
9227
9228 #. type: Plain text
9229 #: build/C/man2/readv.2:240
9230 msgid "POSIX.1-2001 allows an implementation to place a limit on the number of items that can be passed in I<iov>.  An implementation can advertise its limit by defining B<IOV_MAX> in I<E<lt>limits.hE<gt>> or at run time via the return value from I<sysconf(_SC_IOV_MAX)>.  On modern Linux systems, the limit is 1024.  Back in Linux 2.0 days, this limit was 16."
9231 msgstr "POSIX.1-2001 では、 I<iov> で渡すことができる要素数に上限を設ける実装が認められている。 実装はこの上限値を広告することができ、 I<E<lt>limits.hE<gt>> の B<IOV_MAX> を定義することや、 実行時に I<sysconf(_SC_IOV_MAX)> の返り値経由で知ることができる。 最近の Linux では、 この上限値は 1024 である。 Linux 2.0 の頃は、 この値は 16 であった。"
9232
9233 #. type: SS
9234 #: build/C/man2/readv.2:242
9235 #, no-wrap
9236 msgid "C library/kernel ABI differences"
9237 msgstr "C ライブラリとカーネル ABI の違い"
9238
9239 #. type: Plain text
9240 #: build/C/man2/readv.2:252
9241 msgid "The raw B<preadv>()  and B<pwritev>()  system calls have call signatures that differ slightly from that of the corresponding GNU C library wrapper functions shown in the SYNOPSIS.  The final argument, I<offset>, is unpacked by the wrapper functions into two arguments in the system calls:"
9242 msgstr "素のシステムコール B<preadv>() と B<pwritev>() のシグネチャーは、 「書式」に書かれている対応する GNU C ライブラリのラッパー関数のものとは少し異なる。 最後の引き数 I<offset> はラッパー関数によりシステムコールの 2 つの引き数に展開される。"
9243
9244 #. type: Plain text
9245 #: build/C/man2/readv.2:254
9246 msgid "B< unsigned long >I<pos_l>B<, unsigned long >I<pos>"
9247 msgstr "B< unsigned long >I<pos_l>B<, unsigned long >I<pos>"
9248
9249 #. type: Plain text
9250 #: build/C/man2/readv.2:257
9251 msgid "These arguments contain, respectively, the low order and high order 32 bits of I<offset>."
9252 msgstr "これらの引き数は、それぞれ、 I<offset> の下位 32 ビットと上位 32 ビットである。"
9253
9254 #. type: SS
9255 #: build/C/man2/readv.2:257
9256 #, no-wrap
9257 msgid "Historical C library/kernel ABI differences"
9258 msgstr "以前の C ライブラリとカーネル ABI の違い"
9259
9260 #. type: Plain text
9261 #: build/C/man2/readv.2:283
9262 msgid "To deal with the fact that B<IOV_MAX> was so low on early versions of Linux, the glibc wrapper functions for B<readv>()  and B<writev>()  did some extra work if they detected that the underlying kernel system call failed because this limit was exceeded.  In the case of B<readv>(), the wrapper function allocated a temporary buffer large enough for all of the items specified by I<iov>, passed that buffer in a call to B<read>(2), copied data from the buffer to the locations specified by the I<iov_base> fields of the elements of I<iov>, and then freed the buffer.  The wrapper function for B<writev>()  performed the analogous task using a temporary buffer and a call to B<write>(2)."
9263 msgstr "古いバージョンの Linux では B<IOV_MAX> が非常に小さかったという事実に対処するため、 glibc の B<readv>() と B<writev>() のラッパー関数は、 その関数の内部で呼ばれるカーネルシステムコールがこの上限を超過して失敗したことを検出すると、 追加の動作をしていた。 B<readv>() の場合、 ラッパー関数は I<iov> で指定された全ての要素を格納できる大きさの一時バッファーを割り当て、 B<read>(2) を呼び出す際にそのバッファーを渡し、 そのバッファーのデータを I<iov> の各要素の I<iov_base> フィールドが指定する場所にコピーしてから、 そのバッファーを解放していた。 B<writev>() のラッパー関数も、 同じように一時バッファーを使って B<write>(2) を呼び出していた。"
9264
9265 #. type: Plain text
9266 #: build/C/man2/readv.2:294
9267 msgid "The need for this extra effort in the glibc wrapper functions went away with Linux 2.2 and later.  However, glibc continued to provide this behavior until version 2.10.  Starting with glibc version 2.9, the wrapper functions provide this behavior only if the library detects that the system is running a Linux kernel older than version 2.6.18 (an arbitrarily selected kernel version).  And since glibc 2.20 (which requires a minimum Linux kernel version of 2.6.32), the glibc wrapper functions always just directly invoke the system calls."
9268 msgstr "glibc ラッパー関数でのこの追加の動作は Linux 2.2 以降では必要なくなった。 しかし、 glibc はバージョン 2.10 まではこの動作を続けていた。 glibc 2.9 以降では、 システムがバージョン 2.6.18 より前の Linux カーネル (2.6.18 は勝手に選択したカーネルバージョンである) を実行しているとライブラリが検出した場合にのみ、 ラッパー関数はこの動作を行う。 glibc 2.20 以降では、 (Linux カーネルのバージョン 2.6.32 以降が必須条件となり) glibc のラッパー関数は常にシステムコールを直接呼び出すようになっている。"
9269
9270 #. type: Plain text
9271 #: build/C/man2/readv.2:301
9272 msgid "It is not advisable to mix calls to B<readv>()  or B<writev>(), which operate on file descriptors, with the functions from the stdio library; the results will be undefined and probably not what you want."
9273 msgstr ""
9274 "ファイルディスクリプタに対する操作を行う B<readv>() や B<writev>() と、\n"
9275 "標準入出力ライブラリの関数をごちゃまぜにして呼ぶのはお薦めしない。\n"
9276 "どんな結果になるかは定義されておらず、おそらく期待する結果は\n"
9277 "得られないだろう。"
9278
9279 #. type: Plain text
9280 #: build/C/man2/readv.2:304
9281 msgid "The following code sample demonstrates the use of B<writev>():"
9282 msgstr "以下のサンプルコードは B<writev>()  の使用方法を示すものである。"
9283
9284 #. type: Plain text
9285 #: build/C/man2/readv.2:311
9286 #, no-wrap
9287 msgid ""
9288 "char *str0 = \"hello \";\n"
9289 "char *str1 = \"world\\en\";\n"
9290 "struct iovec iov[2];\n"
9291 "ssize_t nwritten;\n"
9292 msgstr ""
9293 "char *str0 = \"hello \";\n"
9294 "char *str1 = \"world\\en\";\n"
9295 "struct iovec iov[2];\n"
9296 "ssize_t nwritten;\n"
9297
9298 #. type: Plain text
9299 #: build/C/man2/readv.2:316
9300 #, no-wrap
9301 msgid ""
9302 "iov[0].iov_base = str0;\n"
9303 "iov[0].iov_len = strlen(str0);\n"
9304 "iov[1].iov_base = str1;\n"
9305 "iov[1].iov_len = strlen(str1);\n"
9306 msgstr ""
9307 "iov[0].iov_base = str0;\n"
9308 "iov[0].iov_len = strlen(str0);\n"
9309 "iov[1].iov_base = str1;\n"
9310 "iov[1].iov_len = strlen(str1);\n"
9311
9312 #. type: Plain text
9313 #: build/C/man2/readv.2:318
9314 #, no-wrap
9315 msgid "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
9316 msgstr "nwritten = writev(STDOUT_FILENO, iov, 2);\n"
9317
9318 #. type: Plain text
9319 #: build/C/man2/readv.2:324
9320 msgid "B<pread>(2), B<read>(2), B<write>(2)"
9321 msgstr "B<pread>(2), B<read>(2), B<write>(2)"
9322
9323 #. type: TH
9324 #: build/C/man3/remove.3:31
9325 #, no-wrap
9326 msgid "REMOVE"
9327 msgstr "REMOVE"
9328
9329 #. type: Plain text
9330 #: build/C/man3/remove.3:34
9331 msgid "remove - remove a file or directory"
9332 msgstr "remove - ファイルやディレクトリを削除する"
9333
9334 #. type: Plain text
9335 #: build/C/man3/remove.3:38
9336 msgid "B<int remove(const char *>I<pathname>B<);>"
9337 msgstr "B<int remove(const char *>I<pathname>B<);>"
9338
9339 #. type: Plain text
9340 #: build/C/man3/remove.3:46
9341 msgid "B<remove>()  deletes a name from the filesystem.  It calls B<unlink>(2)  for files, and B<rmdir>(2)  for directories."
9342 msgstr "B<remove>()  はファイルシステムからファイル名を削除する。 ファイルに対しては B<unlink>(2)  を、ディレクトリに対しては B<rmdir>(2)  を呼び出す。"
9343
9344 #. type: Plain text
9345 #: build/C/man3/remove.3:50
9346 msgid "If the removed name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse."
9347 msgstr "もしその名前が ファイルへの最後のリンクで、かつ、どのプロセスもそのファイルを 開いていないなら、ファイルも削除する。ファイルの占めていた 領域は他で使うことができるようになる。"
9348
9349 #. type: Plain text
9350 #: build/C/man3/remove.3:55
9351 msgid "If the name was the last link to a file, but any processes still have the file open, the file will remain in existence until the last file descriptor referring to it is closed."
9352 msgstr "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるまでファイルは存在し続ける。"
9353
9354 #. type: Plain text
9355 #: build/C/man3/remove.3:57 build/C/man2/unlink.2:78
9356 msgid "If the name referred to a symbolic link, the link is removed."
9357 msgstr "名前が指しているのがシンボリックリンクなら、そのリンクを削除する。"
9358
9359 #. type: Plain text
9360 #: build/C/man3/remove.3:60
9361 msgid "If the name referred to a socket, FIFO, or device, the name is removed, but processes which have the object open may continue to use it."
9362 msgstr "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 そのソケットなどを開いているプロセスはそのまま使い続けることができる。"
9363
9364 #. type: Plain text
9365 #: build/C/man3/remove.3:70
9366 msgid "The errors that occur are those for B<unlink>(2)  and B<rmdir>(2)."
9367 msgstr "発生するエラーは B<unlink>(2)  および B<rmdir>(2)  と同じものである。"
9368
9369 #. type: Plain text
9370 #: build/C/man3/remove.3:75
9371 msgid "The B<remove>()  function is thread-safe."
9372 msgstr "関数 B<remove>() はスレッドセーフである。"
9373
9374 #.  .SH NOTES
9375 #.  Under libc4 and libc5,
9376 #.  .BR remove ()
9377 #.  was an alias for
9378 #.  .BR unlink (2)
9379 #.  (and hence would not remove directories).
9380 #. type: Plain text
9381 #: build/C/man3/remove.3:83
9382 msgid "C89, C99, 4.3BSD, POSIX.1-2001."
9383 msgstr "C89, C99, 4.3BSD, POSIX.1-2001."
9384
9385 #. type: Plain text
9386 #: build/C/man3/remove.3:86 build/C/man2/unlink.2:300
9387 msgid "Infelicities in the protocol underlying NFS can cause the unexpected disappearance of files which are still being used."
9388 msgstr "NFS プロトコルに内在する問題により、まだ使用中のファイルが想定外に消えてしまうことがありえる。"
9389
9390 #. type: Plain text
9391 #: build/C/man3/remove.3:97
9392 msgid "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
9393 msgstr "B<rm>(1), B<unlink>(1), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), B<rmdir>(2), B<unlink>(2), B<mkfifo>(3), B<symlink>(7)"
9394
9395 #. type: TH
9396 #: build/C/man2/rename.2:33
9397 #, no-wrap
9398 msgid "RENAME"
9399 msgstr "RENAME"
9400
9401 #. type: Plain text
9402 #: build/C/man2/rename.2:36
9403 msgid "rename, renameat, renameat2 - change the name or location of a file"
9404 msgstr "rename, renameat, renameat2 - ファイルの名前や位置を変更する"
9405
9406 #. type: Plain text
9407 #: build/C/man2/rename.2:41
9408 #, no-wrap
9409 msgid "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
9410 msgstr "B<int rename(const char *>I<oldpath>B<, const char *>I<newpath>B<);>\n"
9411
9412 #. type: Plain text
9413 #: build/C/man2/rename.2:44
9414 #, no-wrap
9415 msgid ""
9416 "B<#include E<lt>fcntl.hE<gt>           >/* Definition of AT_* constants */\n"
9417 "B<#include E<lt>stdio.hE<gt>>\n"
9418 msgstr ""
9419 "B<#include E<lt>fcntl.hE<gt>           >/* AT_* 定数の定義 */\n"
9420 "B<#include E<lt>stdio.hE<gt>>\n"
9421
9422 #. type: Plain text
9423 #: build/C/man2/rename.2:47
9424 #, no-wrap
9425 msgid ""
9426 "B<int renameat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
9427 "B<             int >I<newdirfd>B<, const char *>I<newpath>B<);>\n"
9428 msgstr ""
9429 "B<int renameat(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
9430 "B<             int >I<newdirfd>B<, const char *>I<newpath>B<);>\n"
9431
9432 #. type: Plain text
9433 #: build/C/man2/rename.2:51
9434 #, no-wrap
9435 msgid ""
9436 "B<int renameat2(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
9437 "B<              int >I<newdirfd>B<, const char *>I<newpath>B<, unsigned int >I<flags>B<);>\n"
9438 msgstr ""
9439 "B<int renameat2(int >I<olddirfd>B<, const char *>I<oldpath>B<,>\n"
9440 "B<              int >I<newdirfd>B<, const char *>I<newpath>B<, unsigned int >I<flags>B<);>\n"
9441
9442 #. type: Plain text
9443 #: build/C/man2/rename.2:59
9444 msgid "B<renameat>():"
9445 msgstr "B<renameat>():"
9446
9447 #. type: Plain text
9448 #: build/C/man2/rename.2:81
9449 msgid "B<rename>()  renames a file, moving it between directories if required.  Any other hard links to the file (as created using B<link>(2))  are unaffected.  Open file descriptors for I<oldpath> are also unaffected."
9450 msgstr "B<rename>()  はファイルの名前を変更し、必要ならばディレクトリ間の移動を行なう。 そのファイルに対する (B<link>(2)  を使用して作られた) 他のハードリンク (hard link) には影響はない。 オープン済の I<oldpath> に対するファイルディスクリプタにも影響はない。"
9451
9452 #. type: Plain text
9453 #: build/C/man2/rename.2:89
9454 msgid "If I<newpath> already exists, it will be atomically replaced (subject to a few conditions; see ERRORS below), so that there is no point at which another process attempting to access I<newpath> will find it missing."
9455 msgstr "I<newpath> が既に存在する場合、それは不可分操作で (atomically) 置き換えられる (ただし、いくつかの条件がある; 以下の「エラー」のセクションを参照)。 そのため、 I<newpath> にアクセスしようとしている他のプロセスがファイルを見失うことはない (訳註: 常にアクセス可能である)。"
9456
9457 #. type: Plain text
9458 #: build/C/man2/rename.2:97
9459 msgid "If I<oldpath> and I<newpath> are existing hard links referring to the same file, then B<rename>()  does nothing, and returns a success status."
9460 msgstr "I<oldpath> と I<newpath> がどちらも既存のハードリンクで、同じファイルを参照している場合、 B<rename>()  は何も行わず、ステータスとして成功を返す。"
9461
9462 #. type: Plain text
9463 #: build/C/man2/rename.2:105
9464 msgid "If I<newpath> exists but the operation fails for some reason, B<rename>()  guarantees to leave an instance of I<newpath> in place."
9465 msgstr "I<newpath> が存在し、何らかの理由で操作が失敗した場合、 B<rename>()  は I<newpath> の実体を元のまま残すことを保証する。"
9466
9467 #. type: Plain text
9468 #: build/C/man2/rename.2:111
9469 msgid "I<oldpath> can specify a directory.  In this case, I<newpath> must either not exist, or it must specify an empty directory."
9470 msgstr "I<oldpath> にはディレクトリを指定することもできる。 この場合、 I<newpath> は存在しないか、空のディレクトリでなければならない。"
9471
9472 #. type: Plain text
9473 #: build/C/man2/rename.2:118
9474 msgid "However, when overwriting there will probably be a window in which both I<oldpath> and I<newpath> refer to the file being renamed."
9475 msgstr "一方で、上書きを行なう場合は、rename が行なわれるファイルを I<oldpath> と I<newpath> の両方で参照できる瞬間がおそらく存在する。"
9476
9477 #. type: Plain text
9478 #: build/C/man2/rename.2:124
9479 msgid "If I<oldpath> refers to a symbolic link, the link is renamed; if I<newpath> refers to a symbolic link, the link will be overwritten."
9480 msgstr "I<oldpath> がシンボリックリンク (symbolic link) を参照している場合は、 リンクの名前が変更される。 また、 I<newpath> がシンボリックリンクを参照している場合は、リンクが上書きされる。"
9481
9482 #. type: SS
9483 #: build/C/man2/rename.2:124
9484 #, no-wrap
9485 msgid "renameat()"
9486 msgstr "renameat()"
9487
9488 #. type: Plain text
9489 #: build/C/man2/rename.2:130
9490 msgid "The B<renameat>()  system call operates in exactly the same way as B<rename>(), except for the differences described here."
9491 msgstr "B<renameat>() システムコールは B<rename>() と全く同様に動作するが、以下で説明する点が異なる。"
9492
9493 #. type: Plain text
9494 #: build/C/man2/rename.2:140
9495 msgid "If the pathname given in I<oldpath> is relative, then it is interpreted relative to the directory referred to by the file descriptor I<olddirfd> (rather than relative to the current working directory of the calling process, as is done by B<rename>()  for a relative pathname)."
9496 msgstr "I<oldpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリプター I<olddirfd> が参照するディレクトリに対する相対パスと解釈される (B<rename>(2) に相対パス名を渡した場合のように、呼び出したプロセスのカレントワーキングディレクトリに対する相対パスではない)。"
9497
9498 #. type: Plain text
9499 #: build/C/man2/rename.2:152
9500 msgid "If I<oldpath> is relative and I<olddirfd> is the special value B<AT_FDCWD>, then I<oldpath> is interpreted relative to the current working directory of the calling process (like B<rename>())."
9501 msgstr "I<oldpath> で指定されたパス名が相対パスで、 I<olddirfd> が特別な値 B<AT_FDCWD> の場合、 (B<rename>(2) と同様に) I<oldpath> は呼び出したプロセスのカレントワーキングディレクトリに対する相対パスと解釈される。"
9502
9503 #. type: Plain text
9504 #: build/C/man2/rename.2:171
9505 msgid "See B<openat>(2)  for an explanation of the need for B<renameat>()."
9506 msgstr "B<renameat>() の必要性についての説明については B<openat>(2) を参照。"
9507
9508 #. type: SS
9509 #: build/C/man2/rename.2:171
9510 #, no-wrap
9511 msgid "renameat2()"
9512 msgstr "renameat2()"
9513
9514 #. type: Plain text
9515 #: build/C/man2/rename.2:182
9516 msgid "B<renameat2>()  has an additional I<flags> argument.  A B<renameat2>()  call with a zero I<flags> argument is equivalent to B<renameat>()."
9517 msgstr "B<renameat2>() には追加の I<flags> 引き数がある。 I<flags> 引き数が 0 の B<renameat2>() の呼び出しは B<renameat>() と等価である。"
9518
9519 #. type: Plain text
9520 #: build/C/man2/rename.2:186
9521 msgid "The I<flags> argument is a bit mask consisting of zero or more of the following flags:"
9522 msgstr "I<flags> 引き数は、以下のフラグの 0 個以上のビットマスクである。"
9523
9524 #. type: TP
9525 #: build/C/man2/rename.2:186
9526 #, no-wrap
9527 msgid "B<RENAME_NOREPLACE>"
9528 msgstr "B<RENAME_NOREPLACE>"
9529
9530 #. type: Plain text
9531 #: build/C/man2/rename.2:194
9532 msgid "Don't overwrite I<newpath> of the rename.  Return an error if I<newpath> already exists."
9533 msgstr "rename の I<newpath> を上書きしない。 I<newpath> がすでに存在する場合エラーを返す。"
9534
9535 #. type: TP
9536 #: build/C/man2/rename.2:194
9537 #, no-wrap
9538 msgid "B<RENAME_EXCHANGE>"
9539 msgstr "B<RENAME_EXCHANGE>"
9540
9541 #. type: Plain text
9542 #: build/C/man2/rename.2:203
9543 msgid "Atomically exchange I<oldpath> and I<newpath>.  Both pathnames must exist but may be of different types (e.g., one could be a non-empty directory and the other a symbolic link)."
9544 msgstr "I<oldpath> と I<newpath> をアトミックに入れ換える。 両方のパス名が存在しなければならないが、 ファイル種別は異なっていてもよい (例えば、一方は空でないディレクトリで、もう一方はシンボリックリンクであるなど)。"
9545
9546 #. type: Plain text
9547 #: build/C/man2/rename.2:228
9548 msgid "Write permission is denied for the directory containing I<oldpath> or I<newpath>, or, search permission is denied for one of the directories in the path prefix of I<oldpath> or I<newpath>, or I<oldpath> is a directory and does not allow write permission (needed to update the I<..> entry).  (See also B<path_resolution>(7).)"
9549 msgstr "I<oldpath> または I<newpath> を含んでいるディレクトリの書き込み許可がない。 または、 I<oldpath> または I<newpath> のディレクトリ部分のどれかに検索許可がない。 または、 I<oldpath> がディレクトリで (I<..> エントリを更新するのに必要な) 書き込み許可がない (B<path_resolution>(7)  も参照)。"
9550
9551 #. type: TP
9552 #: build/C/man2/rename.2:228 build/C/man2/rmdir.2:55 build/C/man2/unlink.2:169
9553 #, no-wrap
9554 msgid "B<EBUSY>"
9555 msgstr "B<EBUSY>"
9556
9557 #. type: Plain text
9558 #: build/C/man2/rename.2:245
9559 msgid "The rename fails because I<oldpath> or I<newpath> is a directory that is in use by some process (perhaps as current working directory, or as root directory, or because it was open for reading) or is in use by the system (for example as mount point), while the system considers this an error.  (Note that there is no requirement to return B<EBUSY> in such cases\\(emthere is nothing wrong with doing the rename anyway\\(embut it is allowed to return B<EBUSY> if the system cannot otherwise handle such situations.)"
9560 msgstr "I<oldpath> または I<newpath> がディレクトリで、何らかのプロセスが使用中 (多分、カレントワーキングディレクトリか、ルートディレクトリか、 読み込みのためにオープンされているかでろう)  もしくは、システムが使用中 (例えばマウントポイントである)  であり、システムがこれをエラーであると判断したために rename が失敗した。 (このような場合に B<EBUSY> を返すことは規格では要求されていない点に注意すること。 このような場合に、rename をとにかく実行してみるのは何の問題もない。 ただし、そのような状況で、システムが他に返すエラーがない場合には B<EBUSY> を返すことが許されている。)"
9561
9562 #. type: Plain text
9563 #: build/C/man2/rename.2:255
9564 msgid "The new pathname contained a path prefix of the old, or, more generally, an attempt was made to make a directory a subdirectory of itself."
9565 msgstr "I<newpath> が I<oldpath> のパス部分を含んでいる。ディレクトリを自分自身のサブディレクトリに 変更しようとした場合がほとんどである。"
9566
9567 #. type: Plain text
9568 #: build/C/man2/rename.2:261
9569 msgid "I<newpath> is an existing directory, but I<oldpath> is not a directory."
9570 msgstr "I<newpath> は存在しているディレクトリであるが、 I<oldpath> はディレクトリでない。"
9571
9572 #. type: Plain text
9573 #: build/C/man2/rename.2:272
9574 msgid "I<oldpath> already has the maximum number of links to it, or it was a directory and the directory containing I<newpath> has the maximum number of links."
9575 msgstr "I<oldpath> は既に最大数までのリンクを持っているか、それがディレクトリで I<newpath> を含んでいるディレクトリが最大数までのリンクを持っている。"
9576
9577 #. type: Plain text
9578 #: build/C/man2/rename.2:288
9579 msgid "The link named by I<oldpath> does not exist; or, a directory component in I<newpath> does not exist; or, I<oldpath> or I<newpath> is an empty string."
9580 msgstr "I<oldpath> という名前のリンクが存在しない。 または、 I<newpath> というディレクトリが存在しない。 または、 I<oldpath> か I<newpath> が空の文字列である。"
9581
9582 #. type: Plain text
9583 #: build/C/man2/rename.2:305
9584 msgid "A component used as a directory in I<oldpath> or I<newpath> is not, in fact, a directory.  Or, I<oldpath> is a directory, and I<newpath> exists but is not a directory."
9585 msgstr "I<oldpath> か I<newpath> に含まれているディレクトリ部分が 実際にはディレクトリでない。 または I<oldpath> がディレクトリで、 I<newpath> が存在してディレクトリでない。"
9586
9587 #. type: TP
9588 #: build/C/man2/rename.2:305
9589 #, no-wrap
9590 msgid "B<ENOTEMPTY> or B<EEXIST>"
9591 msgstr "B<ENOTEMPTY  または  EEXIST>"
9592
9593 #. type: Plain text
9594 #: build/C/man2/rename.2:309
9595 msgid "I<newpath> is a nonempty directory, that is, contains entries other than \".\" and \"..\"."
9596 msgstr "I<newpath> が空でないディレクトリである。すなわち \".\" と \"..\" 以外を含んでいる。"
9597
9598 #. type: TP
9599 #: build/C/man2/rename.2:309 build/C/man2/unlink.2:224
9600 #, no-wrap
9601 msgid "B<EPERM> or B<EACCES>"
9602 msgstr "B<EPERM> または B<EACCES>"
9603
9604 #. type: Plain text
9605 #: build/C/man2/rename.2:333
9606 msgid "The directory containing I<oldpath> has the sticky bit (B<S_ISVTX>)  set and the process's effective user ID is neither the user ID of the file to be deleted nor that of the directory containing it, and the process is not privileged (Linux: does not have the B<CAP_FOWNER> capability); or I<newpath> is an existing file and the directory containing it has the sticky bit set and the process's effective user ID is neither the user ID of the file to be replaced nor that of the directory containing it, and the process is not privileged (Linux: does not have the B<CAP_FOWNER> capability); or the filesystem containing I<pathname> does not support renaming of the type requested."
9607 msgstr "I<oldpath> のあるディレクトリにスティッキービット (sticky bit)  (B<S_ISVTX>)  が設定されており、 プロセスの実効ユーザー ID が 削除しようとするファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。 または、 I<newpath> がすでに存在するファイルで、親ディレクトリにスティッキービットが設定されており、 プロセスの実効ユーザー ID が 置き換えようとするファイルのユーザー ID と そのファイルを含むディレクトリのユーザー ID のいずれとも一致せず、かつ プロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビリティがない)。 または I<oldpath> と I<newpath> が存在するファイルシステムが、要求された種類の名前の変更を サポートしていない。"
9608
9609 #. type: Plain text
9610 #: build/C/man2/rename.2:344
9611 msgid "I<oldpath> and I<newpath> are not on the same mounted filesystem.  (Linux permits a filesystem to be mounted at multiple points, but B<rename>()  does not work across different mount points, even if the same filesystem is mounted on both.)"
9612 msgstr "I<oldpath> と I<newpath> が同じマウントされたファイルシステムに存在しない。 (Linux は 1 つのファイルシステムを複数のマウント位置に マウントすることを許可している。 しかし B<rename>()  は、たとえ同じファイルシステムであっても、 別々のマウント位置を跨いでは動作しない。)"
9613
9614 #. type: Plain text
9615 #: build/C/man2/rename.2:349
9616 msgid "The following additional errors can occur for B<renameat>()  and B<renameat2>():"
9617 msgstr "B<renameat>() と B<renameat2>() では以下のエラーも発生する。"
9618
9619 #. type: Plain text
9620 #: build/C/man2/rename.2:368
9621 msgid "The following additional errors can occur for B<renameat2>():"
9622 msgstr "B<renameat2>() では以下のエラーも発生する。"
9623
9624 #. type: Plain text
9625 #: build/C/man2/rename.2:376
9626 msgid "I<flags> contains B<RENAME_NOREPLACE> and I<newpath> already exists."
9627 msgstr "I<flags> に B<RENAME_NOREPLACE> が指定されているが、 I<newpath> がすでに存在する。"
9628
9629 #. type: Plain text
9630 #: build/C/man2/rename.2:385
9631 msgid "An invalid flag was specified in I<flags>, or both B<RENAME_NOREPLACE> and B<RENAME_EXCHANGE> were specified."
9632 msgstr "I<flags> に無効なフラグが指定された。 B<RENAME_NOREPLACE> と B<RENAME_EXCHANGE> の両方が指定された。"
9633
9634 #. type: Plain text
9635 #: build/C/man2/rename.2:389
9636 msgid "The filesystem does not support one of the flags in I<flags>."
9637 msgstr "I<flags> にファイルシステムでサポートされていないフラグが指定された。"
9638
9639 #. type: Plain text
9640 #: build/C/man2/rename.2:397
9641 msgid "I<flags> contains B<RENAME_EXCHANGE> and I<newpath> does not exist."
9642 msgstr "I<flags> に B<RENAME_EXCHANGE> が指定されたが、 I<newpath> が存在しない。"
9643
9644 #. type: Plain text
9645 #: build/C/man2/rename.2:401
9646 msgid "B<renameat>()  was added to Linux in kernel 2.6.16; library support was added to glibc in version 2.4."
9647 msgstr "B<renameat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポートはバージョン 2.4 で glibc に追加された。"
9648
9649 #.  FIXME . glibc support is pending.
9650 #. type: Plain text
9651 #: build/C/man2/rename.2:405
9652 msgid "B<renameat2>()  was added to Linux in kernel 3.15."
9653 msgstr "B<renameat2>()  はカーネル 2.6.16 で Linux に追加された。"
9654
9655 #. type: Plain text
9656 #: build/C/man2/rename.2:408
9657 msgid "B<rename>(): 4.3BSD, C89, C99, POSIX.1-2001, POSIX.1-2008."
9658 msgstr "B<rename>(): 4.3BSD, C89, C99, POSIX.1-2001, POSIX.1-2008."
9659
9660 #. type: Plain text
9661 #: build/C/man2/rename.2:411
9662 msgid "B<renameat>(): POSIX.1-2008."
9663 msgstr "B<renameat>(): POSIX.1-2008."
9664
9665 #. type: Plain text
9666 #: build/C/man2/rename.2:414
9667 msgid "B<renameat2>()  is Linux-specific."
9668 msgstr "B<renameat2>()  は Linux 固有である。"
9669
9670 #. type: Plain text
9671 #: build/C/man2/rename.2:432
9672 msgid "On older kernels where B<renameat>()  is unavailable, the glibc wrapper function falls back to the use of B<rename>().  When I<oldpath> and I<newpath> are relative pathnames, glibc constructs pathnames based on the symbolic links in I</proc/self/fd> that correspond to the I<olddirfd> and I<newdirfd> arguments."
9673 msgstr "B<renameat>() が利用できない古いカーネルでは、 glibc ラッパー関数は B<rename>() を使用するモードにフォールバックする。 I<oldpath> と I<newpath> が相対パスの場合、 glibc は I<olddirfd> と I<newdirfd> 引き数に対応する I</proc/self/fd> のシンボリックリンクに基づいてそれぞれパス名を構成する。"
9674
9675 #. type: Plain text
9676 #: build/C/man2/rename.2:443
9677 msgid "On NFS filesystems, you can not assume that if the operation failed, the file was not renamed.  If the server does the rename operation and then crashes, the retransmitted RPC which will be processed when the server is up again causes a failure.  The application is expected to deal with this.  See B<link>(2)  for a similar problem."
9678 msgstr "NFS ファイルシステムでは、操作が失敗したからといって、 ファイルの名前が変更できなかったと決めてかかることはできない。 サーバが rename 操作を終えてからクラッシュした場合、 サーバが再び立ち上がったときに、 再送信された RPC が処理されるが、これは失敗となる。 アプリケーションはこの問題を正しく取り扱うことが期待されている。 同様の問題について B<link>(2)  にも書かれている。"
9679
9680 #. type: Plain text
9681 #: build/C/man2/rename.2:451
9682 msgid "B<mv>(1), B<chmod>(2), B<link>(2), B<symlink>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
9683 msgstr "B<mv>(1), B<chmod>(2), B<link>(2), B<symlink>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
9684
9685 #. type: TH
9686 #: build/C/man2/rmdir.2:30
9687 #, no-wrap
9688 msgid "RMDIR"
9689 msgstr "RMDIR"
9690
9691 #. type: TH
9692 #: build/C/man2/rmdir.2:30
9693 #, no-wrap
9694 msgid "2008-05-08"
9695 msgstr "2008-05-08"
9696
9697 #. type: Plain text
9698 #: build/C/man2/rmdir.2:33
9699 msgid "rmdir - delete a directory"
9700 msgstr "rmdir - ディレクトリを削除する"
9701
9702 #. type: Plain text
9703 #: build/C/man2/rmdir.2:37
9704 msgid "B<int rmdir(const char *>I<pathname>B<);>"
9705 msgstr "B<int rmdir(const char *>I<pathname>B<);>"
9706
9707 #. type: Plain text
9708 #: build/C/man2/rmdir.2:40
9709 msgid "B<rmdir>()  deletes a directory, which must be empty."
9710 msgstr "B<rmdir>()  はディレクトリを削除する。削除するディレクトリは空でなければならない。"
9711
9712 #. type: Plain text
9713 #: build/C/man2/rmdir.2:55
9714 msgid "Write access to the directory containing I<pathname> was not allowed, or one of the directories in the path prefix of I<pathname> did not allow search permission.  (See also B<path_resolution>(7)."
9715 msgstr "I<pathname> を含んでいるディレクトリへの書き込みアクセスが プロセスの実効 (effective) UID に対して許可されていないか、 I<pathname> に含まれているディレクトリのどれかに検索 (実行) 許可がないか、 I<pathname> に至るまでのディレクトリのいずれかに対する検索許可がなかった。 (B<path_resolution>(7)  も参照のこと)"
9716
9717 #. type: Plain text
9718 #: build/C/man2/rmdir.2:64
9719 msgid "I<pathname> is currently in use by the system or some process that prevents its removal.  On Linux this means I<pathname> is currently used as a mount point or is the root directory of the calling process."
9720 msgstr "I<pathname> がシステムや別のプロセスにより使用中で削除することができない。 Linux では、 I<pathname> がマウントポイントとして使用されているか、 呼び出したプロセスのルートディレクトリであることを意味する。"
9721
9722 #. type: Plain text
9723 #: build/C/man2/rmdir.2:73
9724 msgid "I<pathname> has I<.> as last component."
9725 msgstr "I<pathname> の最後のディレクトリ部分が I<.> である。"
9726
9727 #. type: Plain text
9728 #: build/C/man2/rmdir.2:85
9729 msgid "A directory component in I<pathname> does not exist or is a dangling symbolic link."
9730 msgstr "I<pathname> の中のディレクトリ部分が存在しないか、壊れた (dangling)  シンボリックリンク (symbolic link) である。"
9731
9732 #. type: Plain text
9733 #: build/C/man2/rmdir.2:94
9734 msgid "I<pathname>, or a component used as a directory in I<pathname>, is not, in fact, a directory."
9735 msgstr "I<pathname> か I<pathname> に含まれているディレクトリ部分が、実際には、ディレクトリでない。"
9736
9737 #. type: TP
9738 #: build/C/man2/rmdir.2:94
9739 #, no-wrap
9740 msgid "B<ENOTEMPTY>"
9741 msgstr "B<ENOTEMPTY>"
9742
9743 #. type: Plain text
9744 #: build/C/man2/rmdir.2:107
9745 msgid "I<pathname> contains entries other than I<.> and I<..> ; or, I<pathname> has I<..> as its final component.  POSIX.1-2001 also allows B<EEXIST> for this condition."
9746 msgstr "ディレクトリ I<pathname> に I<.> と I<..> 以外のエントリがある。または、 I<pathname> を構成する最後の要素が I<..> である。 POSIX.1-2001 は、この状況で B<EEXIST> を返すことを認めている。"
9747
9748 #. type: Plain text
9749 #: build/C/man2/rmdir.2:118
9750 msgid "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set and the process's effective user ID is neither the user ID of the file to be deleted nor that of the directory containing it, and the process is not privileged (Linux: does not have the B<CAP_FOWNER> capability)."
9751 msgstr "I<pathname> を含んでいるディレクトリにスティッキービット(sticky-bit)  (B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザーID が削除しようとするファイルの ユーザID とそのファイルを含むディレクトリのユーザーID のどちらとも異なり、 プロセスも権限 (Linux では B<CAP_FOWNER> ケーパビリティ) がない。"
9752
9753 #. type: Plain text
9754 #: build/C/man2/rmdir.2:123
9755 msgid "The filesystem containing I<pathname> does not support the removal of directories."
9756 msgstr "I<pathname> を含んでいるファイルシステムがディレクトリの 削除をサポートしていない。"
9757
9758 #. type: Plain text
9759 #: build/C/man2/rmdir.2:127
9760 msgid "I<pathname> refers to a directory on a read-only filesystem."
9761 msgstr "I<pathname> が読み込み専用のファイルシステム上のディレクトリを参照している。"
9762
9763 #. type: Plain text
9764 #: build/C/man2/rmdir.2:132
9765 msgid "Infelicities in the protocol underlying NFS can cause the unexpected disappearance of directories which are still being used."
9766 msgstr "NFS プロトコルに潜在している欠陥によって、まだ使用中のディレクトリが 突然消滅する現象が引き起こされることがある。"
9767
9768 #. type: Plain text
9769 #: build/C/man2/rmdir.2:141
9770 msgid "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), B<unlink>(2), B<unlinkat>(2)"
9771 msgstr "B<rm>(1), B<rmdir>(1), B<chdir>(2), B<chmod>(2), B<mkdir>(2), B<rename>(2), B<unlink>(2), B<unlinkat>(2)"
9772
9773 #. type: TH
9774 #: build/C/man3/scanf.3:52
9775 #, no-wrap
9776 msgid "SCANF"
9777 msgstr "SCANF"
9778
9779 #. type: Plain text
9780 #: build/C/man3/scanf.3:55
9781 msgid "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - input format conversion"
9782 msgstr "scanf, fscanf, sscanf, vscanf, vsscanf, vfscanf - 書式付き入力変換"
9783
9784 #. type: Plain text
9785 #: build/C/man3/scanf.3:62
9786 #, no-wrap
9787 msgid ""
9788 "B<int scanf(const char *>I<format>B<, ...);>\n"
9789 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
9790 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
9791 msgstr ""
9792 "B<int scanf(const char *>I<format>B<, ...);>\n"
9793 "B<int fscanf(FILE *>I<stream>B<, const char *>I<format>B<, ...);>\n"
9794 "B<int sscanf(const char *>I<str>B<, const char *>I<format>B<, ...);>\n"
9795
9796 #. type: Plain text
9797 #: build/C/man3/scanf.3:64
9798 #, no-wrap
9799 msgid "B<#include E<lt>stdarg.hE<gt>>\n"
9800 msgstr "B<#include E<lt>stdarg.hE<gt>>\n"
9801
9802 #. type: Plain text
9803 #: build/C/man3/scanf.3:68
9804 #, no-wrap
9805 msgid ""
9806 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
9807 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
9808 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
9809 msgstr ""
9810 "B<int vscanf(const char *>I<format>B<, va_list >I<ap>B<);>\n"
9811 "B<int vsscanf(const char *>I<str>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
9812 "B<int vfscanf(FILE *>I<stream>B<, const char *>I<format>B<, va_list >I<ap>B<);>\n"
9813
9814 #. type: Plain text
9815 #: build/C/man3/scanf.3:79
9816 msgid "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
9817 msgstr "B<vscanf>(), B<vsscanf>(), B<vfscanf>():"
9818
9819 #. type: Plain text
9820 #: build/C/man3/scanf.3:82
9821 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
9822 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
9823
9824 #. type: Plain text
9825 #: build/C/man3/scanf.3:104
9826 msgid "The B<scanf>()  family of functions scans input according to I<format> as described below.  This format may contain I<conversion specifications>; the results from such conversions, if any, are stored in the locations pointed to by the I<pointer> arguments that follow I<format>.  Each I<pointer> argument must be of a type that is appropriate for the value returned by the corresponding conversion specification."
9827 msgstr "B<scanf>()  関数グループは、以下に述べるように、 I<format> に従って入力を読み込むものである。 この書式には I<「変換指定」 (conversion specifications)> を含めることができ、変換指定があれば、その変換の結果は I<format> に続く I<pointer> 引き数が指す場所に格納される。 それぞれの I<pointer> 引き数の型は、対応する変換指定が返す値に 適合していなければならない。"
9828
9829 #. type: Plain text
9830 #: build/C/man3/scanf.3:115
9831 msgid "If the number of conversion specifications in I<format> exceeds the number of I<pointer> arguments, the results are undefined.  If the number of I<pointer> arguments exceeds the number of conversion specifications, then the excess I<pointer> arguments are evaluated, but are otherwise ignored."
9832 msgstr "I<format> 中の変換指定の個数が I<pointer> 引き数の数より多かった場合の結果は未定義である。 I<pointer> 引き数の数が変換指定の個数よりも多かった場合、 余分な I<pointer> 引き数の評価は行われるが、それ以外は行われず無視される。"
9833
9834 #. type: Plain text
9835 #: build/C/man3/scanf.3:127
9836 msgid "The B<scanf>()  function reads input from the standard input stream I<stdin>, B<fscanf>()  reads input from the stream pointer I<stream>, and B<sscanf>()  reads its input from the character string pointed to by I<str>."
9837 msgstr "B<scanf>()  関数は標準入力ストリーム I<stdin> からの入力を読み込む。 B<fscanf>()  はストリームポインタ I<stream> からの入力を読み込む。 B<sscanf>()  は文字列ポインタ I<str> で示された文字列からの入力を読み込む。"
9838
9839 #. type: Plain text
9840 #: build/C/man3/scanf.3:145
9841 msgid "The B<vfscanf>()  function is analogous to B<vfprintf>(3)  and reads input from the stream pointer I<stream> using a variable argument list of pointers (see B<stdarg>(3).  The B<vscanf>()  function scans a variable argument list from the standard input and the B<vsscanf>()  function scans it from a string; these are analogous to the B<vprintf>(3)  and B<vsprintf>(3)  functions respectively."
9842 msgstr "B<vfscanf>()  関数は B<vfprintf>(3)  と同様に、ストリームポインタ I<stream> からの入力をポインタの可変長引き数リストを用いて読み込む (B<stdarg>(3)  を参照)。 B<vscanf>()  関数は、可変長引き数のリストに基づき標準入力からの読み取りを行う。 B<vsscanf>()  関数はそのリストに基づき文字列から読み取る。 これらの関係は B<vprintf>(3)  と B<vsprintf>(3)  関数の関係と同様である。"
9843
9844 #. type: Plain text
9845 #: build/C/man3/scanf.3:159
9846 msgid "The I<format> string consists of a sequence of I<directives> which describe how to process the sequence of input characters.  If processing of a directive fails, no further input is read, and B<scanf>()  returns.  A \"failure\" can be either of the following: I<input failure>, meaning that input characters were unavailable, or I<matching failure>, meaning that the input was inappropriate (see below)."
9847 msgstr "I<format> 文字列は I<「命令」 (directive)> の列で構成される。命令は入力文字の系列をどのように処理するかを指示する ものである。ある命令の処理が失敗すると、入力はそれ以上読み込まれず、 B<scanf>()  は返る。「失敗」は I<「入力の失敗」 (input failure)> と I<「一致の失敗」 (matching failure)> のいずれかである。 入力の失敗は入力文字が使用できなかったことを意味し、 一致の失敗は入力が不適切であったこと (下記参照) を意味する。"
9848
9849 #. type: Plain text
9850 #: build/C/man3/scanf.3:161
9851 msgid "A directive is one of the following:"
9852 msgstr "命令は以下のいずれかである:"
9853
9854 #. type: TP
9855 #: build/C/man3/scanf.3:161 build/C/man3/scanf.3:167 build/C/man3/scanf.3:171
9856 #: build/C/man3/scanf.3:190 build/C/man3/scanf.3:201 build/C/man3/scanf.3:220
9857 #: build/C/man3/scanf.3:232 build/C/man3/scanf.3:246
9858 #, no-wrap
9859 msgid "\\(bu"
9860 msgstr "\\(bu"
9861
9862 #. type: Plain text
9863 #: build/C/man3/scanf.3:167
9864 msgid "A sequence of white-space characters (space, tab, newline, etc.; see B<isspace>(3)).  This directive matches any amount of white space, including none, in the input."
9865 msgstr "ホワイトスペース (スペース、タブ、改行など; B<isspace>(3)  参照) の列。 この命令は、入力中の任意の個数のホワイトスペースに一致する。 (「何もなし」にも一致する)。"
9866
9867 #. type: Plain text
9868 #: build/C/man3/scanf.3:171
9869 msgid "An ordinary character (i.e., one other than white space or \\(aq%\\(aq).  This character must exactly match the next character of input."
9870 msgstr "通常文字 (つまり、ホワイトスペースと \\(aq%\\(aq 以外の文字)。 この文字は入力の次の文字に正確に一致しなければならない。"
9871
9872 #. type: Plain text
9873 #: build/C/man3/scanf.3:182
9874 msgid "A conversion specification, which commences with a \\(aq%\\(aq (percent) character.  A sequence of characters from the input is converted according to this specification, and the result is placed in the corresponding I<pointer> argument.  If the next item of input does not match the conversion specification, the conversion fails\\(emthis is a I<matching failure>."
9875 msgstr "変換指定。変換指定は \\(aq%\\(aq (パーセント) 文字で始まる。 入力された文字の系列はこの指定にもとづいて変換され、 変換結果は対応する I<pointer> 引き数が指す場所に格納される。 入力の次の文字が変換指定と一致しない場合は、変換は失敗する \\(emこれが I<「一致の失敗」 (matching failure)> である。"
9876
9877 #. type: Plain text
9878 #: build/C/man3/scanf.3:190
9879 msgid "Each I<conversion specification> in I<format> begins with either the character \\(aq%\\(aq or the character sequence \"B<%>I<n>B<$>\" (see below for the distinction) followed by:"
9880 msgstr "I<format> 中の各々の I<「変換指定」> は文字 \\(aq%\\(aq か文字系列 \"B<%>I<n>B<$>\" (違いについては後述) で始まり、以下の要素が続く。"
9881
9882 #. type: Plain text
9883 #: build/C/man3/scanf.3:201
9884 msgid "An optional \\(aq*\\(aq assignment-suppression character: B<scanf>()  reads input as directed by the conversion specification, but discards the input.  No corresponding I<pointer> argument is required, and this specification is not included in the count of successful assignments returned by B<scanf>()."
9885 msgstr "代入抑制文字 \\(aq*\\(aq (省略可能)。 B<scanf>()  は変換指定に指示された通り入力を読み込むが、その入力は捨てられる。 対応する I<pointer> 引き数は必要なく、 B<scanf>()  が返す代入が成功した数にこの指定は含まれない。"
9886
9887 #. type: Plain text
9888 #: build/C/man3/scanf.3:220
9889 msgid "An optional \\(aqm\\(aq character.  This is used with string conversions (I<%s>, I<%c>, I<%[>), and relieves the caller of the need to allocate a corresponding buffer to hold the input: instead, B<scanf>()  allocates a buffer of sufficient size, and assigns the address of this buffer to the corresponding I<pointer> argument, which should be a pointer to a I<char\\ *> variable (this variable does not need to be initialized before the call).  The caller should subsequently B<free>(3)  this buffer when it is no longer required."
9890 msgstr "文字 \\(aqm\\(aq (省略可能)。これは文字列変換 (I<%s>, I<%c>, I<%[>) とともに使用され、これを使うと 呼び出し元が入力を保持する対応するバッファを確保する必要がなくなる。 代わりに B<scanf>()  が必要な大きさのバッファを確保し、このバッファのアドレスを 対応する I<pointer> 引き数に代入する。 I<pointer> 引き数は I<char\\ *> 型の変数へのポインタでなければならない (変数自体は呼び出し前に初期化されている必要はない)。 呼び出し元は、不要になった時点で、このバッファを B<free>(3) すべきである。"
9891
9892 #. type: Plain text
9893 #: build/C/man3/scanf.3:232
9894 msgid "An optional decimal integer which specifies the I<maximum field width>.  Reading of characters stops either when this maximum is reached or when a nonmatching character is found, whichever happens first.  Most conversions discard initial white space characters (the exceptions are noted below), and these discarded characters don't count toward the maximum field width.  String input conversions store a terminating null byte (\\(aq\\e0\\(aq)  to mark the end of the input; the maximum field width does not include this terminator."
9895 msgstr "I<「最大フィールド幅」> を指定する 10進数 (省略可能)。 この最大値に達するか、一致しない文字が見つかるか、のどちらかに なると、文字の読み込みを停止する。 ほとんどの変換では、先頭のホワイトスペース文字は捨てられ (例外については後述する)、 捨てられたこれらの文字は最大フィールド幅の計算には含まれない。 文字列の入力変換では、入力の末尾を示す終端のヌルバイト (\\(aq\\e0\\(aq)  も格納されるが、最大フィールド幅にはこの終端バイトは含まれない。"
9896
9897 #. type: Plain text
9898 #: build/C/man3/scanf.3:246
9899 msgid "An optional I<type modifier character>.  For example, the B<l> type modifier is used with integer conversions such as B<%d> to specify that the corresponding I<pointer> argument refers to a I<long int> rather than a pointer to an I<int>."
9900 msgstr "I<「型修飾子」 (type modifier characters)> (省略可能)。 例えば、型修飾子 B<l> を B<%d> などの整数変換と一緒に使うと、対応する I<pointer> 引き数が I<int> ではなく I<long int> を参照していることを指定できる。"
9901
9902 #. type: Plain text
9903 #: build/C/man3/scanf.3:251
9904 msgid "A I<conversion specifier> that specifies the type of input conversion to be performed."
9905 msgstr "I<「変換指定」> : 実行すべき入力変換の種類を指定する。"
9906
9907 #. type: Plain text
9908 #: build/C/man3/scanf.3:280
9909 msgid "The conversion specifications in I<format> are of two forms, either beginning with \\(aq%\\(aq or beginning with \"B<%>I<n>B<$>\".  The two forms should not be mixed in the same I<format> string, except that a string containing \"B<%>I<n>B<$>\" specifications can include B<%%> and B<%*>.  If I<format> contains \\(aq%\\(aq specifications, then these correspond in order with successive I<pointer> arguments.  In the \"B<%>I<n>B<$>\" form (which is specified in POSIX.1-2001, but not C99), I<n> is a decimal integer that specifies that the converted input should be placed in the location referred to by the I<n>-th I<pointer> argument following I<format>."
9910 msgstr "I<format> 中の変換指定は、\\(aq%\\(aq で始まるか、 \"B<%>I<n>B<$>\" で始まるかの、いずれかの形式である。 これら 2つの形式を同じ I<format> 文字列に混ぜることはできない。但し、\"B<%>I<n>B<$>\" を 含む文字列に B<%%> と B<%*> を含めることはできる。 I<format> に \\(aq%\\(aq 指定が含まれている場合、各々の \\(aq%\\(aq 指定と 後続の I<pointer> 引き数はその順番通りに対応する。 \"B<%>I<n>B<$>\" 形式 (POSIX.1-2001 では規定されているが、C99 にはない)  では、 I<n> は 10進数であり、変換後の入力を I<format> の後ろの I<n> 番目の I<pointer> 引き数が参照する場所に格納することを指定する。"
9911
9912 #. type: SS
9913 #: build/C/man3/scanf.3:280
9914 #, no-wrap
9915 msgid "Conversions"
9916 msgstr "変換"
9917
9918 #. type: Plain text
9919 #: build/C/man3/scanf.3:284
9920 msgid "The following I<type modifier characters> can appear in a conversion specification:"
9921 msgstr "変換指定には、以下の I<「型修飾子」> を入れることができる。"
9922
9923 #. type: Plain text
9924 #: build/C/man3/scanf.3:294
9925 msgid "Indicates that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<short int> or I<unsigned short int> (rather than I<int>)."
9926 msgstr "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> のいずれかであり、次のポインタが (I<int> ではなく)  I<short int> か I<unsigned short int> へのポインタであることを示す。"
9927
9928 #. type: Plain text
9929 #: build/C/man3/scanf.3:302
9930 msgid "As for B<h>, but the next pointer is a pointer to a I<signed char> or I<unsigned char>."
9931 msgstr "B<h> と同じだが、次のポインタが I<signed char> か I<unsigned char> へのポインタであることを示す。"
9932
9933 #. type: Plain text
9934 #: build/C/man3/scanf.3:311
9935 msgid "As for B<h>, but the next pointer is a pointer to an I<intmax_t> or a I<uintmax_t>.  This modifier was introduced in C99."
9936 msgstr "B<h> と同じだが、次のポインタが I<intmax_t> か I<uintmax_t> へのポインタであることを示す。 この修飾子は C99 で導入された。"
9937
9938 #.  This use of l was introduced in Amendment 1 to ISO C90.
9939 #. type: Plain text
9940 #: build/C/man3/scanf.3:338
9941 msgid "Indicates either that the conversion will be one of B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, or B<n> and the next pointer is a pointer to a I<long int> or I<unsigned long int> (rather than I<int>), or that the conversion will be one of B<e>, B<f>, or B<g> and the next pointer is a pointer to I<double> (rather than I<float>).  Specifying two B<l> characters is equivalent to B<L>.  If used with B<%c> or B<%s>, the corresponding parameter is considered as a pointer to a wide character or wide-character string respectively."
9942 msgstr "変換が B<d>, B<i>, B<o>, B<u>, B<x>, B<X>, B<n> か B<n> のいずれかであり次のポインタが (I<int> ではなく)  I<long int> か I<unsigned long int> へのポインタであること、または、変換が B<e>, B<f>, B<g> のうちのひとつであり次のポインタが (I<float> ではなく)  I<double> へのポインタであることのいずれかであることを示す。 B<l> 文字を二つ指定すると、 B<L> と同じ意味となる。 B<%c> や B<%s> とともに使用すると、 パラメータはそれぞれワイド文字やワイド文字列へのポインタであると みなされる。"
9943
9944 #.  MTK, Jul 05: The following is no longer true for modern
9945 #.  ANSI C (i.e., C99):
9946 #.  (Note that long long is not an
9947 #.  ANSI C
9948 #.  type. Any program using this will not be portable to all
9949 #.  architectures).
9950 #. type: Plain text
9951 #: build/C/man3/scanf.3:354
9952 msgid "Indicates that the conversion will be either B<e>, B<f>, or B<g> and the next pointer is a pointer to I<long double> or the conversion will be B<d>, B<i>, B<o>, B<u>, or B<x> and the next pointer is a pointer to I<long long>."
9953 msgstr "B<e>, B<f>, B<g> 変換で、次のポインタが I<long double> へのポインタであることを示す。もしくは、 B<d>, B<i>, B<o>, B<u>, B<x> 変換で、次のポインタが I<long long> へのポインタであることのいずれかであることを示す。"
9954
9955 #. type: TP
9956 #: build/C/man3/scanf.3:354
9957 #, no-wrap
9958 msgid "B<q>"
9959 msgstr "B<q>"
9960
9961 #. type: Plain text
9962 #: build/C/man3/scanf.3:359
9963 msgid "equivalent to B<L>.  This specifier does not exist in ANSI C."
9964 msgstr "B<L> と同一である。 この修飾子は ANSI C には存在しない。"
9965
9966 #. type: Plain text
9967 #: build/C/man3/scanf.3:366
9968 msgid "As for B<h>, but the next pointer is a pointer to a I<ptrdiff_t>.  This modifier was introduced in C99."
9969 msgstr "B<h> と同様だが、次のポインタが I<ptrdiff_t> へのポインタであることを示す。 この修飾子は C99 で導入された。"
9970
9971 #. type: Plain text
9972 #: build/C/man3/scanf.3:373
9973 msgid "As for B<h>, but the next pointer is a pointer to a I<size_t>.  This modifier was introduced in C99."
9974 msgstr "B<h> と同様だが、次のポインタが I<size_t> へのポインタであることを示す。 この修飾子は C99 で導入された。"
9975
9976 #. type: Plain text
9977 #: build/C/man3/scanf.3:377
9978 msgid "The following I<conversion specifiers> are available:"
9979 msgstr "以下の I<「変換指定子」> が利用可能である。"
9980
9981 #. type: Plain text
9982 #: build/C/man3/scanf.3:386
9983 msgid "Matches a literal \\(aq%\\(aq.  That is, B<%\\&%> in the format string matches a single input \\(aq%\\(aq character.  No conversion is done (but initial white space characters are discarded), and assignment does not occur."
9984 msgstr "文字 \\(aq%\\(aq に対応する。 書式文字列の中の B<%\\&%> は単一の文字 \\(aq%\\(aq に対応する。 変換は行われず (但し、先頭のホワイトスペース文字は捨てられる)、 変数への代入は生じない。"
9985
9986 #. type: TP
9987 #: build/C/man3/scanf.3:386
9988 #, no-wrap
9989 msgid "B<d>"
9990 msgstr "B<d>"
9991
9992 #. type: Plain text
9993 #: build/C/man3/scanf.3:391
9994 msgid "Matches an optionally signed decimal integer; the next pointer must be a pointer to I<int>."
9995 msgstr "符号つきの 10進の整数に対応する。 次のポインタは I<int> へのポインタでなければならない。"
9996
9997 #. type: TP
9998 #: build/C/man3/scanf.3:391
9999 #, no-wrap
10000 msgid "B<D>"
10001 msgstr "B<D>"
10002
10003 #. type: Plain text
10004 #: build/C/man3/scanf.3:400
10005 msgid "Equivalent to I<ld>; this exists only for backward compatibility.  (Note: thus only in libc4.  In libc5 and glibc the B<%D> is silently ignored, causing old programs to fail mysteriously.)"
10006 msgstr "I<ld> と同一である。これは以前の仕様との互換性だけのためにある。 (注意: これは libc4 の場合だけである。 libc5 や glibc では B<%D> は暗黙のうちに無視され、古いプログラムにおいて謎に満ちた失敗の原因となる。)"
10007
10008 #. type: TP
10009 #: build/C/man3/scanf.3:400
10010 #, no-wrap
10011 msgid "B<i>"
10012 msgstr "B<i>"
10013
10014 #. type: Plain text
10015 #: build/C/man3/scanf.3:412
10016 msgid "Matches an optionally signed integer; the next pointer must be a pointer to I<int>.  The integer is read in base 16 if it begins with I<0x> or I<0X>, in base 8 if it begins with I<0>, and in base 10 otherwise.  Only characters that correspond to the base are used."
10017 msgstr "符号つき整数に対応する。 次のポインタは I<int> へのポインタでなければならない。 この整数は I<0x> または I<0X> で開始する場合には 16 進数、 I<0> で開始する場合には 8 進数、その他の場合には 10進数として読み込まれる。 この変換で使用される文字は、これらの基数に対応しているものだけである。"
10018
10019 #. type: TP
10020 #: build/C/man3/scanf.3:412
10021 #, no-wrap
10022 msgid "B<o>"
10023 msgstr "B<o>"
10024
10025 #. type: Plain text
10026 #: build/C/man3/scanf.3:416
10027 msgid "Matches an unsigned octal integer; the next pointer must be a pointer to I<unsigned int>."
10028 msgstr "符号なしの 8 進の整数に対応する。 次のポインタは I<unsigned int> でなければならない。"
10029
10030 #. type: TP
10031 #: build/C/man3/scanf.3:416
10032 #, no-wrap
10033 msgid "B<u>"
10034 msgstr "B<u>"
10035
10036 #. type: Plain text
10037 #: build/C/man3/scanf.3:421
10038 msgid "Matches an unsigned decimal integer; the next pointer must be a pointer to I<unsigned int>."
10039 msgstr "符号なしの 10進の整数に対応する。 次のポインタは I<unsigned int> へのポインタでなければならない。"
10040
10041 #. type: Plain text
10042 #: build/C/man3/scanf.3:426
10043 msgid "Matches an unsigned hexadecimal integer; the next pointer must be a pointer to I<unsigned int>."
10044 msgstr "符号なしの 16 進の整数に対応する。 次のポインタは I<unsigned int> へのポインタでなければならない。"
10045
10046 #. type: TP
10047 #: build/C/man3/scanf.3:426
10048 #, no-wrap
10049 msgid "B<X>"
10050 msgstr "B<X>"
10051
10052 #. type: Plain text
10053 #: build/C/man3/scanf.3:430
10054 msgid "Equivalent to B<x>."
10055 msgstr "B<x> と同一である。"
10056
10057 #. type: TP
10058 #: build/C/man3/scanf.3:430
10059 #, no-wrap
10060 msgid "B<f>"
10061 msgstr "B<f>"
10062
10063 #. type: Plain text
10064 #: build/C/man3/scanf.3:435
10065 msgid "Matches an optionally signed floating-point number; the next pointer must be a pointer to I<float>."
10066 msgstr "符号つき浮動小数点実数に対応する。 次のポインタは I<float> へのポインタでなければならない。"
10067
10068 #. type: TP
10069 #: build/C/man3/scanf.3:435
10070 #, no-wrap
10071 msgid "B<e>"
10072 msgstr "B<e>"
10073
10074 #. type: Plain text
10075 #: build/C/man3/scanf.3:439 build/C/man3/scanf.3:443 build/C/man3/scanf.3:447
10076 msgid "Equivalent to B<f>."
10077 msgstr "B<f> と同一である。"
10078
10079 #. type: TP
10080 #: build/C/man3/scanf.3:439
10081 #, no-wrap
10082 msgid "B<g>"
10083 msgstr "B<g>"
10084
10085 #. type: TP
10086 #: build/C/man3/scanf.3:443
10087 #, no-wrap
10088 msgid "B<E>"
10089 msgstr "B<E>"
10090
10091 #. type: Plain text
10092 #: build/C/man3/scanf.3:451
10093 msgid "(C99) Equivalent to B<f>."
10094 msgstr "(C99)  B<f> と同一である。"
10095
10096 #. type: Plain text
10097 #: build/C/man3/scanf.3:459
10098 msgid "Matches a sequence of non-white-space characters; the next pointer must be a pointer to character array that is long enough to hold the input sequence and the terminating null byte (\\(aq\\e0\\(aq), which is added automatically.  The input string stops at white space or at the maximum field width, whichever occurs first."
10099 msgstr "ホワイトスペースではない文字で構成された文字列に対応する。 次のポインタは文字の配列へのポインタでなければならず、 その文字配列は、入力された文字列と (自動的に追加される) 終端のヌルバイト (\\(aq\\e0\\(aq) を格納するのに十分な大きさでなければならない。 文字列の入力は、ホワイトスペースが入力されるか、最大フィールド幅に 達するか、のどちらかが起こると停止される。"
10100
10101 #. type: Plain text
10102 #: build/C/man3/scanf.3:469
10103 msgid "Matches a sequence of characters whose length is specified by the I<maximum field width> (default 1); the next pointer must be a pointer to I<char>, and there must be enough room for all the characters (no terminating null byte is added).  The usual skip of leading white space is suppressed.  To skip white space first, use an explicit space in the format."
10104 msgstr "I<「最大フィールド幅」> (デフォルトは 1) で指定された幅の文字の列に対応する。 次のポインタは I<char> へのポインタで、すべての文字を格納するのに十分な領域が なければならない (終端のヌルバイトは追加されない)。 通常行われる先頭のホワイトスペースの読み飛ばしは行われない。 先頭のホワイトスペースを読み飛ばすためには、 フォーマット文の中で明示的にスペースを使用すれば良い。"
10105
10106 #. type: TP
10107 #: build/C/man3/scanf.3:469
10108 #, no-wrap
10109 msgid "B<\\&[>"
10110 msgstr "B<\\&[>"
10111
10112 #. type: Plain text
10113 #: build/C/man3/scanf.3:502
10114 msgid "Matches a nonempty sequence of characters from the specified set of accepted characters; the next pointer must be a pointer to I<char>, and there must be enough room for all the characters in the string, plus a terminating null byte.  The usual skip of leading white space is suppressed.  The string is to be made up of characters in (or not in) a particular set; the set is defined by the characters between the open bracket B<[> character and a close bracket B<]> character.  The set I<excludes> those characters if the first character after the open bracket is a circumflex (B<^>).  To include a close bracket in the set, make it the first character after the open bracket or the circumflex; any other position will end the set.  The hyphen character B<-> is also special; when placed between two other characters, it adds all intervening characters to the set.  To include a hyphen, make it the last character before the final close bracket.  For instance, B<[^]0-9-]> means the set \"everything except close bracket, zero through nine, and hyphen\".  The string ends with the appearance of a character not in the (or, with a circumflex, in) set or when the field width runs out."
10115 msgstr "格納された文字列のうちから取り出された、 指定された文字の集合で構成される空ではない文字の列に対応する。 次のポインタは I<char> へのポインタでなければならず、 そこには文字列中のすべての文字と終端のヌルバイト を格納するための十分な領域がなければならない。 通常行われる先頭のホワイトスペースの読み飛ばしは行われない。 この文字列は特別な集合の中の文字で構成されている。 この集合は 開き括弧 B<[> と閉じ括弧 B<]> の間の文字で定義される。 開き括弧のあとの最初の文字が曲アクセント記号 (B<^>)  の場合、集合はこれらの文字を含まないものとなる。 閉じ括弧を集合に含ませるためには、この文字を開き括弧または 曲アクセント記号のあとの最初の文字にすればよい。 つまり、他の位置に閉じ括弧を置くと文字の集合が終る。 ハイフン B<-> もまた特殊文字である。 二つの異なる文字の間に置かれた時、この文字は、 その間にある全ての文字を集合に加える。 ハイフン自体を含ませるためには、 括弧が閉じる前の最後の一文字をハイフンにすればよい。 例えば、 B<[^]0-9-]> は「閉じ括弧、0 〜 9、ハイフンの 3 種類を除く全ての文字」の集合を意味する。 この文字列は 集合に含まれていない (曲アクセントの場合には含まれる) 文字の 出現または確保された領域が使い切られた時に終了する。"
10116
10117 #. type: Plain text
10118 #: build/C/man3/scanf.3:510
10119 msgid "Matches a pointer value (as printed by B<%p> in B<printf>(3); the next pointer must be a pointer to a pointer to I<void>."
10120 msgstr "(B<printf>(3)  の B<%p> で印字されるような) ポインタ値に対応する。 次のポインタは I<void> へのポインタへのポインタでなければならない。"
10121
10122 #. type: Plain text
10123 #: build/C/man3/scanf.3:530
10124 msgid "Nothing is expected; instead, the number of characters consumed thus far from the input is stored through the next pointer, which must be a pointer to I<int>.  This is I<not> a conversion, although it can be suppressed with the B<*> assignment-suppression character.  The C standard says: \"Execution of a B<%n> directive does not increment the assignment count returned at the completion of execution\" but the Corrigendum seems to contradict this.  Probably it is wise not to make any assumptions on the effect of B<%n> conversions on the return value."
10125 msgstr "どんな入力も必要としない。 そのかわりに、 入力からここまで消費された文字数が次のポインタで指定された場所に 格納される。 このポインタは I<int> へのポインタでなければならない。 変換を抑制するのであれば B<*> 代入抑制文字を使って抑制することができるのだが、 この変換指定子は変換では「ない」。 C 言語の標準規格では「実行の完了時に返される代入の回数は B<%n> 命令の実行では増加しない」となっているが、 正誤表の内容はこれと矛盾するようである。おそらく、 B<%n> 変換が返り値に与える影響についてはどのような仮定もしないのが 賢明であろう。"
10126
10127 #. type: Plain text
10128 #: build/C/man3/scanf.3:535
10129 msgid "These functions return the number of input items successfully matched and assigned, which can be fewer than provided for, or even zero in the event of an early matching failure."
10130 msgstr "これらの関数は、一致と代入が成功した入力要素の個数を返す。 返される値は渡された変換の個数よりも少ないこともあり、 最初に一致の失敗があった場合には 0 になることもある。"
10131
10132 #. type: Plain text
10133 #: build/C/man3/scanf.3:547
10134 msgid "The value B<EOF> is returned if the end of input is reached before either the first successful conversion or a matching failure occurs.  B<EOF> is also returned if a read error occurs, in which case the error indicator for the stream (see B<ferror>(3))  is set, and I<errno> is set indicate the error."
10135 msgstr "最初の変換が成功する前に入力の最後に達して、一致の失敗が起こった場合には、 B<EOF> が返される。また、 読み込みエラーが発生した場合にも B<EOF> が返される。読み込みエラーの場合には、そのストリームの エラー指示子がセットされ (B<ferror>(3)  参照)、 I<errno> にエラーを示す値がセットされる。"
10136
10137 #. type: Plain text
10138 #: build/C/man3/scanf.3:553
10139 msgid "The file descriptor underlying I<stream> is marked nonblocking, and the read operation would block."
10140 msgstr "I<stream> に対応するファイルディスクリプタが nonblocking となっており、 読み込み操作は停止 (block) することになる。"
10141
10142 #. type: Plain text
10143 #: build/C/man3/scanf.3:558
10144 msgid "The file descriptor underlying I<stream> is invalid, or not open for reading."
10145 msgstr "I<stream> に対応するファイルディスクリプタが無効であるが、 読み込み用にオープンされていない。"
10146
10147 #. type: Plain text
10148 #: build/C/man3/scanf.3:561
10149 msgid "Input byte sequence does not form a valid character."
10150 msgstr "入力されたバイト列が有効な文字を構成していない。"
10151
10152 #. type: Plain text
10153 #: build/C/man3/scanf.3:565
10154 msgid "The read operation was interrupted by a signal; see B<signal>(7)."
10155 msgstr "読み込み操作がシグナルにより割り込まれた。 B<signal>(7)  参照。"
10156
10157 #. type: Plain text
10158 #: build/C/man3/scanf.3:570
10159 msgid "Not enough arguments; or I<format> is NULL."
10160 msgstr "引き数が十分でない。または I<format> が NULL である。"
10161
10162 #. type: Plain text
10163 #: build/C/man3/scanf.3:573
10164 msgid "Out of memory."
10165 msgstr "メモリ不足。"
10166
10167 #. type: TP
10168 #: build/C/man3/scanf.3:573
10169 #, no-wrap
10170 msgid "B<ERANGE>"
10171 msgstr "B<ERANGE>"
10172
10173 #. type: Plain text
10174 #: build/C/man3/scanf.3:577
10175 msgid "The result of an integer conversion would exceed the size that can be stored in the corresponding integer type."
10176 msgstr "整数変換の結果が、対応する整数型に格納できるサイズを越えてしまう。"
10177
10178 #. type: Plain text
10179 #: build/C/man3/scanf.3:587
10180 msgid "The functions B<fscanf>(), B<scanf>(), and B<sscanf>()  conform to C89 and C99 and POSIX.1-2001.  These standards do not specify the B<ERANGE> error."
10181 msgstr "B<fscanf>(), B<scanf>(), B<sscanf>()  関数は C89, C99, POSIX.1-2001 に準拠している。 これらの標準では、エラー B<ERANGE> は規定されていない。"
10182
10183 #. type: Plain text
10184 #: build/C/man3/scanf.3:597
10185 msgid "The B<q> specifier is the 4.4BSD notation for I<long long>, while B<ll> or the usage of B<L> in integer conversions is the GNU notation."
10186 msgstr "B<q> 指定子は I<long long> の 4.4BSD での記述方法である。 一方、整数変換での B<ll> または B<L> の使用は GNU での拡張である。"
10187
10188 #. type: Plain text
10189 #: build/C/man3/scanf.3:608
10190 msgid "The Linux version of these functions is based on the I<GNU> I<libio> library.  Take a look at the I<info> documentation of I<GNU> I<libc (glibc-1.08)> for a more concise description."
10191 msgstr "これらの関数の Linux 版は I<GNU> I<libio> ライブラリーを元にしている。 より簡潔な説明には I<GNU> I<libc (glibc-1.08)> の I<info> 文書に目を通すこと。"
10192
10193 #. type: SS
10194 #: build/C/man3/scanf.3:609
10195 #, no-wrap
10196 msgid "The 'a' assignment-allocation modifier"
10197 msgstr "'a' 代入割り当て (assignment-allocation) 修飾子"
10198
10199 #. type: Plain text
10200 #: build/C/man3/scanf.3:620
10201 msgid "Originally, the GNU C library supported dynamic allocation for string inputs (as a nonstandard extension) via the B<a> character.  (This feature is present at least as far back as glibc 2.0.)  Thus, one could write the following to have B<scanf>()  allocate a buffer for an input string, with a pointer to that buffer being returned in I<*buf>:"
10202 msgstr "元々、 GNU C ライブラリ (glibc) では、 B<a> 文字による文字列入力に対する動的割り当て変換指定子 (dynamic allocation conversion specifier) を (非標準の拡張として) サポートしている。この機能は少なくとも glibc 2.0 の時点ではすでに存在している。 したがって、以下のようにして、 B<scanf>() に入力文字列に対してバッファを割り当てさせることができる。割り当てられたバッファは I<*buf> で返される。"
10203
10204 #. type: Plain text
10205 #: build/C/man3/scanf.3:623
10206 #, no-wrap
10207 msgid ""
10208 "    char *buf;\n"
10209 "    scanf(\"%as\", &buf);\n"
10210 msgstr ""
10211 "    char *buf;\n"
10212 "    scanf(\"%as\", &buf);\n"
10213
10214 #. type: Plain text
10215 #: build/C/man3/scanf.3:634
10216 msgid "The use of the letter B<a> for this purpose was problematic, since B<a> is also specified by the ISO C standard as a synonym for B<f> (floating-point input).  POSIX.1-2008 instead specifies the B<m> modifier for assignment allocation (as documented in DESCRIPTION, above)."
10217 msgstr "この目的で文字 B<a> を使うのは問題をはらんでいる。 なぜなら、 B<a> は ISO C 標準では (浮動小数点入力を表す) の B<f> の同義語として定義されているからである。 その代わり、 POSIX.1-2008 では、(上記の「説明」に書かれている通り) 代入割り当てを行う修飾子として B<m> が規定されている。"
10218
10219 #. type: Plain text
10220 #: build/C/man3/scanf.3:646
10221 msgid "Note that the B<a> modifier is not available if the program is compiled with I<gcc -std=c99> or I<gcc -D_ISOC99_SOURCE> (unless B<_GNU_SOURCE> is also specified), in which case the B<a> is interpreted as a specifier for floating-point numbers (see above)."
10222 msgstr "B<a> 修飾子は I<gcc -std=c99> や I<gcc -D_ISOC99_SOURCE> でコンパイルしたプログラムでは (B<_GNU_SOURCE> も同時に指定していない場合) 利用できない点に注意。この場合、 B<a> は (上述の通り) 浮動小数点数を示す変換指定子と解釈される。"
10223
10224 #. type: Plain text
10225 #: build/C/man3/scanf.3:652
10226 msgid "Support for the B<m> modifier was added to glibc starting with version 2.7, and new programs should use that modifier instead of B<a>."
10227 msgstr "B<m> 修飾子への対応はバージョン 2.7 以降の glibc で追加されている。新しいプログラムでぇあ B<a> の代わりに B<m> を使用すべきである。"
10228
10229 #. type: Plain text
10230 #: build/C/man3/scanf.3:658
10231 msgid "As well as being standardized by POSIX, the B<m> modifier has the following further advantages over the use of B<a:>"
10232 msgstr "POSIX で標準化されているだけでなく、 B<m> 修飾子には B<a> を利用する場合に比べて以下のような利点がある。"
10233
10234 #. type: Plain text
10235 #: build/C/man3/scanf.3:663
10236 msgid "It may also be applied to B<%c> conversion specifiers (e.g., B<%3mc>)."
10237 msgstr "B<%c> 変換指定子にも適用できる (例えば B<%3mc>)。"
10238
10239 #. type: Plain text
10240 #: build/C/man3/scanf.3:669
10241 msgid "It avoids ambiguity with respect to the B<%a> floating-point conversion specifier (and is unaffected by I<gcc -std=c99> etc.)."
10242 msgstr "浮動小数点変換指定子としての B<%a> との紛らわしさが避けられる (また I<gcc -std=c99> などの影響も避けられる)。"
10243
10244 #. type: Plain text
10245 #: build/C/man3/scanf.3:682
10246 msgid "All functions are fully C89 conformant, but provide the additional specifiers B<q> and B<a> as well as an additional behavior of the B<L> and B<l> specifiers.  The latter may be considered to be a bug, as it changes the behavior of specifiers defined in C89."
10247 msgstr "全ての関数は、完全に C89 に準拠している。しかし 追加で B<q> と B<a> 指定子が提供されており、同様に B<L> と B<l> 指定子の付加的な振る舞いもある。後者は、 C89 で定義された指定子の振る舞いを変更するものなので、 バグとみなされるかもしれない。"
10248
10249 #. type: Plain text
10250 #: build/C/man3/scanf.3:698
10251 msgid "Some combinations of the type modifiers and conversion specifiers defined by ANSI C do not make sense (e.g., B<%Ld>).  While they may have a well-defined behavior on Linux, this need not to be so on other architectures.  Therefore it usually is better to use modifiers that are not defined by ANSI C at all, that is, use B<q> instead of B<L> in combination with B<d>, B<i>, B<o>, B<u>, B<x>, and B<X> conversions or B<ll>."
10252 msgstr ""
10253 "ANSI C で定義された型修飾子と変換指定子の組み合わせの中には 意味を\n"
10254 "なさないものがある (例えば、 B<%Ld>)。 これらが指定された場合、 \n"
10255 "Linux 上でははっきりと定義された振る舞いをするかもしれないが、\n"
10256 "他のアーキテクチャでも同様になっているとは限らない。\n"
10257 "それゆえに、ほとんどの場合、 ANSI C で定義されていない修飾子を使用した\n"
10258 "方が良い。すなわち、 B<d>, B<i>, B<o>, B<u>, B<x>, B<X> 変換や B<ll>\n"
10259 "と組み合わせる場合には、 B<L> の代わりに B<q> を使用した方が良い。"
10260
10261 #. type: Plain text
10262 #: build/C/man3/scanf.3:704
10263 msgid "The usage of B<q> is not the same as on 4.4BSD, as it may be used in float conversions equivalently to B<L>."
10264 msgstr "B<q> の使用方法は 4.4BSD と同じではない。 4.4BSD では B<q> は B<L> と同等に浮動小数の変換に使用される。"
10265
10266 #. type: Plain text
10267 #: build/C/man3/scanf.3:714
10268 msgid "To use the dynamic allocation conversion specifier, specify B<m> as a length modifier (thus B<%ms> or B<%m[>I<range>B<]>).  The caller must B<free>(3)  the returned string, as in the following example:"
10269 msgstr "動的割り当て変換指定子を使用するには、長さ修飾子として B<m> を指定する (つまり、全体としては B<%ms> や B<%m[>I<range>B<]> となる)。以下の例にあるように、呼び出し側は返された文字列を B<free>(3) しなければならない。"
10270
10271 #. type: Plain text
10272 #: build/C/man3/scanf.3:719
10273 #, no-wrap
10274 msgid ""
10275 "char *p;\n"
10276 "int n;\n"
10277 msgstr ""
10278 "char *p;\n"
10279 "int n;\n"
10280
10281 #. type: Plain text
10282 #: build/C/man3/scanf.3:730
10283 #, no-wrap
10284 msgid ""
10285 "errno = 0;\n"
10286 "n = scanf(\"%m[a-z]\", &p);\n"
10287 "if (n == 1) {\n"
10288 "    printf(\"read: %s\\en\", p);\n"
10289 "    free(p);\n"
10290 "} else if (errno != 0) {\n"
10291 "    perror(\"scanf\");\n"
10292 "} else {\n"
10293 "    fprintf(stderr, \"No matching characters\\en\");\n"
10294 "}\n"
10295 msgstr ""
10296 "errno = 0;\n"
10297 "n = scanf(\"%m[a-z]\", &p);\n"
10298 "if (n == 1) {\n"
10299 "    printf(\"read: %s\\en\", p);\n"
10300 "    free(p);\n"
10301 "} else if (errno != 0) {\n"
10302 "    perror(\"scanf\");\n"
10303 "} else {\n"
10304 "    fprintf(stderr, \"No matching characters\\en\");\n"
10305 "}\n"
10306
10307 #. type: Plain text
10308 #: build/C/man3/scanf.3:738
10309 msgid "As shown in the above example, it is necessary to call B<free>(3)  only if the B<scanf>()  call successfully read a string."
10310 msgstr "上記の例にあるように、 B<scanf>()  が文字列の読み込みに成功した場合にだけ、 B<free>(3)  を呼び出す必要がある。"
10311
10312 #. type: Plain text
10313 #: build/C/man3/scanf.3:745
10314 msgid "B<getc>(3), B<printf>(3), B<setlocale>(3), B<strtod>(3), B<strtol>(3), B<strtoul>(3)"
10315 msgstr "B<getc>(3), B<printf>(3)  B<setlocale>(3), B<strtod>(3), B<strtol>(3), B<strtoul>(3),"
10316
10317 #. type: TH
10318 #: build/C/man3/setbuf.3:48
10319 #, no-wrap
10320 msgid "SETBUF"
10321 msgstr "SETBUF"
10322
10323 #. type: Plain text
10324 #: build/C/man3/setbuf.3:51
10325 msgid "setbuf, setbuffer, setlinebuf, setvbuf - stream buffering operations"
10326 msgstr "setbuf, setbuffer, setlinebuf, setvbuf - ストリームのバッファリングの操作"
10327
10328 #. type: Plain text
10329 #: build/C/man3/setbuf.3:56
10330 #, no-wrap
10331 msgid "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
10332 msgstr "B<void setbuf(FILE *>I<stream>B<, char *>I<buf>B<);>\n"
10333
10334 #. type: Plain text
10335 #: build/C/man3/setbuf.3:58
10336 #, no-wrap
10337 msgid "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
10338 msgstr "B<void setbuffer(FILE *>I<stream>B<, char *>I<buf>B<, size_t >I<size>B<);>\n"
10339
10340 #. type: Plain text
10341 #: build/C/man3/setbuf.3:60
10342 #, no-wrap
10343 msgid "B<void setlinebuf(FILE *>I<stream>B<);>\n"
10344 msgstr "B<void setlinebuf(FILE *>I<stream>B<);>\n"
10345
10346 #. type: Plain text
10347 #: build/C/man3/setbuf.3:63
10348 #, no-wrap
10349 msgid "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
10350 msgstr "B<int setvbuf(FILE *>I<stream>B<, char *>I<buf>B<, int >I<mode>B<, size_t >I<size>B<);>\n"
10351
10352 #. type: Plain text
10353 #: build/C/man3/setbuf.3:73
10354 msgid "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
10355 msgstr "B<setbuffer>(), B<setlinebuf>(): _BSD_SOURCE"
10356
10357 #. type: Plain text
10358 #: build/C/man3/setbuf.3:96
10359 msgid "The three types of buffering available are unbuffered, block buffered, and line buffered.  When an output stream is unbuffered, information appears on the destination file or terminal as soon as written; when it is block buffered many characters are saved up and written as a block; when it is line buffered characters are saved up until a newline is output or input is read from any stream attached to a terminal device (typically I<stdin>).  The function B<fflush>(3)  may be used to force the block out early.  (See B<fclose>(3).)  Normally all files are block buffered.  When the first I/O operation occurs on a file, B<malloc>(3)  is called, and a buffer is obtained.  If a stream refers to a terminal (as I<stdout> normally does), it is line buffered.  The standard error stream I<stderr> is always unbuffered by default."
10360 msgstr "バッファリングには unbuffered, block buffered, line buffered の3つのタイプが ある。出力ストリームのタイプが unbuffered の場合、データを書き込むとすぐに出 力先ファイルに書き込まれるかターミナルに表示される。block buffered の場合、文 字の読み書きはブロック単位でいっぺんに行われる。line buffered の場合、 新しい行が出力されるか、ターミナルデバイスに接続しているストリーム (通常、I<stdin>) から新しい行が入力されるまで文字がたくわえられる。 ブロックを強制的に出力するには B<fflush>(3)  関数を使う。 (B<fclose>(3)  を参照のこと) 通常、ファイルはすべて block buffered である。ファイルに対して 初めて入出力処理を行うと B<malloc>(3)  が呼び出されバッファが獲得される。もし ストリームが (通常、 I<stdout> がそうであるように) ターミナルを参照する場合には、ファイルは line buffered と なる。標準エラー出力 I<stderr> はデフォルトでは常に unbuffered である。"
10361
10362 #. type: Plain text
10363 #: build/C/man3/setbuf.3:103
10364 msgid "The B<setvbuf>()  function may be used on any open stream to change its buffer.  The I<mode> argument must be one of the following three macros:"
10365 msgstr "B<setvbuf>()  関数は、オープンしている任意のストリームに対してバッファを変更できる。 引き数 I<mode> は、次の 3 つのマクロのうちいずれかである:"
10366
10367 #. type: TP
10368 #: build/C/man3/setbuf.3:104
10369 #, no-wrap
10370 msgid "B<_IONBF>"
10371 msgstr "B<_IONBF>"
10372
10373 #. type: Plain text
10374 #: build/C/man3/setbuf.3:107
10375 msgid "unbuffered"
10376 msgstr "unbuffered"
10377
10378 #. type: TP
10379 #: build/C/man3/setbuf.3:107
10380 #, no-wrap
10381 msgid "B<_IOLBF>"
10382 msgstr "B<_IOLBF>"
10383
10384 #. type: Plain text
10385 #: build/C/man3/setbuf.3:110
10386 msgid "line buffered"
10387 msgstr "line buffered"
10388
10389 #. type: TP
10390 #: build/C/man3/setbuf.3:110
10391 #, no-wrap
10392 msgid "B<_IOFBF>"
10393 msgstr "B<_IOFBF>"
10394
10395 #. type: Plain text
10396 #: build/C/man3/setbuf.3:113
10397 msgid "fully buffered"
10398 msgstr "fully buffered"
10399
10400 #. type: Plain text
10401 #: build/C/man3/setbuf.3:129
10402 msgid "Except for unbuffered files, the I<buf> argument should point to a buffer at least I<size> bytes long; this buffer will be used instead of the current buffer.  If the argument I<buf> is NULL, only the mode is affected; a new buffer will be allocated on the next read or write operation.  The B<setvbuf>()  function may be used only after opening a stream and before any other operations have been performed on it."
10403 msgstr "unbuffered のファイルを除き、 I<buf> 引数は I<size> バイト以上の大きさのバッファを指していなければならない。このバッファは現在の バッファの代わりに用いられる。もし、引数 I<buf> が NULL ならば、モードだけが変更される。 新しいバッファは次に読み書きした際に割り当てられる。 B<setvbuf>()  関数は、ストリームをオープンした後、 そのストリームに対して何らかの操作をする前にのみ使用できる。"
10404
10405 #. type: Plain text
10406 #: build/C/man3/setbuf.3:135
10407 msgid "The other three calls are, in effect, simply aliases for calls to B<setvbuf>().  The B<setbuf>()  function is exactly equivalent to the call"
10408 msgstr "他の 3 つの関数は B<setvbuf>()  の呼び出しに単純に置き換えることができる。 B<setbuf>()  関数は、"
10409
10410 #. type: Plain text
10411 #: build/C/man3/setbuf.3:138
10412 msgid "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
10413 msgstr "setvbuf(stream, buf, buf ? _IOFBF : _IONBF, BUFSIZ);"
10414
10415 #. type: Plain text
10416 #: build/C/man3/setbuf.3:148
10417 msgid "The B<setbuffer>()  function is the same, except that the size of the buffer is up to the caller, rather than being determined by the default B<BUFSIZ>.  The B<setlinebuf>()  function is exactly equivalent to the call:"
10418 msgstr "と全く同等だし、 B<setbuffer>()  関数は、バッファサイズがデフォルト値 B<BUFSIZ> ではなく引数で与えられる点以外は同じである。 B<setlinebuf>()  関数は以下と同じである。"
10419
10420 #. type: Plain text
10421 #: build/C/man3/setbuf.3:151
10422 msgid "setvbuf(stream, NULL, _IOLBF, 0);"
10423 msgstr "setvbuf(stream, NULL, _IOLBF, 0);"
10424
10425 #. type: Plain text
10426 #: build/C/man3/setbuf.3:162
10427 msgid "The function B<setvbuf>()  returns 0 on success.  It returns nonzero on failure (I<mode> is invalid or the request cannot be honored).  It may set I<errno> on failure."
10428 msgstr "B<setvbuf>()  関数は、成功した場合 0 を返す。 失敗した場合、0 以外の値を返す (失敗とは、 I<mode> が不正な場合またはリクエストが条件を満たさない場合である)。 B<setvbuf>()  関数が失敗した場合は I<errno> を設定することもある。"
10429
10430 #. type: Plain text
10431 #: build/C/man3/setbuf.3:164
10432 msgid "The other functions do not return a value."
10433 msgstr "その他の関数は値を返さない。"
10434
10435 #. type: Plain text
10436 #: build/C/man3/setbuf.3:173
10437 msgid "The B<setbuf>(), B<setbuffer>(), B<setlinebuf>(), and B<setvbuf>()  functions are thread-safe."
10438 msgstr "関数 B<setbuf>(), B<setbuffer>(), B<setlinebuf>(), B<setvbuf>() はスレッドセーフである。"
10439
10440 #. type: Plain text
10441 #: build/C/man3/setbuf.3:179
10442 msgid "The B<setbuf>()  and B<setvbuf>()  functions conform to C89 and C99."
10443 msgstr "B<setbuf>()  関数および B<setvbuf>()  関数は C89 と C99 に準拠している。"
10444
10445 #. type: Plain text
10446 #: build/C/man3/setbuf.3:196
10447 msgid "You must make sure that the space that I<buf> points to still exists by the time I<stream> is closed, which also happens at program termination.  For example, the following is invalid:"
10448 msgstr "I<stream> を閉じる時 (プログラムを終了する際にもこれは起きる) には、 I<buf> が指し示す空間とが存在していることを保証しなければならない。 例えば、次のような使い方は許されない:"
10449
10450 #. type: Plain text
10451 #: build/C/man3/setbuf.3:199
10452 #, no-wrap
10453 msgid "#include E<lt>stdio.hE<gt>\n"
10454 msgstr "#include E<lt>stdio.hE<gt>\n"
10455
10456 #. type: Plain text
10457 #: build/C/man3/setbuf.3:208
10458 #, no-wrap
10459 msgid ""
10460 "int\n"
10461 "main(void)\n"
10462 "{\n"
10463 "    char buf[BUFSIZ];\n"
10464 "    setbuf(stdin, buf);\n"
10465 "    printf(\"Hello, world!\\en\");\n"
10466 "    return 0;\n"
10467 "}\n"
10468 msgstr ""
10469 "int\n"
10470 "main(void)\n"
10471 "{\n"
10472 "    char buf[BUFSIZ];\n"
10473 "    setbuf(stdin, buf);\n"
10474 "    printf(\"Hello, world!\\en\");\n"
10475 "    return 0;\n"
10476 "}\n"
10477
10478 #. type: Plain text
10479 #: build/C/man3/setbuf.3:217
10480 msgid "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>(3), B<puts>(3)"
10481 msgstr "B<fclose>(3), B<fflush>(3), B<fopen>(3), B<fread>(3), B<malloc>(3), B<printf>(3), B<puts>(3)"
10482
10483 #. type: TH
10484 #: build/C/man3/stdin.3:13
10485 #, no-wrap
10486 msgid "STDIN"
10487 msgstr "STDIN"
10488
10489 #. type: TH
10490 #: build/C/man3/stdin.3:13 build/C/man3/tmpfile.3:31
10491 #, no-wrap
10492 msgid "2008-07-14"
10493 msgstr "2008-07-14"
10494
10495 #. type: Plain text
10496 #: build/C/man3/stdin.3:16
10497 msgid "stdin, stdout, stderr - standard I/O streams"
10498 msgstr "stdin, stdout, stderr - 標準入出力ストリーム"
10499
10500 #. type: Plain text
10501 #: build/C/man3/stdin.3:23
10502 #, no-wrap
10503 msgid ""
10504 "B<extern FILE *>I<stdin>B<;>\n"
10505 "B<extern FILE *>I<stdout>B<;>\n"
10506 "B<extern FILE *>I<stderr>B<;>\n"
10507 msgstr ""
10508 "B<extern FILE *>I<stdin>B<;>\n"
10509 "B<extern FILE *>I<stdout>B<;>\n"
10510 "B<extern FILE *>I<stderr>B<;>\n"
10511
10512 #. type: Plain text
10513 #: build/C/man3/stdin.3:35
10514 msgid "Under normal circumstances every UNIX program has three streams opened for it when it starts up, one for input, one for output, and one for printing diagnostic or error messages.  These are typically attached to the user's terminal (see B<tty>(4)  but might instead refer to files or other devices, depending on what the parent process chose to set up.  (See also the \"Redirection\" section of B<sh>(1).)"
10515 msgstr "標準の環境では、 UNIX プログラムは起動時に、オープンされているストリー ムを 3 つ与えられる。それぞれ入力用、出力用、診断メッセージやエラーメッ セージの表示用のものである。これらは通常ユーザの端末 (B<tty>(4)  を見よ) に接続されているが、親プロセスでの選択・設定によってファイル や他のデバイスに関連づけられていることもある (B<sh>(1)  の「リダイレクション」セクションも参照のこと)。"
10516
10517 #. type: Plain text
10518 #: build/C/man3/stdin.3:45
10519 msgid "The input stream is referred to as \"standard input\"; the output stream is referred to as \"standard output\"; and the error stream is referred to as \"standard error\".  These terms are abbreviated to form the symbols used to refer to these files, namely I<stdin>, I<stdout>, and I<stderr>."
10520 msgstr "入力ストリームは \"standard input\" と呼ばれる。出力ストリームは \"standard output\"、エラーストリームは \"standard error\" と呼ばれる。 これらの用語を短縮したものがそれぞれのファイルを示すシンボルとなる。つ まり I<stdin>, I<stdout>, I<stderr> である。"
10521
10522 #. type: Plain text
10523 #: build/C/man3/stdin.3:54
10524 msgid "Each of these symbols is a B<stdio>(3)  macro of type pointer to I<FILE>, and can be used with functions like B<fprintf>(3)  or B<fread>(3)."
10525 msgstr "これらのシンボルは B<stdio>(3)  のマクロで、 FILE へのポインタ型である。したがって B<fprintf>(3)  や B<fread>(3)  などの関数とともに用いることができる。"
10526
10527 #. type: Plain text
10528 #: build/C/man3/stdin.3:63
10529 msgid "Since I<FILE>s are a buffering wrapper around UNIX file descriptors, the same underlying files may also be accessed using the raw UNIX file interface, that is, the functions like B<read>(2)  and B<lseek>(2)."
10530 msgstr "I<FILE> は UNIX のファイルディスクリプタにバッファ機能を追加したラッパー であるから、これらのマクロにも対応するファイルがあり、 UNIX の raw ファ イルインタフェース (B<read>(2)  や B<lseek>(2)  など) によってアクセスすることもできる。"
10531
10532 #. type: Plain text
10533 #: build/C/man3/stdin.3:82
10534 msgid "On program startup, the integer file descriptors associated with the streams I<stdin>, I<stdout>, and I<stderr> are 0, 1, and 2, respectively.  The preprocessor symbols B<STDIN_FILENO>, B<STDOUT_FILENO>, and B<STDERR_FILENO> are defined with these values in I<E<lt>unistd.hE<gt>>.  (Applying B<freopen>(3)  to one of these streams can change the file descriptor number associated with the stream.)"
10535 msgstr "プログラムの起動時には、 ストリーム I<stdin>, I<stdout>, I<stderr> に結びつけられているファイルディスクリプタの番号は、 それぞれ 0, 1, 2 である。 プリプロセッサシンボル B<STDIN_FILENO>, B<STDOUT_FILENO>, B<STDERR_FILENO> は I<E<lt>unistd.hE<gt>> 中でそれぞれこれらの値に定義されている。 (これらのストリームに対して B<freopen>(3)  を適用することで、そのストリームに関連付けられたファイルディスクリプタ の番号を変更することができる。)"
10536
10537 #. type: Plain text
10538 #: build/C/man3/stdin.3:95
10539 msgid "Note that mixing use of I<FILE>s and raw file descriptors can produce unexpected results and should generally be avoided.  (For the masochistic among you: POSIX.1, section 8.2.3, describes in detail how this interaction is supposed to work.)  A general rule is that file descriptors are handled in the kernel, while stdio is just a library.  This means for example, that after an B<exec>(3), the child inherits all open file descriptors, but all old streams have become inaccessible."
10540 msgstr "I<FILE> と raw なファイルディスクリプタの併用は、予期できない結果を生じ ることがあるので、通常は避けるべきである。 (マゾヒスティックな人に: POSIX.1 のセクション 8.2.3 には、この混用で動作がどのようになりそう かが詳しく記述されている。)  一般的なルールは以下の通り: ファイルディスクリプタはカーネルによって 扱われ、 stdio は単にライブラリによって扱われるのである。すなわち例えば B<exec>(3)  の後には、子プロセスはオープンされているファイルディスクリプタ をすべて継承するが、親からのストリームはすべてアクセス不可となる。"
10541
10542 #. type: Plain text
10543 #: build/C/man3/stdin.3:113
10544 msgid "Since the symbols I<stdin>, I<stdout>, and I<stderr> are specified to be macros, assigning to them is nonportable.  The standard streams can be made to refer to different files with help of the library function B<freopen>(3), specially introduced to make it possible to reassign I<stdin>, I<stdout>, and I<stderr>.  The standard streams are closed by a call to B<exit>(3)  and by normal program termination."
10545 msgstr "シンボル I<stdin>, I<stdout>, I<stderr> はすべてマクロとして定義されているので、これらへの代入 は移植性を保証されない。標準ストリームはライブラリ関数 B<freopen>(3)  を用いれば、別のファイルを示すように変更することもできる。 このライブラリ関数は I<stdin>, I<stdout>, I<stderr> の再割り当てが可能なように特別に導入されたものである。 標準ストリームは B<exit>(3)  の呼び出しと、プログラムの正常終了によってクローズされる。"
10546
10547 #. type: Plain text
10548 #: build/C/man3/stdin.3:122
10549 msgid "The I<stdin>, I<stdout>, and I<stderr> macros conform to C89 and this standard also stipulates that these three streams shall be open at program startup."
10550 msgstr "I<stdin>, I<stdout>, I<stderr> マクロは C89 に準拠している。 また C89 では、これら 3 つのストリームがプログラム の起動時にオープンされているべきであることが規定されている。"
10551
10552 #. type: Plain text
10553 #: build/C/man3/stdin.3:154
10554 msgid "The stream I<stderr> is unbuffered.  The stream I<stdout> is line-buffered when it points to a terminal.  Partial lines will not appear until B<fflush>(3)  or B<exit>(3)  is called, or a newline is printed.  This can produce unexpected results, especially with debugging output.  The buffering mode of the standard streams (or any other stream)  can be changed using the B<setbuf>(3)  or B<setvbuf>(3)  call.  Note that in case I<stdin> is associated with a terminal, there may also be input buffering in the terminal driver, entirely unrelated to stdio buffering.  (Indeed, normally terminal input is line buffered in the kernel.)  This kernel input handling can be modified using calls like B<tcsetattr>(3); see also B<stty>(1), and B<termios>(3)."
10555 msgstr "I<stderr> ストリームはバッファリングされていない。 I<stdout> ストリームは、端末に接続されているときには行単位でバッファリング されている。一行に満たない内容は、 B<fflush>(3)  か B<exit>(3)  が呼び出されるか、改行文字が印字されるまで表示されない。これは、 特にデバッグ時において、予期しない結果を生じる原因となるかもしれない。 標準ストリームの (あるいは他のすべてのストリームの)  バッファリングモードは、 B<setbuf>(3)  または B<setvbuf>(3)  を呼び出すことによって変更できる。 ただし、 I<stdin> が端末に接続されているときは、端末のドライバでバッファリングされている 可能性がある点にも注意すること。これは stdio のバッファリングとは全く 関係なく存在しうる。 (実際、通常だと端末入力はカーネルによって行単位 でバッファリングされている。) このカーネルによる入力の扱いは B<tcsetattr>(3)  などの呼び出しによって変更することができる。 B<stty>(1)  と B<termios>(3)  も参照すること。"
10556
10557 #. type: Plain text
10558 #: build/C/man3/stdin.3:160
10559 msgid "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
10560 msgstr "B<csh>(1), B<sh>(1), B<open>(2), B<fopen>(3), B<stdio>(3)"
10561
10562 #. type: TH
10563 #: build/C/man3/stdio.3:39
10564 #, no-wrap
10565 msgid "STDIO"
10566 msgstr "STDIO"
10567
10568 #. type: TH
10569 #: build/C/man3/stdio.3:39
10570 #, no-wrap
10571 msgid "2001-12-26"
10572 msgstr "2001-12-26"
10573
10574 #. type: Plain text
10575 #: build/C/man3/stdio.3:42
10576 msgid "stdio - standard input/output library functions"
10577 msgstr "stdio - 標準入出力ライブラリ関数"
10578
10579 #. type: Plain text
10580 #: build/C/man3/stdio.3:46
10581 msgid "B<FILE *>I<stdin>B<;>"
10582 msgstr "B<FILE *>I<stdin>B<;>"
10583
10584 #. type: Plain text
10585 #: build/C/man3/stdio.3:48
10586 msgid "B<FILE *>I<stdout>B<;>"
10587 msgstr "B<FILE *>I<stdout>B<;>"
10588
10589 #. type: Plain text
10590 #: build/C/man3/stdio.3:50
10591 msgid "B<FILE *>I<stderr>B<;>"
10592 msgstr "B<FILE *>I<stderr>B<;>"
10593
10594 #. type: Plain text
10595 #: build/C/man3/stdio.3:57
10596 msgid "The standard I/O library provides a simple and efficient buffered stream I/O interface.  Input and output is mapped into logical data streams and the physical I/O characteristics are concealed.  The functions and macros are listed below; more information is available from the individual man pages."
10597 msgstr "標準入出力ライブラリは、簡単かつ効果のよい、 バッファリングされたストリーム入出力インターフェースを提供する。 入力と出力は論理データストリームに割り付けられ、 入出力の物理的な特徴は隠蔽される。 このライブラリに属する関数とマクロを以下に挙げる。 より詳しい情報は個々の man ページから得ることができる。"
10598
10599 #. type: Plain text
10600 #: build/C/man3/stdio.3:80
10601 msgid "A stream is associated with an external file (which may be a physical device) by I<opening> a file, which may involve creating a new file.  Creating an existing file causes its former contents to be discarded.  If a file can support positioning requests (such as a disk file, as opposed to a terminal), then a I<file position indicator> associated with the stream is positioned at the start of the file (byte zero), unless the file is opened with append mode.  If append mode is used, it is unspecified whether the position indicator will be placed at the start or the end of the file.  The position indicator is maintained by subsequent reads, writes and positioning requests.  All input occurs as if the characters were read by successive calls to the B<fgetc>(3)  function; all output takes place as if all characters were written by successive calls to the B<fputc>(3)  function."
10602 msgstr "ファイルを I<オープン (open) する> ことによって、 ストリームは外部ファイル (通常は物理デバイス) に連結される。 この操作には新しくファイルを作成することも含まれる。 既存のファイルと同じ名前のファイルを新たに作ると、 もとのファイルの中身が捨てられてしまう。 ファイルが位置指定リクエストをサポートしている (ディスクファイルなどが相当する。逆の例としては端末が挙げられる) 場合、 そのストリームに連結された I<ファイル位置指示子 (file position indicator)> は、追加モードで開かれない限りファイルの先頭 (0 バイト目) に位置する。 追加モードを使用した場合、 位置指示子をファイルの先頭に置かれるか末尾に置かれるかは規定されていない。 位置指示子は、 以降の読み書きや位置指定リクエストによって変更される。 すべての入力は、 B<fgetc>(3)  関数を次々に呼び出して文字を読み込んだかのように行われる。 一方すべての出力は、 B<fputc>(3)  関数を次々に呼び出して文字を書き込んだかのように行われる。"
10603
10604 #. type: Plain text
10605 #: build/C/man3/stdio.3:90
10606 msgid "A file is disassociated from a stream by I<closing> the file.  Output streams are flushed (any unwritten buffer contents are transferred to the host environment) before the stream is disassociated from the file.  The value of a pointer to a I<FILE> object is indeterminate after a file is closed (garbage)."
10607 msgstr "ファイルを I<クローズ (close) する> ことによって、そのファイルはストリームから切り離される。 出力ストリームは、そのストリームがファイルから切り離される前にフラッシュされる (書き込まれていないすべてのバッファの内容がホスト環境に転送される)。 I<FILE> オブジェクトへのポインタの値は、 ファイルを閉じた後では不確定になる (ゴミになってしまう)。"
10608
10609 #. type: Plain text
10610 #: build/C/man3/stdio.3:103
10611 msgid "A file may be subsequently reopened, by the same or another program execution, and its contents reclaimed or modified (if it can be repositioned at the start).  If the main function returns to its original caller, or the B<exit>(3)  function is called, all open files are closed (hence all output streams are flushed) before program termination.  Other methods of program termination, such as B<abort>(3)  do not bother about closing files properly."
10612 msgstr "ファイルはその後 (同じまたは別のプログラムによって)  再びオープンされることもあり、 その内容が修正されたり変更されたりする (そのファイルで先頭への位置移動が可能であれば)。 main 関数がもとの呼び出し側に返ったり、 B<exit>(3)  関数が呼ばれた場合、 プログラムの終了の前に 現在開いているすべてのファイルは閉じられる (その結果、すべての出力ストリームはフラッシュされる)。 プログラムの停止に B<abort>(3)  のような他の方法を用いた場合には、 ファイルが正しく閉じられる保証はない。"
10613
10614 #. type: Plain text
10615 #: build/C/man3/stdio.3:119
10616 msgid "At program startup, three text streams are predefined and need not be opened explicitly: I<standard input> (for reading conventional input), I<standard output> (for writing conventional output), and I<standard error> (for writing diagnostic output).  These streams are abbreviated I<stdin>,I<stdout> and I<stderr>.  When opened, the standard error stream is not fully buffered; the standard input and output streams are fully buffered if and only if the streams do not refer to an interactive device."
10617 msgstr "プログラムの起動時に 3 個のテキストストリームが予め定義されており、 それらは明示的に開く必要がない。 I<標準入力 (standard input)> (通常の入力を読み取るのに使う)、 I<標準出力 (standard output)> (通常の出力を書き込むのに使う)、 I<標準エラー出力 (standard error)> (診断出力を書き込むのに使う) である。 これらのストリームは I<stdin>, I<stdout>, I<stderr> と短縮して表現される。 オープンされたときには、 標準エラーストリームは 完全にはバッファリングされていない。 標準入力ストリームと標準出力ストリームは、 ストリームがインタラクティブなデバイスを参照していなければ、 完全にバッファリングされている。"
10618
10619 #. type: Plain text
10620 #: build/C/man3/stdio.3:129
10621 msgid "Output streams that refer to terminal devices are always line buffered by default; pending output to such streams is written automatically whenever an input stream that refers to a terminal device is read.  In cases where a large amount of computation is done after printing part of a line on an output terminal, it is necessary to B<fflush>(3)  the standard output before going off and computing so that the output will appear."
10622 msgstr "端末デバイスを参照する出力ストリームは、 デフォルトでは常に行単位でバッファリングされている。 ただしそのようなストリームにおけるバッファ内の出力は、 端末デバイスを参照している入力ストリームからの読み込みがあるたびに、 自動的に書き込まれる。 出力端末に行の一部を書き込んだ後で大量の計算を行う場合、 出力が表示されるように、計算に取りかかる前に標準出力に対して B<fflush>(3)  を実行する必要がある。"
10623
10624 #. type: Plain text
10625 #: build/C/man3/stdio.3:143
10626 msgid "The I<stdio> library is a part of the library B<libc> and routines are automatically loaded as needed by the compilers B<cc>(1)  and B<pc>(1).  The SYNOPSIS sections of the following manual pages indicate which include files are to be used, what the compiler declaration for the function looks like and which external variables are of interest."
10627 msgstr "I<stdio> ライブラリは B<libc> ライブラリの一部であり、ルーチンは コンパイラー B<cc>(1)  と B<pc>(1)  によって必要な時に自動的に読み込まれる。 後述する man ページ中の「書式」の節には、 どのインクルードファイルを使用しなければならないか、 その関数のコンパイラー宣言はどのようなものか、 どのような外部変数が関係するのかが示されている。"
10628
10629 #.  Not on Linux: .BR fropen ,
10630 #.  Not on Linux: .BR fwopen ,
10631 #. type: Plain text
10632 #: build/C/man3/stdio.3:183
10633 msgid "The following are defined as macros; these names may not be reused without first removing their current definitions with B<#undef>: B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout>.  Function versions of the macro functions B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, and B<putchar> exist and will be used if the macros definitions are explicitly removed."
10634 msgstr "B<BUFSIZ>, B<EOF>, B<FILENAME_MAX>, B<FOPEN_MAX>, B<L_cuserid>, B<L_ctermid>, B<L_tmpnam>, B<NULL>, B<SEEK_END>, B<SEEK_SET>, B<SEEK_CUR>, B<TMP_MAX>, B<clearerr>, B<feof>, B<ferror>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar>, B<stderr>, B<stdin>, B<stdout> はマクロとして定義されている。 これらの名前は、現在の定義を B<#undef> で削除しない限り、再利用することはできない。 マクロ関数の関数版として、 B<feof>, B<ferror>, B<clearerr>, B<fileno>, B<getc>, B<getchar>, B<putc>, B<putchar> がある。 マクロの定義が明示的に消去されている場合には、 これらを使用することになるだろう。"
10635
10636 #. type: SS
10637 #: build/C/man3/stdio.3:183
10638 #, no-wrap
10639 msgid "List of functions"
10640 msgstr "関数のリスト"
10641
10642 #. type: tbl table
10643 #: build/C/man3/stdio.3:188
10644 #, no-wrap
10645 msgid "Function\tDescription\n"
10646 msgstr "関数\t説明\n"
10647
10648 #. type: tbl table
10649 #: build/C/man3/stdio.3:189
10650 #, no-wrap
10651 msgid "_\n"
10652 msgstr "_\n"
10653
10654 #. type: tbl table
10655 #: build/C/man3/stdio.3:190
10656 #, no-wrap
10657 msgid "clearerr\tcheck and reset stream status\n"
10658 msgstr "clearerr\tストリームの状態の確認とリセット\n"
10659
10660 #. type: tbl table
10661 #: build/C/man3/stdio.3:191
10662 #, no-wrap
10663 msgid "fclose\tclose a stream\n"
10664 msgstr "fclose\tストリームをクローズする\n"
10665
10666 #. type: tbl table
10667 #: build/C/man3/stdio.3:192
10668 #, no-wrap
10669 msgid "fdopen\tstream open functions\n"
10670 msgstr "fdopen\tストリームをオープンする\n"
10671
10672 #. type: tbl table
10673 #: build/C/man3/stdio.3:193
10674 #, no-wrap
10675 msgid "feof\tcheck and reset stream status\n"
10676 msgstr "feof\tストリームの状態の確認とリセット\n"
10677
10678 #. type: tbl table
10679 #: build/C/man3/stdio.3:194
10680 #, no-wrap
10681 msgid "ferror\tcheck and reset stream status\n"
10682 msgstr "ferror\tストリームの状態の確認とリセット\n"
10683
10684 #. type: tbl table
10685 #: build/C/man3/stdio.3:195
10686 #, no-wrap
10687 msgid "fflush\tflush a stream\n"
10688 msgstr "fflush\tストリームをフラッシュする\n"
10689
10690 #. type: tbl table
10691 #: build/C/man3/stdio.3:196
10692 #, no-wrap
10693 msgid "fgetc\tget next character or word from input stream\n"
10694 msgstr "fgetc\t次の文字または語を入力ストリームから獲得する\n"
10695
10696 #. type: tbl table
10697 #: build/C/man3/stdio.3:197
10698 #, no-wrap
10699 msgid "fgetpos\treposition a stream\n"
10700 msgstr "fgetpos\tストリームの位置を取得する\n"
10701
10702 #. type: tbl table
10703 #: build/C/man3/stdio.3:198
10704 #, no-wrap
10705 msgid "fgets\tget a line from a stream\n"
10706 msgstr "fgets\tストリームから行を取得する\n"
10707
10708 #. type: tbl table
10709 #: build/C/man3/stdio.3:199
10710 #, no-wrap
10711 msgid "fileno\treturn the integer descriptor of the argument stream\n"
10712 msgstr "fileno\t引き数であるストリームの整数値のディスクリプタを返す\n"
10713
10714 #. type: tbl table
10715 #: build/C/man3/stdio.3:200
10716 #, no-wrap
10717 msgid "fopen\tstream open functions\n"
10718 msgstr "fopen\tストリームをオープンする\n"
10719
10720 #. type: tbl table
10721 #: build/C/man3/stdio.3:201
10722 #, no-wrap
10723 msgid "fprintf\tformatted output conversion\n"
10724 msgstr "fprintf\t書式付き出力変換\n"
10725
10726 #. type: tbl table
10727 #: build/C/man3/stdio.3:202
10728 #, no-wrap
10729 msgid "fpurge\tflush a stream\n"
10730 msgstr "fpurge\tストリームをフラッシュする\n"
10731
10732 #. type: tbl table
10733 #: build/C/man3/stdio.3:203
10734 #, no-wrap
10735 msgid "fputc\toutput a character or word to a stream\n"
10736 msgstr "fputc\t文字または語をストリームに出力する\n"
10737
10738 #. type: tbl table
10739 #: build/C/man3/stdio.3:204
10740 #, no-wrap
10741 msgid "fputs\toutput a line to a stream\n"
10742 msgstr "fputs\t行をストリームに出力する\n"
10743
10744 #. type: tbl table
10745 #: build/C/man3/stdio.3:205
10746 #, no-wrap
10747 msgid "fread\tbinary stream input/output\n"
10748 msgstr "fread\tバイナリーストリーム入出力\n"
10749
10750 #. type: tbl table
10751 #: build/C/man3/stdio.3:206
10752 #, no-wrap
10753 msgid "freopen\tstream open functions\n"
10754 msgstr "freopen\tストリームをオープンする\n"
10755
10756 #. type: tbl table
10757 #: build/C/man3/stdio.3:207
10758 #, no-wrap
10759 msgid "fscanf\tinput format conversion\n"
10760 msgstr "fscanf\t書式付き入力変換\n"
10761
10762 #. type: tbl table
10763 #: build/C/man3/stdio.3:208
10764 #, no-wrap
10765 msgid "fseek\treposition a stream\n"
10766 msgstr "fseek\tストリームの位置指示子を移動する\n"
10767
10768 #. type: tbl table
10769 #: build/C/man3/stdio.3:209
10770 #, no-wrap
10771 msgid "fsetpos\treposition a stream\n"
10772 msgstr "fsetpos\tストリームの位置指示子を移動する\n"
10773
10774 #. type: tbl table
10775 #: build/C/man3/stdio.3:210
10776 #, no-wrap
10777 msgid "ftell\treposition a stream\n"
10778 msgstr "ftell\tストリームの位置を取得する\n"
10779
10780 #. type: tbl table
10781 #: build/C/man3/stdio.3:211
10782 #, no-wrap
10783 msgid "fwrite\tbinary stream input/output\n"
10784 msgstr "fwrite\tバイナリーストリーム入出力\n"
10785
10786 #. type: tbl table
10787 #: build/C/man3/stdio.3:212
10788 #, no-wrap
10789 msgid "getc\tget next character or word from input stream\n"
10790 msgstr "getc\t次の文字または語を入力ストリームから取得する\n"
10791
10792 #. type: tbl table
10793 #: build/C/man3/stdio.3:213
10794 #, no-wrap
10795 msgid "getchar\tget next character or word from input stream\n"
10796 msgstr "getchar\t次の文字または語を入力ストリームから取得する\n"
10797
10798 #. type: tbl table
10799 #: build/C/man3/stdio.3:214
10800 #, no-wrap
10801 msgid "gets\tget a line from a stream\n"
10802 msgstr "gets\t行を入力ストリームから取得する\n"
10803
10804 #. type: tbl table
10805 #: build/C/man3/stdio.3:215
10806 #, no-wrap
10807 msgid "getw\tget next character or word from input stream\n"
10808 msgstr "getw\t次の文字または語を入力ストリームから取得する\n"
10809
10810 #. type: tbl table
10811 #: build/C/man3/stdio.3:216
10812 #, no-wrap
10813 msgid "mktemp\tmake temporary filename (unique)\n"
10814 msgstr "mktemp\t他と重ならないテンポラリファイル名を作る\n"
10815
10816 #. type: tbl table
10817 #: build/C/man3/stdio.3:217
10818 #, no-wrap
10819 msgid "perror\tsystem error messages\n"
10820 msgstr "perror\tシステムエラーメッセージ\n"
10821
10822 #. type: tbl table
10823 #: build/C/man3/stdio.3:218
10824 #, no-wrap
10825 msgid "printf\tformatted output conversion\n"
10826 msgstr "printf\t書式付き出力変換\n"
10827
10828 #. type: tbl table
10829 #: build/C/man3/stdio.3:219
10830 #, no-wrap
10831 msgid "putc\toutput a character or word to a stream\n"
10832 msgstr "putc\t文字または語をストリームに出力する\n"
10833
10834 #. type: tbl table
10835 #: build/C/man3/stdio.3:220
10836 #, no-wrap
10837 msgid "putchar\toutput a character or word to a stream\n"
10838 msgstr "putchar\t文字または語をストリームに出力する\n"
10839
10840 #. type: tbl table
10841 #: build/C/man3/stdio.3:221
10842 #, no-wrap
10843 msgid "puts\toutput a line to a stream\n"
10844 msgstr "puts\t行をストリームに出力する\n"
10845
10846 #. type: tbl table
10847 #: build/C/man3/stdio.3:222
10848 #, no-wrap
10849 msgid "putw\toutput a character or word to a stream\n"
10850 msgstr "putw\t文字または語をストリームに出力する\n"
10851
10852 #. type: tbl table
10853 #: build/C/man3/stdio.3:223
10854 #, no-wrap
10855 msgid "remove\tremove directory entry\n"
10856 msgstr "remove\tディレクトリエントリを削除する\n"
10857
10858 #. type: tbl table
10859 #: build/C/man3/stdio.3:224
10860 #, no-wrap
10861 msgid "rewind\treposition a stream\n"
10862 msgstr "rewind\tストリームの位置指示子を移動する\n"
10863
10864 #. type: tbl table
10865 #: build/C/man3/stdio.3:225
10866 #, no-wrap
10867 msgid "scanf\tinput format conversion\n"
10868 msgstr "scanf\t書式付き入力変換\n"
10869
10870 #. type: tbl table
10871 #: build/C/man3/stdio.3:226
10872 #, no-wrap
10873 msgid "setbuf\tstream buffering operations\n"
10874 msgstr "setbuf\tストリームのバッファリングの操作\n"
10875
10876 #. type: tbl table
10877 #: build/C/man3/stdio.3:227
10878 #, no-wrap
10879 msgid "setbuffer\tstream buffering operations\n"
10880 msgstr "setbuffer\tストリームのバッファリングの操作\n"
10881
10882 #. type: tbl table
10883 #: build/C/man3/stdio.3:228
10884 #, no-wrap
10885 msgid "setlinebuf\tstream buffering operations\n"
10886 msgstr "setlinebuf\tストリームのバッファリングの操作\n"
10887
10888 #. type: tbl table
10889 #: build/C/man3/stdio.3:229
10890 #, no-wrap
10891 msgid "setvbuf\tstream buffering operations\n"
10892 msgstr "setvbuf\tストリームのバッファリングの操作\n"
10893
10894 #. type: tbl table
10895 #: build/C/man3/stdio.3:230
10896 #, no-wrap
10897 msgid "sprintf\tformatted output conversion\n"
10898 msgstr "sprintf\t書式付き出力変換\n"
10899
10900 #. type: tbl table
10901 #: build/C/man3/stdio.3:231
10902 #, no-wrap
10903 msgid "sscanf\tinput format conversion\n"
10904 msgstr "sscanf\t書式付き入力変換\n"
10905
10906 #. type: tbl table
10907 #: build/C/man3/stdio.3:232
10908 #, no-wrap
10909 msgid "strerror\tsystem error messages\n"
10910 msgstr "strerror\tシステムエラーメッセージ\n"
10911
10912 #. type: tbl table
10913 #: build/C/man3/stdio.3:233
10914 #, no-wrap
10915 msgid "sys_errlist\tsystem error messages\n"
10916 msgstr "sys_errlist\tシステムエラーメッセージ\n"
10917
10918 #. type: tbl table
10919 #: build/C/man3/stdio.3:234
10920 #, no-wrap
10921 msgid "sys_nerr\tsystem error messages\n"
10922 msgstr "sys_nerr\tシステムエラーメッセージ\n"
10923
10924 #. type: tbl table
10925 #: build/C/man3/stdio.3:235
10926 #, no-wrap
10927 msgid "tempnam\ttemporary file routines\n"
10928 msgstr "tempnam\tテンポラリファイルの操作\n"
10929
10930 #. type: tbl table
10931 #: build/C/man3/stdio.3:236
10932 #, no-wrap
10933 msgid "tmpfile\ttemporary file routines\n"
10934 msgstr "tmpfile\tテンポラリファイルの操作\n"
10935
10936 #. type: tbl table
10937 #: build/C/man3/stdio.3:237
10938 #, no-wrap
10939 msgid "tmpnam\ttemporary file routines\n"
10940 msgstr "tmpnam\tテンポラリファイルの操作\n"
10941
10942 #. type: tbl table
10943 #: build/C/man3/stdio.3:238
10944 #, no-wrap
10945 msgid "ungetc\tun-get character from input stream\n"
10946 msgstr "ungetc\t入力ストリームへ 1 文字戻す。\n"
10947
10948 #. type: tbl table
10949 #: build/C/man3/stdio.3:239
10950 #, no-wrap
10951 msgid "vfprintf\tformatted output conversion\n"
10952 msgstr "vfprintf\t書式付き出力変換\n"
10953
10954 #. type: tbl table
10955 #: build/C/man3/stdio.3:240
10956 #, no-wrap
10957 msgid "vfscanf\tinput format conversion\n"
10958 msgstr "vfscanf\t書式付き入力変換\n"
10959
10960 #. type: tbl table
10961 #: build/C/man3/stdio.3:241
10962 #, no-wrap
10963 msgid "vprintf\tformatted output conversion\n"
10964 msgstr "vprintf\t書式付き出力変換\n"
10965
10966 #. type: tbl table
10967 #: build/C/man3/stdio.3:242
10968 #, no-wrap
10969 msgid "vscanf\tinput format conversion\n"
10970 msgstr "vscanf\t書式付き入力変換\n"
10971
10972 #. type: tbl table
10973 #: build/C/man3/stdio.3:243
10974 #, no-wrap
10975 msgid "vsprintf\tformatted output conversion\n"
10976 msgstr "vsprintf\t書式付き出力変換\n"
10977
10978 #. type: tbl table
10979 #: build/C/man3/stdio.3:244
10980 #, no-wrap
10981 msgid "vsscanf\tinput format conversion\n"
10982 msgstr "vsscanf\t書式付き入力変換\n"
10983
10984 #. type: Plain text
10985 #: build/C/man3/stdio.3:250
10986 msgid "The I<stdio> library conforms to C89."
10987 msgstr "I<stdio> ライブラリは C89 に準拠している。"
10988
10989 #. type: Plain text
10990 #: build/C/man3/stdio.3:257
10991 msgid "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), B<unlocked_stdio>(3)"
10992 msgstr "B<close>(2), B<open>(2), B<read>(2), B<write>(2), B<stdout>(3), B<unlocked_stdio>(3)"
10993
10994 #. type: TH
10995 #: build/C/man3/stdio_ext.3:25
10996 #, no-wrap
10997 msgid "STDIO_EXT"
10998 msgstr "STDIO_EXT"
10999
11000 #. type: Plain text
11001 #: build/C/man3/stdio_ext.3:30
11002 msgid "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, __fsetlocking, __fwritable, __fwriting, _flushlbf - interfaces to stdio FILE structure"
11003 msgstr "__fbufsize, __flbf, __fpending, __fpurge, __freadable, __freading, __fsetlocking, __fwritable, __fwriting, _flushlbf - 標準入出力ファイル構造体へのインタフェース"
11004
11005 #. type: Plain text
11006 #: build/C/man3/stdio_ext.3:34
11007 msgid "B<#include E<lt>stdio_ext.hE<gt>>"
11008 msgstr "B<#include E<lt>stdio_ext.hE<gt>>"
11009
11010 #. type: Plain text
11011 #: build/C/man3/stdio_ext.3:36
11012 msgid "B<size_t __fbufsize(FILE *>I<stream>B<);>"
11013 msgstr "B<size_t __fbufsize(FILE *>I<stream>B<);>"
11014
11015 #. type: Plain text
11016 #: build/C/man3/stdio_ext.3:38
11017 msgid "B<size_t __fpending(FILE *>I<stream>B<);>"
11018 msgstr "B<size_t __fpending(FILE *>I<stream>B<);>"
11019
11020 #. type: Plain text
11021 #: build/C/man3/stdio_ext.3:40
11022 msgid "B<int __flbf(FILE *>I<stream>B<);>"
11023 msgstr "B<int __flbf(FILE *>I<stream>B<);>"
11024
11025 #. type: Plain text
11026 #: build/C/man3/stdio_ext.3:42
11027 msgid "B<int __freadable(FILE *>I<stream>B<);>"
11028 msgstr "B<int __freadable(FILE *>I<stream>B<);>"
11029
11030 #. type: Plain text
11031 #: build/C/man3/stdio_ext.3:44
11032 msgid "B<int __fwritable(FILE *>I<stream>B<);>"
11033 msgstr "B<int __fwritable(FILE *>I<stream>B<);>"
11034
11035 #. type: Plain text
11036 #: build/C/man3/stdio_ext.3:46
11037 msgid "B<int __freading(FILE *>I<stream>B<);>"
11038 msgstr "B<int __freading(FILE *>I<stream>B<);>"
11039
11040 #. type: Plain text
11041 #: build/C/man3/stdio_ext.3:48
11042 msgid "B<int __fwriting(FILE *>I<stream>B<);>"
11043 msgstr "B<int __fwriting(FILE *>I<stream>B<);>"
11044
11045 #. type: Plain text
11046 #: build/C/man3/stdio_ext.3:50
11047 msgid "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
11048 msgstr "B<int __fsetlocking(FILE *>I<stream>B<, int >I<type>B<);>"
11049
11050 #. type: Plain text
11051 #: build/C/man3/stdio_ext.3:52
11052 msgid "B<void _flushlbf(void);>"
11053 msgstr "B<void _flushlbf(void);>"
11054
11055 #. type: Plain text
11056 #: build/C/man3/stdio_ext.3:54
11057 msgid "B<void __fpurge(FILE *>I<stream>B<);>"
11058 msgstr "B<void __fpurge(FILE *>I<stream>B<);>"
11059
11060 #. type: Plain text
11061 #: build/C/man3/stdio_ext.3:59
11062 msgid "Solaris introduced routines to allow portable access to the internals of the I<FILE> structure, and glibc also implemented these."
11063 msgstr "Solaris では、 I<FILE> 構造体の内部へポータブルなかたちで アクセスできる手段が導入されており、これらは glibc でも実装されている。"
11064
11065 #. type: Plain text
11066 #: build/C/man3/stdio_ext.3:64
11067 msgid "The B<__fbufsize>()  function returns the size of the buffer currently used by the given stream."
11068 msgstr "B<__fbufsize>()  関数は、指定されたストリームが使用しているバッファサイズを返す。"
11069
11070 #. type: Plain text
11071 #: build/C/man3/stdio_ext.3:71
11072 msgid "The B<__fpending>()  function returns the number of bytes in the output buffer.  For wide-oriented streams the unit is wide characters.  This function is undefined on buffers in reading mode, or opened read-only."
11073 msgstr "B<__fpending>()  関数は、出力バッファに入っているデータのバイト数を返す。 ワイドキャラクタを扱うストリームの場合、ワイドキャラクタ単位で計算される。 バッファが読み出しモードの場合や読み出し専用で開かれている場合の この関数の振舞いは未定義である。"
11074
11075 #. type: Plain text
11076 #: build/C/man3/stdio_ext.3:76
11077 msgid "The B<__flbf>()  function returns a nonzero value if the stream is line-buffered, and zero otherwise."
11078 msgstr "B<__flbf>()  関数は、ストリームがラインバッファの場合は 0 以外を、 それ以外の場合は 0 を返す。"
11079
11080 #. type: Plain text
11081 #: build/C/man3/stdio_ext.3:81
11082 msgid "The B<__freadable>()  function returns a nonzero value if the stream allows reading, and zero otherwise."
11083 msgstr "B<__freadable>()  関数は、ストリームが読み出し可能な場合は 0 以外を、 それ以外の場合は 0 を返す。"
11084
11085 #. type: Plain text
11086 #: build/C/man3/stdio_ext.3:86
11087 msgid "The B<__fwritable>()  function returns a nonzero value if the stream allows writing, and zero otherwise."
11088 msgstr "B<__fwritable>()  関数は、ストリームが書き込み可能な場合は 0 以外を、 それ以外の場合は 0 を返す。"
11089
11090 #. type: Plain text
11091 #: build/C/man3/stdio_ext.3:92
11092 msgid "The B<__freading>()  function returns a nonzero value if the stream is read-only, or if the last operation on the stream was a read operation, and zero otherwise."
11093 msgstr "B<__freading>()  関数は、ストリームが読み出し専用の場合、またはストリームに対する直前の操作が 読み出し操作であった場合は 0 以外を返し、それ以外の場合は 0 を返す。"
11094
11095 #. type: Plain text
11096 #: build/C/man3/stdio_ext.3:98
11097 msgid "The B<__fwriting>()  function returns a nonzero value if the stream is write-only (or append-only), or if the last operation on the stream was a write operation, and zero otherwise."
11098 msgstr "B<__fwriting>()  関数は、ストリームが書き込み専用(もしくは追加専用)の場合、 またはストリームに対する直前の操作が書き込み操作であった場合は 0 以外を返し、 それ以外の場合は 0 を返す。"
11099
11100 #. type: Plain text
11101 #: build/C/man3/stdio_ext.3:106
11102 msgid "The B<__fsetlocking>()  function can be used to select the desired type of locking on the stream.  It returns the current type.  The I<type> argument can take the following three values:"
11103 msgstr "B<__fsetlocking>()  関数は、ストリームのロック形式を選択するために使用できる。 返り値は、現在のロック形式である。 I<type> 引き数は以下の 3 種類の値をとることができる :"
11104
11105 #. type: TP
11106 #: build/C/man3/stdio_ext.3:106
11107 #, no-wrap
11108 msgid "B<FSETLOCKING_INTERNAL>"
11109 msgstr "B<FSETLOCKING_INTERNAL>"
11110
11111 #. type: Plain text
11112 #: build/C/man3/stdio_ext.3:111
11113 msgid "Perform implicit locking around every operation on the given stream (except for the *_unlocked ones).  This is the default."
11114 msgstr "指定されたストリームに対して操作が行われる度に、操作の前後で 明示的に指示しなくてもストリームのロック処理を行う (但し、*_unlocked 関数を使用した場合は例外である)。 これがデフォルトのロック形式である。"
11115
11116 #. type: TP
11117 #: build/C/man3/stdio_ext.3:111
11118 #, no-wrap
11119 msgid "B<FSETLOCKING_BYCALLER>"
11120 msgstr "B<FSETLOCKING_BYCALLER>"
11121
11122 #. type: Plain text
11123 #: build/C/man3/stdio_ext.3:118
11124 msgid "The caller will take care of the locking (possibly using B<flockfile>(3)  in case there is more than one thread), and the stdio routines will not do locking until the state is reset to B<FSETLOCKING_INTERNAL>."
11125 msgstr "関数の呼び出し元でロックの面倒をみる。 (おそらく、複数のスレッドが存在する状況では B<flockfile>(3)  を使うことになるだろう)  ロック形式が B<FSETLOCKING_INTERNAL> にリセットされるまでは標準入出力関連の関数はロック処理を行わない。"
11126
11127 #. type: TP
11128 #: build/C/man3/stdio_ext.3:118
11129 #, no-wrap
11130 msgid "B<FSETLOCKING_QUERY>"
11131 msgstr "B<FSETLOCKING_QUERY>"
11132
11133 #. type: Plain text
11134 #: build/C/man3/stdio_ext.3:122
11135 msgid "Don't change the type of locking.  (Only return it.)"
11136 msgstr "ロック形式の変更を行わない。(現在の形式を返すだけである)"
11137
11138 #. type: Plain text
11139 #: build/C/man3/stdio_ext.3:128
11140 msgid "The B<_flushlbf>()  function flushes all line-buffered streams.  (Presumably so that output to a terminal is forced out, say before reading keyboard input.)"
11141 msgstr "B<_flushlbf>()  関数は、すべてのラインバッファ (line-buffered) タイプのストリームの 内容を出力(フラッシュ)する。 (当然ながら、端末への出力が強制的に行われることになるので、 キーボードからの入力を読みこむ前にこの関数を呼んだ方がいいだろう)"
11142
11143 #. type: Plain text
11144 #: build/C/man3/stdio_ext.3:132
11145 msgid "The B<__fpurge>()  function discards the contents of the stream's buffer."
11146 msgstr "B<__fpurge>()  関数は、ストリームのバッファの内容を廃棄する。"
11147
11148 #. type: Plain text
11149 #: build/C/man3/stdio_ext.3:141
11150 msgid "The B<__fbufsize>(), B<__fpending>(), B<__fpurge>()  and B<__fsetlocking>()  functions do not lock the stream, so they are not thread-safe."
11151 msgstr "関数 B<__fbufsize>(), B<__fpending>(), B<__fpurge>(), B<__fsetlocking>() は、 ストリームのロックを行わない。 そのため、スレッドセーフではない。"
11152
11153 #. type: Plain text
11154 #: build/C/man3/stdio_ext.3:151
11155 msgid "The B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), B<__fwriting>()  and B<_flushlbf>()  functions are thread-safe."
11156 msgstr "関数 B<__flbf>(), B<__freadable>(), B<__freading>(), B<__fwritable>(), B<__fwriting>(), B<_flushlbf>() はスレッドセーフである。"
11157
11158 #. type: Plain text
11159 #: build/C/man3/stdio_ext.3:154
11160 msgid "B<flockfile>(3), B<fpurge>(3)"
11161 msgstr "B<flockfile>(3), B<fpurge>(3)"
11162
11163 #. type: TH
11164 #: build/C/man2/symlink.2:33 build/C/man7/symlink.7:37
11165 #, no-wrap
11166 msgid "SYMLINK"
11167 msgstr "SYMLINK"
11168
11169 #. type: Plain text
11170 #: build/C/man2/symlink.2:36
11171 msgid "symlink, symlinkat - make a new name for a file"
11172 msgstr "symlink, symlinkat - ファイルに新しい名前を付ける"
11173
11174 #. type: Plain text
11175 #: build/C/man2/symlink.2:41
11176 #, no-wrap
11177 msgid "B<int symlink(const char *>I<target>B<, const char *>I<linkpath>B<);>\n"
11178 msgstr "B<int symlink(const char *>I<target>B<, const char *>I<linkpath>B<);>\n"
11179
11180 #. type: Plain text
11181 #: build/C/man2/symlink.2:47
11182 #, no-wrap
11183 msgid "B<int symlinkat(const char *>I<target>B<, int >I<newdirfd>B<, const char *>I<linkpath>B<);>\n"
11184 msgstr "B<int symlinkat(const char *>I<target>B<, int >I<newdirfd>B<, const char *>I<linkpath>B<);>\n"
11185
11186 #. type: Plain text
11187 #: build/C/man2/symlink.2:56
11188 msgid "B<symlink>():"
11189 msgstr "B<symlink>():"
11190
11191 #. type: Plain text
11192 #: build/C/man2/symlink.2:62
11193 msgid "B<symlinkat>():"
11194 msgstr "B<symlinkat>():"
11195
11196 #. type: Plain text
11197 #: build/C/man2/symlink.2:80
11198 msgid "B<symlink>()  creates a symbolic link named I<linkpath> which contains the string I<target>."
11199 msgstr "B<symlink>()  は I<target> という文字列をファイルの内容として持つ I<linkpath> というシンボリックリンク (symbolic link) を作成する。"
11200
11201 #. type: Plain text
11202 #: build/C/man2/symlink.2:84
11203 msgid "Symbolic links are interpreted at run time as if the contents of the link had been substituted into the path being followed to find a file or directory."
11204 msgstr "シンボリックリンクは実行時に解釈され、 リンクの内容でパスを置き換えて、そのパスを辿ることで、 ファイルやディレクトリに到達する。"
11205
11206 #. type: Plain text
11207 #: build/C/man2/symlink.2:89
11208 msgid "Symbolic links may contain I<..> path components, which (if used at the start of the link) refer to the parent directories of that in which the link resides."
11209 msgstr "シンボリックリンクはパスの部分に I<..> を含むかもしれない。これは (もしリンクの最初に使用された場合は) リンクの 存在するディレクトリの親ディレクトリが参照される。"
11210
11211 #. type: Plain text
11212 #: build/C/man2/symlink.2:93
11213 msgid "A symbolic link (also known as a soft link) may point to an existing file or to a nonexistent one; the latter case is known as a dangling link."
11214 msgstr "シンボリックリンクは (ソフトリンク (soft link) とも呼ばれ)  存在するファイルを指しているかもしれないし、 存在しないファイルを指しているかもしれない; 後者の場合は壊れたリンク (dangling link) とも呼ばれる。"
11215
11216 #. type: Plain text
11217 #: build/C/man2/symlink.2:100
11218 msgid "The permissions of a symbolic link are irrelevant; the ownership is ignored when following the link, but is checked when removal or renaming of the link is requested and the link is in a directory with the sticky bit (B<S_ISVTX>)  set."
11219 msgstr "シンボリックリンクの許可 (permission) は無意味である; リンクを追跡する場合には所有権 (ownership) は無視される。 ただし、リンクの削除や名前の変更が要求され、かつリンクが存在する ディレクトリにスティッキービット (sticky bit)  (B<S_ISVTX>)  が設定されている場合には、所有権のチェックが行われる。"
11220
11221 #. type: Plain text
11222 #: build/C/man2/symlink.2:106
11223 msgid "If I<linkpath> exists, it will I<not> be overwritten."
11224 msgstr "I<linkpath> が存在する場合には上書きはI<されない>。"
11225
11226 #. type: SS
11227 #: build/C/man2/symlink.2:106
11228 #, no-wrap
11229 msgid "symlinkat()"
11230 msgstr "symlinkat()"
11231
11232 #. type: Plain text
11233 #: build/C/man2/symlink.2:112
11234 msgid "The B<symlinkat>()  system call operates in exactly the same way as B<symlink>(), except for the differences described here."
11235 msgstr "B<symlinkat>() システムコールは B<symlink>() と全く同様に動作するが、以下で説明する点が異なる。"
11236
11237 #. type: Plain text
11238 #: build/C/man2/symlink.2:122
11239 msgid "If the pathname given in I<linkpath> is relative, then it is interpreted relative to the directory referred to by the file descriptor I<newdirfd> (rather than relative to the current working directory of the calling process, as is done by B<symlink>()  for a relative pathname)."
11240 msgstr "I<linkpath> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリプター I<newdirfd> が参照するディレクトリに対する相対パスと解釈される (B<symlink>() に相対パス名を渡した場合のように、呼び出したプロセスのカレントワーキングディレクトリに対する相対パスではない)。"
11241
11242 #. type: Plain text
11243 #: build/C/man2/symlink.2:134
11244 msgid "If I<linkpath> is relative and I<newdirfd> is the special value B<AT_FDCWD>, then I<linkpath> is interpreted relative to the current working directory of the calling process (like B<symlink>())."
11245 msgstr "I<linkpath> で指定されたパス名が相対パスで、 I<newdirfd> が特別な値 B<AT_FDCWD> の場合、 (B<symlink>() と同様に) I<linkpath> は呼び出したプロセスのカレントワーキングディレクトリに対する相対パスと解釈される。"
11246
11247 #. type: Plain text
11248 #: build/C/man2/symlink.2:140
11249 msgid "If I<linkpath> is absolute, then I<newdirfd> is ignored."
11250 msgstr "I<linkpath> で指定されたパス名が絶対パスの場合、 I<newdirfd> は無視される。"
11251
11252 #. type: Plain text
11253 #: build/C/man2/symlink.2:155
11254 msgid "Write access to the directory containing I<linkpath> is denied, or one of the directories in the path prefix of I<linkpath> did not allow search permission.  (See also B<path_resolution>(7).)"
11255 msgstr "I<linkpath> を含んでいるディレクトリへの書き込みが拒否されたか、 I<linkpath> に含まれているディレクトリのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照すること)。"
11256
11257 #. type: Plain text
11258 #: build/C/man2/symlink.2:160
11259 msgid "The user's quota of resources on the filesystem has been exhausted.  The resources could be inodes or disk blocks, depending on the filesystem implementation."
11260 msgstr "そのファイルシステムのリソース使用量がユーザクォータに達している。対象となるリソースは inode かディスクブロックで、どちらになるかはファイルシステムの実装依存である。"
11261
11262 #. type: Plain text
11263 #: build/C/man2/symlink.2:164
11264 msgid "I<linkpath> already exists."
11265 msgstr "I<linkpath> が既に存在する。"
11266
11267 #. type: Plain text
11268 #: build/C/man2/symlink.2:167
11269 msgid "I<target> or I<linkpath> points outside your accessible address space."
11270 msgstr "I<target> や I<linkpath> がアクセス可能なアドレス空間の外を指している。"
11271
11272 #. type: Plain text
11273 #: build/C/man2/symlink.2:174
11274 msgid "Too many symbolic links were encountered in resolving I<linkpath>."
11275 msgstr "I<linkpath> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
11276
11277 #. type: Plain text
11278 #: build/C/man2/symlink.2:177
11279 msgid "I<target> or I<linkpath> was too long."
11280 msgstr "I<target> または I<linkpath> が長過ぎる。"
11281
11282 #. type: Plain text
11283 #: build/C/man2/symlink.2:184
11284 msgid "A directory component in I<linkpath> does not exist or is a dangling symbolic link, or I<target> is the empty string."
11285 msgstr "I<linkpath> に含まれるディレクトリ部分が存在しないか、壊れたリンクであるか、 I<target> が空文字列である。"
11286
11287 #. type: Plain text
11288 #: build/C/man2/symlink.2:196
11289 msgid "A component used as a directory in I<linkpath> is not, in fact, a directory."
11290 msgstr "I<linkpath> に含まれるディレクトリ部分が、実際には、ディレクトリではない。"
11291
11292 #. type: Plain text
11293 #: build/C/man2/symlink.2:201
11294 msgid "The filesystem containing I<linkpath> does not support the creation of symbolic links."
11295 msgstr "I<linkpath> を含んでいるファイルシステム (file system) が シンボリックリンクの作成をサポートしていない。"
11296
11297 #. type: Plain text
11298 #: build/C/man2/symlink.2:205
11299 msgid "I<linkpath> is on a read-only filesystem."
11300 msgstr "I<linkpath> が読み込み専用のファイルシステムに存在している。"
11301
11302 #. type: Plain text
11303 #: build/C/man2/symlink.2:208
11304 msgid "The following additional errors can occur for B<symlinkat>():"
11305 msgstr "B<symlinkat>() では以下のエラーも発生する。"
11306
11307 #. type: Plain text
11308 #: build/C/man2/symlink.2:212
11309 msgid "I<newdirfd> is not a valid file descriptor."
11310 msgstr "I<newdirfd> が有効なファイルディスクリプタでない。"
11311
11312 #. type: Plain text
11313 #: build/C/man2/symlink.2:218
11314 msgid "I<linkpath> is a relative pathname and I<newdirfd> refers to a directory that has been deleted."
11315 msgstr "I<linkpath> が相対パス名で、 I<newdirfd> が削除されたディレクトリを参照している。"
11316
11317 #. type: Plain text
11318 #: build/C/man2/symlink.2:224
11319 msgid "I<linkpath> is relative and I<newdirfd> is a file descriptor referring to a file other than a directory."
11320 msgstr "I<linkpath> が相対パスで、 I<newdirfd> がディレクトリ以外のファイルを参照しているファイルディスクリプタである。"
11321
11322 #. type: Plain text
11323 #: build/C/man2/symlink.2:228
11324 msgid "B<symlinkat>()  was added to Linux in kernel 2.6.16; library support was added to glibc in version 2.4."
11325 msgstr "B<symlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポートはバージョン 2.4 で glibc に追加された。"
11326
11327 #.  SVr4 documents additional error codes EDQUOT and ENOSYS.
11328 #.  See
11329 #.  .BR open (2)
11330 #.  re multiple files with the same name, and NFS.
11331 #. type: Plain text
11332 #: build/C/man2/symlink.2:235
11333 msgid "B<symlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
11334 msgstr "B<symlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
11335
11336 #. type: Plain text
11337 #: build/C/man2/symlink.2:238
11338 msgid "B<symlinkat>(): POSIX.1-2008."
11339 msgstr "B<symlinkat>(): POSIX.1-2008."
11340
11341 #. type: Plain text
11342 #: build/C/man2/symlink.2:242
11343 msgid "No checking of I<target> is done."
11344 msgstr "I<target> についてのチェックは行なわれない。"
11345
11346 #. type: Plain text
11347 #: build/C/man2/symlink.2:247
11348 msgid "Deleting the name referred to by a symbolic link will actually delete the file (unless it also has other hard links).  If this behavior is not desired, use B<link>(2)."
11349 msgstr "シンボリックリンクによって参照される名前を削除すると (それが他にハードリンク (hard link) を持たなければ) 実際にファイルが削除される。 この動作が望んだものでない場合は、 B<link>(2)  を使用すること。"
11350
11351 #. type: Plain text
11352 #: build/C/man2/symlink.2:260
11353 msgid "On older kernels where B<symlinkat>()  is unavailable, the glibc wrapper function falls back to the use of B<symlink>(2).  When I<linkpath> is a relative pathname, glibc constructs a pathname based on the symbolic link in I</proc/self/fd> that corresponds to the I<newdirfd> argument."
11354 msgstr "B<symlinkat>() が利用できない古いカーネルでは、 glibc ラッパー関数は B<symlink>(2) を使用するモードにフォールバックする。 I<pathname> が相対パスの場合、 glibc は I<newdirfd> 引き数に対応する I</proc/self/fd> のシンボリックリンクに基づいてパス名を構成する。"
11355
11356 #. type: Plain text
11357 #: build/C/man2/symlink.2:271
11358 msgid "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), B<rename>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
11359 msgstr "B<ln>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<open>(2), B<readlink>(2), B<rename>(2), B<unlink>(2), B<path_resolution>(7), B<symlink>(7)"
11360
11361 #. type: TH
11362 #: build/C/man7/symlink.7:37
11363 #, no-wrap
11364 msgid "2014-04-06"
11365 msgstr "2014-04-06"
11366
11367 #. type: Plain text
11368 #: build/C/man7/symlink.7:40
11369 msgid "symlink - symbolic link handling"
11370 msgstr "symlink - シンボリックリンクの取り扱い"
11371
11372 #. type: Plain text
11373 #: build/C/man7/symlink.7:44
11374 msgid "Symbolic links are files that act as pointers to other files.  To understand their behavior, you must first understand how hard links work."
11375 msgstr "シンボリックリンクは他のファイルへのポインタとして振る舞うファイルである。 その挙動を理解するには、まずハードリンクがどのように機能するかを理解しておかなければならない。"
11376
11377 #. type: Plain text
11378 #: build/C/man7/symlink.7:60
11379 msgid "A hard link to a file is indistinguishable from the original file because it is a reference to the object underlying the original filename.  (To be precise: each of the hard links to a file is a reference to the same I<inode number>, where an inode number is an index into the inode table, which contains metadata about all files on a filesystem.  See B<stat>(2).)  Changes to a file are independent of the name used to reference the file.  Hard links may not refer to directories (to prevent the possibility of loops within the filesystem tree, which would confuse many programs)  and may not refer to files on different filesystems (because inode numbers are not unique across filesystems)."
11380 msgstr "あるファイルへのハードリンクは、 元々のファイルと区別することができない。 なぜなら、 ハードリンクは元々のファイル名の裏にあるオブジェクトへの参照だからである。 (より正確には、 あるファイルへのハードリンクはそれぞれ同じ I<inode 番号> への参照である。 inode 番号は inode テーブルへのインデックスで、 inode テーブルはファイルシステム上のすべてのファイルについてのメタデータを保持している。 B<stat>(2) 参照。) ファイルへの変更は、ファイルの参照に使用された名前とは独立に行われる。 ハードリンクはディレクトリを参照することはできない (これはファイルシステムツリー内でループが発生する可能性を防止するためであり、 ループが発生すると、 多くのプログラムが混乱してしまうことだろう)。 また、 ハードリンクは異なるファイルシステム上のファイルを参照することもできない (inode 番号はファイルシステムをまたがると一意ではないからである)。"
11381
11382 #. type: Plain text
11383 #: build/C/man7/symlink.7:69
11384 msgid "A symbolic link is a special type of file whose contents are a string that is the pathname of another file, the file to which the link refers.  (The contents of a symbolic link can be read using B<readlink>(2).)  In other words, a symbolic link is a pointer to another name, and not to an underlying object.  For this reason, symbolic links may refer to directories and may cross filesystem boundaries."
11385 msgstr "シンボリックリンクは特別な種類のファイルで、 ファイルの内容はそのリンクの参照先の別のファイルのパス名を示す文字列である (シンボリックリンクの内容は B<readlink>(2) を使って読むことができる)。 言い換えると、 シンボリックリンクは別の名前へのポインタであり、 ファイルの裏にあるオブジェクトへのポインタではない。 この理由から、 シンボリックリンクではディレクトリへの参照やファイルシステム境界を越える参照を行うことができる。"
11386
11387 #. type: Plain text
11388 #: build/C/man7/symlink.7:75
11389 msgid "There is no requirement that the pathname referred to by a symbolic link should exist.  A symbolic link that refers to a pathname that does not exist is said to be a I<dangling link>."
11390 msgstr "シンボリックリンクが参照する先のパス名が存在しないといけないという要件はない。 存在しないパス名を参照するシンボリックリンクは「壊れた (dangling) リンク」と呼ばれる。"
11391
11392 #. type: Plain text
11393 #: build/C/man7/symlink.7:87
11394 msgid "Because a symbolic link and its referenced object coexist in the filesystem name space, confusion can arise in distinguishing between the link itself and the referenced object.  On historical systems, commands and system calls adopted their own link-following conventions in a somewhat ad-hoc fashion.  Rules for a more uniform approach, as they are implemented on Linux and other systems, are outlined here.  It is important that site-local applications also conform to these rules, so that the user interface can be as consistent as possible."
11395 msgstr "シンボリックリンクとその参照先のオブジェクトは一つのファイルシステムの名前空間内に共存するので、 リンクそのものと参照先のオブジェクトの間で混乱が生じる可能性がある。 かなり昔からあるシステムでは、 コマンドやシステムコールはいくらかアドホックな方法の独自のリンクの辿り方の決まり事を採用している。 ここでは、 Linux や他のシステムで実装されている、 もっと広く使われている方法のルールについて概要を説明する。 サイト固有のアプリケーションもこれらのルールに準拠し、 可能な限りユーザインターフェースが一貫したものになるようにすることが重要である。"
11396
11397 #. type: SS
11398 #: build/C/man7/symlink.7:87
11399 #, no-wrap
11400 msgid "Symbolic link ownership, permissions, and timestamps"
11401 msgstr "シンボリックリンクの所有権、アクセス許可、タイムスタンプ"
11402
11403 #. type: Plain text
11404 #: build/C/man7/symlink.7:95
11405 msgid "The owner and group of an existing symbolic link can be changed using B<lchown>(2).  The only time that the ownership of a symbolic link matters is when the link is being removed or renamed in a directory that has the sticky bit set (see B<stat>(2))."
11406 msgstr "既存のシンボリックリンクの所有者とグループは B<lchown>(2) を使って変更することができる。 シンボリックリンクの所有権が問題となる場面は、 スティッキービット (B<stat>(2) 参照) がセットされたディレクトリで、 そのリンクの削除や名前の変更を行おうとしている場合だけである。"
11407
11408 #. type: Plain text
11409 #: build/C/man7/symlink.7:101
11410 msgid "The last access and last modification timestamps of a symbolic link can be changed using B<utimensat>(2)  or B<lutimes>(3)."
11411 msgstr "シンボリックリンクの最終アクセス時刻と最終修正時刻は B<utimensat>(2) や B<lutimes>(3) で変更できる。"
11412
11413 #.  Linux does not currently implement an lchmod(2).
11414 #.  The
11415 #.  4.4BSD
11416 #.  system differs from historical
11417 #.  4BSD
11418 #.  systems in that the system call
11419 #.  .BR chown (2)
11420 #.  has been changed to follow symbolic links.
11421 #.  The
11422 #.  .BR lchown (2)
11423 #.  system call was added later when the limitations of the new
11424 #.  .BR chown (2)
11425 #.  became apparent.
11426 #. type: Plain text
11427 #: build/C/man7/symlink.7:120
11428 msgid "On Linux, the permissions of a symbolic link are not used in any operations; the permissions are always 0777 (read, write, and execute for all user categories), and can't be changed."
11429 msgstr "Linux では、シンボリックリンクのアクセス許可 (permission) はどの操作でも使用されない。 アクセス許可は常に 0777 (すべてのユーザカテゴリにおいて読み出し、書き込み、実行が可能) で、変更できない。"
11430
11431 #. type: SS
11432 #: build/C/man7/symlink.7:120
11433 #, no-wrap
11434 msgid "Obtaining a file descriptor that refers to a symbolic link"
11435 msgstr "シンボリックリンクを参照するファイルディスクリプタを取得する"
11436
11437 #. type: Plain text
11438 #: build/C/man7/symlink.7:138
11439 msgid "Using the combination of the B<O_PATH> and B<O_NOFOLLOW> flags to B<open>(2)  yields a file descriptor that can be passed as the I<dirfd> argument in system calls such as B<fstatat>(2), B<fchownat>(2), B<fchmodat>(2), B<linkat>(2), and B<readlinkat>(2), in order to operate on the symbolic link itself (rather than the file to which it refers)."
11440 msgstr "B<open>(2) に B<O_PATH> と B<O_NOFOLLOW> の両方のフラグを指定すると、ファイルディスクリプターが得られる。このファイルディスクリプターは B<fstatat>(2), B<fchownat>(2), B<fchmodat>(2), B<linkat> (2), B<readlinkat>(2) などのシステムコールの I<dirfd> 引き数として渡して、 (シンボリックリンクが参照するファイルではなく) シンボリックリンク自身に対する操作を行うことができる。"
11441
11442 #. type: Plain text
11443 #: build/C/man7/symlink.7:154
11444 msgid "By default (i.e., if the B<AT_SYMLINK_FOLLOW> flag is not specified), if B<name_to_handle_at>(2)  is applied to a symbolic link, it yields a handle for the symbolic link (rather than the file to which it refers).  One can then obtain a file descriptor for the symbolic link (rather than the file to which it refers)  by specifying the B<O_PATH> flag in a subsequent call to B<open_by_handle_at>(2).  Again, that file descriptor can be used in the aforementioned system calls to operate on the symbolic link itself."
11445 msgstr "デフォルトでは (すなわち B<AT_SYMLINK_FOLLOW> フラグが指定されなかった場合)、 B<name_to_handle_at>(2) がシンボリックリンクに適用された場合、 (シンボリックリンクが参照するファイルではなく) シンボリックリンクへのハンドルが返される。 それ以降の B<open_by_handle_at>(2) で B<O_PATH> フラグを指定することで、 (シンボリックリンクが参照するファイルではなく) シンボリックリンクに対するファイルディスクリプターを得ることができる。 繰り返しになるが、 このファイルディスクリプターを上述のシステムコールで使用し、 シンボリックリンク自身に操作を行うことができる。"
11446
11447 #. type: SS
11448 #: build/C/man7/symlink.7:154
11449 #, no-wrap
11450 msgid "Handling of symbolic links by system calls and commands"
11451 msgstr "システムコールやコマンドによるシンボリックリンクの取り扱い"
11452
11453 #. type: Plain text
11454 #: build/C/man7/symlink.7:169
11455 msgid "Symbolic links are handled either by operating on the link itself, or by operating on the object referred to by the link.  In the latter case, an application or system call is said to I<follow> the link.  Symbolic links may refer to other symbolic links, in which case the links are dereferenced until an object that is not a symbolic link is found, a symbolic link that refers to a file which does not exist is found, or a loop is detected.  (Loop detection is done by placing an upper limit on the number of links that may be followed, and an error results if this limit is exceeded.)"
11456 msgstr "シンボリックリンクは、 リンク自身に対する操作か、 リンクが参照するオブジェクトに対する操作のいずれかとして扱われる。 後者の場合、 アプリケーションやシステムコールはリンクをI<辿る (follow)>と呼ばれる。 シンボリックリンクは他のシンボリックリンクを参照することもできる。 この場合、 シンボリックリンクでないオブジェクトが見つかるか、 存在しないファイルを参照するシンボリックリンクが見つかるか、 ループが検出されるまで、 リンクの展開が行われる。 (ループの検出は辿ることができるリンクの数に上限を設けることで行われる。 この上限を超過した場合はエラーとなる。)"
11457
11458 #. type: Plain text
11459 #: build/C/man7/symlink.7:172
11460 msgid "There are three separate areas that need to be discussed.  They are as follows:"
11461 msgstr "3 つの領域に分けて議論する必要がある。以下の 3 つである。"
11462
11463 #. type: IP
11464 #: build/C/man7/symlink.7:172
11465 #, no-wrap
11466 msgid "1."
11467 msgstr "1."
11468
11469 #. type: Plain text
11470 #: build/C/man7/symlink.7:174
11471 msgid "Symbolic links used as filename arguments for system calls."
11472 msgstr "システムコールのファイル名引き数としてシンボリックリンクが使用される場合。"
11473
11474 #. type: IP
11475 #: build/C/man7/symlink.7:174
11476 #, no-wrap
11477 msgid "2."
11478 msgstr "2."
11479
11480 #. type: Plain text
11481 #: build/C/man7/symlink.7:177
11482 msgid "Symbolic links specified as command-line arguments to utilities that are not traversing a file tree."
11483 msgstr "ファイルツリーを辿っていないユーティリティーのコマンドライン引き数としてシンボリックリンクが指定される場合。"
11484
11485 #. type: IP
11486 #: build/C/man7/symlink.7:177
11487 #, no-wrap
11488 msgid "3."
11489 msgstr "3."
11490
11491 #. type: Plain text
11492 #: build/C/man7/symlink.7:181
11493 msgid "Symbolic links encountered by utilities that are traversing a file tree (either specified on the command line or encountered as part of the file hierarchy walk)."
11494 msgstr "ファイルツリーを辿っているユーティリティーがシンボリックリンクを見つけた場合 (コマンドラインで指定される場合もあれば、 ファイル階層を辿っている途中で遭遇する場合もある)。"
11495
11496 #. type: SS
11497 #: build/C/man7/symlink.7:181
11498 #, no-wrap
11499 msgid "System calls"
11500 msgstr "システムコール"
11501
11502 #. type: Plain text
11503 #: build/C/man7/symlink.7:184
11504 msgid "The first area is symbolic links used as filename arguments for system calls."
11505 msgstr "最初の領域は、システムコールのファイル名引き数としてシンボリックリンクが使用される場合である。"
11506
11507 #. type: Plain text
11508 #: build/C/man7/symlink.7:194
11509 msgid "Except as noted below, all system calls follow symbolic links.  For example, if there were a symbolic link I<slink> which pointed to a file named I<afile>, the system call I<open(\"slink\" ...\\&)> would return a file descriptor referring to the file I<afile>."
11510 msgstr "以下に述べる場合を除くと、 すべてのシステムコールはシンボリックリンクを辿る。 例えば、 I<afile> という名前のファイルを指しているシンボリックリンク I<slink> があったとすると、 システムコール I<open(\"slink\" ...\\&)> はファイル I<afile> を参照するファイルディスクリプタを返す。"
11511
11512 #. type: Plain text
11513 #: build/C/man7/symlink.7:209
11514 msgid "Various system calls do not follow links, and operate on the symbolic link itself.  They are: B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), B<rmdir>(2), and B<unlink>(2)."
11515 msgstr "リンクを辿らず、シンボリックリンク自身に対して操作を行うシステムコールもある。 このようなシステムコールとしては、 B<lchown>(2), B<lgetxattr>(2), B<llistxattr>(2), B<lremovexattr>(2), B<lsetxattr>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), B<rmdir>(2), B<unlink>(2) がある。"
11516
11517 #.  Maybe one day: .BR fchownat (2)
11518 #. type: Plain text
11519 #: build/C/man7/symlink.7:233
11520 msgid "Certain other system calls optionally follow symbolic links.  They are: B<faccessat>(2), B<fchownat>(2), B<fstatat>(2), B<linkat>(2), B<name_to_handle_at>(2), B<open>(2), B<openat>(2), B<open_by_handle_at>(2), and B<utimensat>(2); see their manual pages for details.  Because B<remove>(3)  is an alias for B<unlink>(2), that library function also does not follow symbolic links.  When B<rmdir>(2)  is applied to a symbolic link, it fails with the error B<ENOTDIR>."
11521 msgstr "他のいくつかのシステムコールは、指定された場合にのみシンボリックリンクを辿る。 これらのシステムコールとしては、 B<faccessat>(2), B<fchownat>(2), B<fstatat>(2), B<linkat>(2), B<name_to_handle_at>(2), B<open>(2), B<openat>(2), B<open_by_handle_at>(2), B<utimensat>(2) がある。 詳細はそれぞれのマニュアルページを参照してほしい。 B<remove>(3) は B<unlink>(2) の別名なので、 このライブラリ関数もシンボリックリンクを辿らない。 B<rmdir>(2) がシンボリックリンクに対して行われた場合、その呼び出しはエラー B<ENOTDIR> で失敗する。"
11522
11523 #. type: Plain text
11524 #: build/C/man7/symlink.7:248
11525 msgid "The B<link>(2)  warrants special discussion.  POSIX.1-2001 specifies that B<link>(2)  should dereference I<oldpath> if it is a symbolic link.  However, Linux does not do this.  (By default Solaris is the same, but the POSIX.1-2001 specified behavior can be obtained with suitable compiler options.)  The upcoming POSIX.1 revision changes the specification to allow either behavior in an implementation."
11526 msgstr "B<link>(2) については特別に議論が必要である。 POSIX.1-2001 では B<link>(2) は I<oldpath> がシンボリックリンクであればこれを展開するように規定している。 しかしながら、 Linux はシンボリックリンクを展開しない。 (デフォルトでは Solaris も同じだが、 適切なコンパイラーオプションを指定することで POSIX.1-2001 で規定された動作をさせることができる。) 今後のバージョンの POSIX.1 では、どちらの動作の実装も認められるように規定が変更される。"
11527
11528 #. type: SS
11529 #: build/C/man7/symlink.7:248
11530 #, no-wrap
11531 msgid "Commands not traversing a file tree"
11532 msgstr "ファイルツリーを辿らないコマンド"
11533
11534 #. type: Plain text
11535 #: build/C/man7/symlink.7:251
11536 msgid "The second area is symbolic links, specified as command-line filename arguments, to commands which are not traversing a file tree."
11537 msgstr "二つ目の領域は、 ファイルツリーを辿らないコマンドの、 コマンドライン引き数のファイル名としてシンボリックリンクが指定される場合である。"
11538
11539 #. type: Plain text
11540 #: build/C/man7/symlink.7:262
11541 msgid "Except as noted below, commands follow symbolic links named as command-line arguments.  For example, if there were a symbolic link I<slink> which pointed to a file named I<afile>, the command I<cat slink> would display the contents of the file I<afile>."
11542 msgstr "以下に述べる場合を除くと、 コマンドはコマンドライン引き数で指定された名前のシンボリックリンクを辿る。 例えば、 I<afile> という名前のファイルを指しているシンボリックリンク I<slink> があったとすると、 コマンド I<cat slink> は I<afile> の内容を表示することになる。"
11543
11544 #. type: Plain text
11545 #: build/C/man7/symlink.7:270
11546 msgid "It is important to realize that this rule includes commands which may optionally traverse file trees; for example, the command I<chown file> is included in this rule, while the command I<chown\\ -R file>, which performs a tree traversal, is not.  (The latter is described in the third area, below.)"
11547 msgstr "大事な点として意識しておくべきなのは、 このルールが適用されるコマンドの中には、 オプション次第ではファイルツリーを辿る場合があるコマンドもあるということである。  例えば、 コマンド I<chown file> はこのルールに含まれるが、 コマンド I<chown\\ -R file> はツリーを辿る動作をするのであてはまらない (後者の場合は、3 つ目の領域に該当する)。"
11548
11549 #. type: Plain text
11550 #: build/C/man7/symlink.7:288
11551 msgid "If it is explicitly intended that the command operate on the symbolic link instead of following the symbolic link\\(emfor example, it is desired that I<chown slink> change the ownership of the file that I<slink> is, whether it is a symbolic link or not\\(emthe I<-h> option should be used.  In the above example, I<chown root slink> would change the ownership of the file referred to by I<slink>, while I<chown\\ -h root slink> would change the ownership of I<slink> itself."
11552 msgstr "シンボリックリンクを辿るのではなく、 コマンドがシンボリックリンク自身に対して操作を行うことを明示的に指示したい場合、 例えば、 I<chown slink> で I<slink> がシンボリックリンクかどうかに関わらず、 I<slink> のファイル自身の所有権を変更したい場合は、 I<-h> オプションを使用すべきである。 上記の例では、 I<chown root slink> は I<slink> が参照するファイルの所有権を変更するが、 I<chown\\ -h root slink> は I<slink> 自身の所有権を変更する。"
11553
11554 #. type: Plain text
11555 #: build/C/man7/symlink.7:290
11556 msgid "There are some exceptions to this rule:"
11557 msgstr "このルールにはいくつかの例外がある。"
11558
11559 #. type: Plain text
11560 #: build/C/man7/symlink.7:300
11561 msgid "The B<mv>(1)  and B<rm>(1)  commands do not follow symbolic links named as arguments, but respectively attempt to rename and delete them.  (Note, if the symbolic link references a file via a relative path, moving it to another directory may very well cause it to stop working, since the path may no longer be correct.)"
11562 msgstr "コマンド B<mv>(1) と B<rm>(1) は引き数で指定された名前のシンボリックリンクを辿らないが、 それぞれシンボリックリンク自身の名前変更と削除を行おうとする。 (シンボリックリンクが相対パスでファイルを参照している場合、 そのシンボリックリンクを別のディレクトリに移動すると、動かなくなることが非常によくある。 移動の結果、 パスが正しくないものになってしまうからである。)"
11563
11564 #. type: Plain text
11565 #: build/C/man7/symlink.7:330
11566 msgid "The B<ls>(1)  command is also an exception to this rule.  For compatibility with historic systems (when B<ls>(1)  is not doing a tree walk\\(emthat is, I<-R> option is not specified), the B<ls>(1)  command follows symbolic links named as arguments if the I<-H> or I<-L> option is specified, or if the I<-F>, I<-d>, or I<-l> options are not specified.  (The B<ls>(1)  command is the only command where the I<-H> and I<-L> options affect its behavior even though it is not doing a walk of a file tree.)"
11567 msgstr "B<ls>(1) コマンドもこのルールの例外である。 昔からあるシステムとの互換性のため (B<ls>(1) がツリーを辿らない場合、つまり I<-R> オプションが指定されなかった場合)、 B<ls>(1) コマンドはオプション I<-H> か I<-L> が指定された場合、もしくはオプション I<-F>, I<-d>, I<-l> が指定されなかった場合、 引き数として指定されたシンボリックリンクを辿る。 (B<ls>(1) コマンドは、 ファイルツリーを辿らない場合であっても、 オプション I<-H> と I<-L> がその動作に影響を与える唯一のコマンドである。)"
11568
11569 #. The 4.4BSD system differs from historical 4BSD systems in that the
11570 #. .BR chown (1)
11571 #. and
11572 #. .BR chgrp (1)
11573 #. commands follow symbolic links specified on the command line.
11574 #. type: Plain text
11575 #: build/C/man7/symlink.7:348
11576 msgid "The B<file>(1)  command is also an exception to this rule.  The B<file>(1)  command does not follow symbolic links named as argument by default.  The B<file>(1)  command does follow symbolic links named as argument if the I<-L> option is specified."
11577 msgstr "B<file>(1) コマンドもこのルールの例外である。 B<file>(1) コマンドは、 デフォルトでは引き数で指定されたシンボリックリンクを辿らない。 B<file>(1) コマンドは、 I<-L> オプションが指定された場合、 引き数で指定されたシンボリックリンクを辿る。"
11578
11579 #. type: SS
11580 #: build/C/man7/symlink.7:348
11581 #, no-wrap
11582 msgid "Commands traversing a file tree"
11583 msgstr "ファイルツリーを辿るコマンド"
11584
11585 #. type: Plain text
11586 #: build/C/man7/symlink.7:361
11587 msgid "The following commands either optionally or always traverse file trees: B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>(1), B<pax>(1), B<rm>(1), and B<tar>(1)."
11588 msgstr "次のコマンドは指定された場合もしくは常にファイルツリーを辿る: B<chgrp>(1), B<chmod>(1), B<chown>(1), B<cp>(1), B<du>(1), B<find>(1), B<ls>(1), B<pax>(1), B<rm>(1), B<tar>(1)。"
11589
11590 #. type: Plain text
11591 #: build/C/man7/symlink.7:365
11592 msgid "It is important to realize that the following rules apply equally to symbolic links encountered during the file tree traversal and symbolic links listed as command-line arguments."
11593 msgstr "重要なのは、 ファイルツリーを辿っている際に見つかったシンボリックリンクにも、 コマンドライン引き数として渡されたシンボリックリンクにも、 以下のルールが等しく適用される点である。"
11594
11595 #. type: Plain text
11596 #: build/C/man7/symlink.7:370
11597 msgid "The I<first rule> applies to symbolic links that reference files other than directories.  Operations that apply to symbolic links are performed on the links themselves, but otherwise the links are ignored."
11598 msgstr "「1 つ目のルール」は、 ディレクトリ以外のファイルを参照するシンボリックリンクに適用される。 シンボリックリンクに適用される操作はシンボリックリンク自身に行われるが、 そうでない場合はリンクは無視される。"
11599
11600 #. type: Plain text
11601 #: build/C/man7/symlink.7:382
11602 msgid "The command I<rm\\ -r slink directory> will remove I<slink>, as well as any symbolic links encountered in the tree traversal of I<directory>, because symbolic links may be removed.  In no case will B<rm>(1)  affect the file referred to by I<slink>."
11603 msgstr "コマンド I<rm\\ -r slink directory> は I<slink> を削除するとともに、 ファイルツリーを辿る途中で見つけたシンボリックリンクも削除する。 シンボリックリンクは削除できるからである。 B<rm>(1) が I<slink> が参照するファイルに影響をおよぼすことはない。"
11604
11605 #. type: Plain text
11606 #: build/C/man7/symlink.7:387
11607 msgid "The I<second rule> applies to symbolic links that refer to directories.  Symbolic links that refer to directories are never followed by default.  This is often referred to as a \"physical\" walk, as opposed to a \"logical\" walk (where symbolic links the refer to directories are followed)."
11608 msgstr "「2 つ目のルール」は、 ディレクトリを参照するシンボリックリンクに適用される。 デフォルトでは、 ディレクトリを参照するシンボリックリンクを辿らない。 この動作はしばしば「物理的な」ツリー探索 (\"physical\" walk) と呼ばれる。 これに対して (ディレクトリを参照するシンボリックリンクを辿る場合は) 「論理的な」ツリー探索 (\"logical\" walk) と呼ばれる。"
11609
11610 #. type: Plain text
11611 #: build/C/man7/symlink.7:390
11612 msgid "Certain conventions are (should be) followed as consistently as possible by commands that perform file tree walks:"
11613 msgstr "一貫性を持たせるため、ファイルツリーを辿るコマンドが可能な限り従っている慣習がいくつかある。"
11614
11615 #. type: Plain text
11616 #: build/C/man7/symlink.7:403
11617 msgid "A command can be made to follow any symbolic links named on the command line, regardless of the type of file they reference, by specifying the I<-H> (for \"half-logical\") flag.  This flag is intended to make the command-line name space look like the logical name space.  (Note, for commands that do not always do file tree traversals, the I<-H> flag will be ignored if the I<-R> flag is not also specified.)"
11618 msgstr "I<-H> (\"half-logical\") フラグを指定すると、 参照先のファイル種別に関わらず、 コマンドにコマンドラインで指定されたシンボリックリンクを辿らせることができる。 このフラグは、 コマンドラインの名前空間を論理的な名前空間のように見せるためのものである。 (常にファイルツリーを辿るわけではないコマンドでは、 I<-R> フラグを一緒に指定しない限り、 I<-H> フラグは無視される点に注意。)"
11619
11620 #. type: Plain text
11621 #: build/C/man7/symlink.7:419
11622 msgid "For example, the command I<chown\\ -HR user slink> will traverse the file hierarchy rooted in the file pointed to by I<slink>.  Note, the I<-H> is not the same as the previously discussed I<-h> flag.  The I<-H> flag causes symbolic links specified on the command line to be dereferenced for the purposes of both the action to be performed and the tree walk, and it is as if the user had specified the name of the file to which the symbolic link pointed."
11623 msgstr "例えば、 コマンド I<chown\\ -HR user slink> は I<slink> が指すファイルを頂点とするファイル階層を辿る。 I<-H> は上記で説明した I<-h> フラグとは同じではないことに注意。 I<-H> フラグを指定すると、 アクションを実行する場合でも、 ツリーを辿る場合でも、 コマンドラインで指定されたシンボリックリンクの解決 (dereference) を行う。 ユーザーがシンボリックリンクが指すファイル名を指定したのと同じように見える。"
11624
11625 #. type: Plain text
11626 #: build/C/man7/symlink.7:433
11627 msgid "A command can be made to follow any symbolic links named on the command line, as well as any symbolic links encountered during the traversal, regardless of the type of file they reference, by specifying the I<-L> (for \"logical\") flag.  This flag is intended to make the entire name space look like the logical name space.  (Note, for commands that do not always do file tree traversals, the I<-L> flag will be ignored if the I<-R> flag is not also specified.)"
11628 msgstr "I<-L> (\"logical\") フラグを指定すると、 参照先のファイル種別に関わらず、 コマンドが、 コマンドラインで指定された名前のシンボリックリンクも、 ファイルツリーを辿る際に見つけたシンボリックリンクも辿るようになる。 このフラグは、 名前空間全体を論理的な名前空間のように見せるためのものである。 (常にファイルツリーを辿るわけではないコマンドでは、 I<-R> フラグを一緒に指定しない限り、 I<-L> フラグは無視される点に注意。)"
11629
11630 #. type: Plain text
11631 #: build/C/man7/symlink.7:448
11632 msgid "For example, the command I<chown\\ -LR user slink> will change the owner of the file referred to by I<slink>.  If I<slink> refers to a directory, B<chown> will traverse the file hierarchy rooted in the directory that it references.  In addition, if any symbolic links are encountered in any file tree that B<chown> traverses, they will be treated in the same fashion as I<slink>."
11633 msgstr ""
11634 "例えば、 コマンド I<chown\\ -LR user slink> は I<slink> が参照するファイルの所有者を変更する。\n"
11635 "I<slink> がディレクトリを参照する場合、 B<chown> はそのシンボリックリンクが参照するディレクトリを頂点とするファイル階層を辿る。 また、 B<chown> が辿るファイルツリー内でシンボリックリンクが見つかった場合、 I<slink> と同じように処理される。"
11636
11637 #. type: Plain text
11638 #: build/C/man7/symlink.7:455
11639 msgid "A command can be made to provide the default behavior by specifying the I<-P> (for \"physical\") flag.  This flag is intended to make the entire name space look like the physical name space."
11640 msgstr "I<-P> (\"physical\") フラグを指定すると、 コマンドはデフォルトの動作をするようになる。 このフラグは名前空間全体を物理的な名前空間のように見せるためのものである。"
11641
11642 #. type: Plain text
11643 #: build/C/man7/symlink.7:473
11644 msgid "For commands that do not by default do file tree traversals, the I<-H>, I<-L>, and I<-P> flags are ignored if the I<-R> flag is not also specified.  In addition, you may specify the I<-H>, I<-L>, and I<-P> options more than once; the last one specified determines the command's behavior.  This is intended to permit you to alias commands to behave one way or the other, and then override that behavior on the command line."
11645 msgstr "デフォルトでファイルツリーを辿らないコマンドでは、 I<-R> フラグが同時に指定されなかった場合、 フラグ I<-H>, I<-L>, I<-P> は無視される。 また、 I<-H>, I<-L>, I<-P> は複数回同時に指定できるが、 最後に指定されたオプションでコマンドの動作が決定される。 この動作は、 コマンドのエイリアスにある動作を指定しておいて、 コマンドラインでその動作を上書きできるようにするためである。"
11646
11647 #. type: Plain text
11648 #: build/C/man7/symlink.7:479
11649 msgid "The B<ls>(1)  and B<rm>(1)  commands have exceptions to these rules:"
11650 msgstr "コマンド B<ls>(1) と B<rm>(1) には、 これらのルールに対する例外がある。"
11651
11652 #. type: Plain text
11653 #: build/C/man7/symlink.7:492
11654 msgid "The B<rm>(1)  command operates on the symbolic link, and not the file it references, and therefore never follows a symbolic link.  The B<rm>(1)  command does not support the I<-H>, I<-L>, or I<-P> options."
11655 msgstr "B<rm>(1) コマンドは、 参照先のファイルではなく、シンボリックリンクに対して操作を行う。 したがって、 シンボリックリンクを辿ることはない。 B<rm>(1) コマンドはオプション I<-H>, I<-L>, I<-P> をサポートしていない。"
11656
11657 #. type: Plain text
11658 #: build/C/man7/symlink.7:512
11659 msgid "To maintain compatibility with historic systems, the B<ls>(1)  command acts a little differently.  If you do not specify the I<-F>, I<-d> or I<-l> options, B<ls>(1)  will follow symbolic links specified on the command line.  If the I<-L> flag is specified, B<ls>(1)  follows all symbolic links, regardless of their type, whether specified on the command line or encountered in the tree walk."
11660 msgstr "古いシステムとの互換性を持たせるため、 B<ls>(1) コマンドは少し違った動作をする。 オプション I<-F>, I<-d>, I<-l> を指定した場合、 B<ls>(1) はコマンドラインで指定されたシンボリックリンクを辿る。 I<-L> フラグが指定された場合、 コマンドラインで指定された場合でも、 ファイルツリーを辿る際に見つかった場合でも、 ファイル種別に関わらず、 B<ls>(1) はすべてのシンボリックリンクを辿る。"
11661
11662 #. type: Plain text
11663 #: build/C/man7/symlink.7:530
11664 msgid "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1), B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2), B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2), B<lutimes>(3), B<path_resolution>(7)"
11665 msgstr ""
11666 "B<chgrp>(1), B<chmod>(1), B<find>(1), B<ln>(1), B<ls>(1), B<mv>(1),\n"
11667 "B<rm>(1), B<lchown>(2), B<link>(2), B<lstat>(2), B<readlink>(2),\n"
11668 "B<rename>(2), B<symlink>(2), B<unlink>(2), B<utimensat>(2),\n"
11669 "B<lutimes>(3), B<path_resolution>(7)"
11670
11671 #. type: TH
11672 #: build/C/man3/tempnam.3:25
11673 #, no-wrap
11674 msgid "TEMPNAM"
11675 msgstr "TEMPNAM"
11676
11677 #. type: TH
11678 #: build/C/man3/tempnam.3:25 build/C/man3/tmpnam.3:27
11679 #, no-wrap
11680 msgid "2014-02-27"
11681 msgstr "2014-02-27"
11682
11683 #. type: Plain text
11684 #: build/C/man3/tempnam.3:28
11685 msgid "tempnam - create a name for a temporary file"
11686 msgstr "tempnam - テンポラリファイルの名前を作成する"
11687
11688 #. type: Plain text
11689 #: build/C/man3/tempnam.3:33
11690 #, no-wrap
11691 msgid "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
11692 msgstr "B<char *tempnam(const char *>I<dir>B<, const char *>I<pfx>B<);>\n"
11693
11694 #. type: Plain text
11695 #: build/C/man3/tempnam.3:42
11696 msgid "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
11697 msgstr "B<tempnam>(): _BSD_SOURCE || _SVID_SOURCE"
11698
11699 #. type: Plain text
11700 #: build/C/man3/tempnam.3:49
11701 msgid "I<Never use this function.> Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
11702 msgstr "I<決してこの関数を使用しないこと。> 代わりに B<mkstemp>(3)  か B<tmpfile>(3) を使うこと。"
11703
11704 #. type: Plain text
11705 #: build/C/man3/tempnam.3:63
11706 msgid "The B<tempnam>()  function returns a pointer to a string that is a valid filename, and such that a file with this name did not exist when B<tempnam>()  checked.  The filename suffix of the pathname generated will start with I<pfx> in case I<pfx> is a non-NULL string of at most five bytes.  The directory prefix part of the pathname generated is required to be \"appropriate\" (often that at least implies writable)."
11707 msgstr "B<tempnam>()  関数はファイル名として正しい文字列へのポインタを返す。 このファイル名を持つファイルは、 B<tempnam>()  がチェックした時点においては存在しない (しなかった)。 I<pfx> が NULL でない 5 バイト以内の文字列であれば、 生成されるパス名のうちのファイル名の部分は I<pfx> から始まるものになる。 生成されるディレクトリの部分は、「適切」でなければならない (大抵の場合、「適切」であるためにはまず少なくとも 書き込み可能でなければならない)。"
11708
11709 #. type: Plain text
11710 #: build/C/man3/tempnam.3:66
11711 msgid "Attempts to find an appropriate directory go through the following steps:"
11712 msgstr "適切なディレクトリの探索は、以下の手順にしたがって行われる。"
11713
11714 #. type: TP
11715 #: build/C/man3/tempnam.3:66
11716 #, no-wrap
11717 msgid "a)"
11718 msgstr "a)"
11719
11720 #. type: Plain text
11721 #: build/C/man3/tempnam.3:72
11722 msgid "In case the environment variable B<TMPDIR> exists and contains the name of an appropriate directory, that is used."
11723 msgstr "環境変数 B<TMPDIR> が設定されていて、 その内容が適切なディレクトリの名前なら、それを用いる。"
11724
11725 #. type: TP
11726 #: build/C/man3/tempnam.3:72
11727 #, no-wrap
11728 msgid "b)"
11729 msgstr "b)"
11730
11731 #. type: Plain text
11732 #: build/C/man3/tempnam.3:77
11733 msgid "Otherwise, if the I<dir> argument is non-NULL and appropriate, it is used."
11734 msgstr "それ以外の場合、 I<dir> 引き数が NULL でない文字列でかつ適切なら、それを用いる。"
11735
11736 #. type: TP
11737 #: build/C/man3/tempnam.3:77
11738 #, no-wrap
11739 msgid "c)"
11740 msgstr "c)"
11741
11742 #. type: Plain text
11743 #: build/C/man3/tempnam.3:84
11744 msgid "Otherwise, I<P_tmpdir> (as defined in I<E<lt>stdio.hE<gt>>)  is used when appropriate."
11745 msgstr "それ以外の場合、 (I<E<lt>stdio.hE<gt>> で定義されている)  I<P_tmpdir> が適切なら、それを用いる。"
11746
11747 #. type: TP
11748 #: build/C/man3/tempnam.3:84
11749 #, no-wrap
11750 msgid "d)"
11751 msgstr "d)"
11752
11753 #. type: Plain text
11754 #: build/C/man3/tempnam.3:87
11755 msgid "Finally an implementation-defined directory may be used."
11756 msgstr "最後に実装で定義されたディレクトリが用いられることになる。"
11757
11758 #. type: Plain text
11759 #: build/C/man3/tempnam.3:94
11760 msgid "The string returned by B<tempnam>()  is allocated using B<malloc>(3)  and hence should be freed by B<free>(3)."
11761 msgstr "B<tempnam>()  が返す文字列は B<malloc>(3)  を使って確保される。そのため、 B<free>(3)  で解放すべきである。"
11762
11763 #. type: Plain text
11764 #: build/C/man3/tempnam.3:101
11765 msgid "On success, the B<tempnam>()  function returns a pointer to a unique temporary filename.  It returns NULL if a unique name cannot be generated, with I<errno> set to indicate the cause of the error."
11766 msgstr "成功すると B<tempnam>()  関数は、一意なテンポラリファイル名へのポインタを返す。 一意な名前が生成できなければ NULL を返し、 I<errno> にエラーの原因を示す値を設定する。"
11767
11768 #. type: Plain text
11769 #: build/C/man3/tempnam.3:105
11770 msgid "Allocation of storage failed."
11771 msgstr "保存領域の割り当てに失敗した。"
11772
11773 #. type: Plain text
11774 #: build/C/man3/tempnam.3:110
11775 msgid "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 marks B<tempnam>()  as obsolete."
11776 msgstr "SVr4, 4.3BSD, POSIX.1-2001.  POSIX.1-2008 は B<tempnam>()  を廃止予定としている。"
11777
11778 #. type: Plain text
11779 #: build/C/man3/tempnam.3:129
11780 msgid "Although B<tempnam>()  generates names that are difficult to guess, it is nevertheless possible that between the time that B<tempnam>()  returns a pathname, and the time that the program opens it, another program might create that pathname using B<open>(2), or create it as a symbolic link.  This can lead to security holes.  To avoid such possibilities, use the B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use B<mkstemp>(3)  or B<tmpfile>(3)."
11781 msgstr "B<tempnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tempnam>()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリックリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラグを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や B<tmpfile>(3)  を使うことである。"
11782
11783 #. type: Plain text
11784 #: build/C/man3/tempnam.3:137
11785 msgid "SUSv2 does not mention the use of B<TMPDIR>; glibc will use it only when the program is not set-user-ID.  On SVr4, the directory used under B<d)> is I</tmp> (and this is what glibc does)."
11786 msgstr "SUSv2 では B<TMPDIR> に付いて言及されていない。 glibc は、プログラムが set-user-ID されていない場合に限ってこれを用いる。 SVr4 では B<d)> で使用されるディレクトリを I</tmp> と定めている (glibc もこの通りである)。"
11787
11788 #. type: Plain text
11789 #: build/C/man3/tempnam.3:142
11790 msgid "Because it dynamically allocates memory used to return the pathname, B<tempnam>()  is reentrant, and thus thread safe, unlike B<tmpnam>(3)."
11791 msgstr "パス名を返すのに使用するメモリを動的に確保するので、 B<tmpnam>(3)  と違い、 B<tempnam>()  はリエントラントであり、スレッドセーフである。"
11792
11793 #. type: Plain text
11794 #: build/C/man3/tempnam.3:155
11795 msgid "The B<tempnam>()  function generates a different string each time it is called, up to B<TMP_MAX> (defined in I<E<lt>stdio.hE<gt>>)  times.  If it is called more than B<TMP_MAX> times, the behavior is implementation defined."
11796 msgstr "B<tempnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成する (B<TMP_MAX> は I<E<lt>stdio.hE<gt>> で定義されている)。 もし B<TMP_MAX> 回以上呼び出された場合、動作は実装依存である。"
11797
11798 #. type: Plain text
11799 #: build/C/man3/tempnam.3:159
11800 msgid "B<tempnam>()  uses at most the first five bytes from I<pfx>."
11801 msgstr "B<tempnam>()  は最大で I<pfx> の先頭 5 バイトを使用する。"
11802
11803 #. type: Plain text
11804 #: build/C/man3/tempnam.3:165
11805 msgid "The glibc implementation of B<tempnam>()  will fail with the error B<EEXIST> upon failure to find a unique name."
11806 msgstr "他と重ならない名前が見つけられなかった場合、glibc の B<tempnam>()  の実装はエラー B<EEXIST> で失敗する。"
11807
11808 #. type: Plain text
11809 #: build/C/man3/tempnam.3:168
11810 msgid "The precise meaning of \"appropriate\" is undefined; it is unspecified how accessibility of a directory is determined."
11811 msgstr "「適切」という言葉の正確な意味は定義されていない。 ディレクトリに対してどの程度のアクセス権限が必要なのかは指定されていない。"
11812
11813 #. type: Plain text
11814 #: build/C/man3/tempnam.3:173
11815 msgid "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
11816 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tmpfile>(3), B<tmpnam>(3)"
11817
11818 #. type: TH
11819 #: build/C/man3/tmpfile.3:31
11820 #, no-wrap
11821 msgid "TMPFILE"
11822 msgstr "TMPFILE"
11823
11824 #. type: Plain text
11825 #: build/C/man3/tmpfile.3:34
11826 msgid "tmpfile - create a temporary file"
11827 msgstr "tmpfile - テンポラリファイルを作成する"
11828
11829 #. type: Plain text
11830 #: build/C/man3/tmpfile.3:39
11831 #, no-wrap
11832 msgid "B<FILE *tmpfile(void);>\n"
11833 msgstr "B<FILE *tmpfile(void);>\n"
11834
11835 #. type: Plain text
11836 #: build/C/man3/tmpfile.3:47
11837 msgid "The B<tmpfile>()  function opens a unique temporary file in binary read/write (w+b) mode.  The file will be automatically deleted when it is closed or the program terminates."
11838 msgstr "B<tmpfile>()  関数はユニークなテンポラリファイルを バイナリリードライトモード (w+b) でオープンする。 このファイルはクローズ時またはプログラムの終了時に自動的に削除される。"
11839
11840 #. type: Plain text
11841 #: build/C/man3/tmpfile.3:56
11842 msgid "The B<tmpfile>()  function returns a stream descriptor, or NULL if a unique filename cannot be generated or the unique file cannot be opened.  In the latter case, I<errno> is set to indicate the error."
11843 msgstr "B<tmpfile>()  関数はファイルポインタを返すか、 ユニークなファイルが作れなかったかオープンできなかった場合は NULL を返す。 後者の場合、エラーを表す I<errno> を設定する。"
11844
11845 #. type: Plain text
11846 #: build/C/man3/tmpfile.3:60
11847 msgid "Search permission denied for directory in file's path prefix."
11848 msgstr "ファイルのあるディレクトリにサーチのアクセス権 (search permission) がない。"
11849
11850 #. type: Plain text
11851 #: build/C/man3/tmpfile.3:63
11852 msgid "Unable to generate a unique filename."
11853 msgstr "ユニークなファイル名が作成できなかった。"
11854
11855 #. type: Plain text
11856 #: build/C/man3/tmpfile.3:66
11857 msgid "The call was interrupted by a signal."
11858 msgstr "呼び出しがシグナルによって中断された。"
11859
11860 #. type: Plain text
11861 #: build/C/man3/tmpfile.3:69
11862 msgid "Too many file descriptors in use by the process."
11863 msgstr "1 つのプロセスで使用可能なファイルディスクリプタ数を超過した。"
11864
11865 #. type: Plain text
11866 #: build/C/man3/tmpfile.3:72
11867 msgid "Too many files open in the system."
11868 msgstr "システム全体でオープン可能なファイル数を超過した。"
11869
11870 #. type: Plain text
11871 #: build/C/man3/tmpfile.3:75
11872 msgid "There was no room in the directory to add the new filename."
11873 msgstr "ディレクトリに新しいファイルを追加するための空き領域がない。"
11874
11875 #. type: Plain text
11876 #: build/C/man3/tmpfile.3:78
11877 msgid "Read-only filesystem."
11878 msgstr "読みだし専用ファイルシステムである。"
11879
11880 #. type: Plain text
11881 #: build/C/man3/tmpfile.3:80
11882 msgid "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
11883 msgstr "SVr4, 4.3BSD, C89, C99, SUSv2, POSIX.1-2001."
11884
11885 #. type: Plain text
11886 #: build/C/man3/tmpfile.3:86
11887 msgid "POSIX.1-2001 specifies: an error message may be written to I<stdout> if the stream cannot be opened."
11888 msgstr "POSIX.1-2001 では、 ストリームをオープンできなかった場合、 I<stdout> にエラーメッセージが書き出される、と規定されている。"
11889
11890 #. type: Plain text
11891 #: build/C/man3/tmpfile.3:97
11892 msgid "The standard does not specify the directory that B<tmpfile>()  will use.  Glibc will try the path prefix I<P_tmpdir> defined in I<E<lt>stdio.hE<gt>>, and if that fails the directory I</tmp>."
11893 msgstr "規格では B<tmpfile>()  が使うディレクトリは指定されていない。 glibc では I<E<lt>stdio.hE<gt>> で定義されている I<P_tmpdir> をパスの先頭に使おうとする。 これが失敗した場合は、ディレクトリ I</tmp> を使う。"
11894
11895 #. type: Plain text
11896 #: build/C/man3/tmpfile.3:103
11897 msgid "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
11898 msgstr "B<exit>(3), B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpnam>(3)"
11899
11900 #. type: TH
11901 #: build/C/man3/tmpnam.3:27
11902 #, no-wrap
11903 msgid "TMPNAM"
11904 msgstr "TMPNAM"
11905
11906 #. type: Plain text
11907 #: build/C/man3/tmpnam.3:30
11908 msgid "tmpnam, tmpnam_r - create a name for a temporary file"
11909 msgstr "tmpnam, tmpnam_r - 一時ファイルの名前を作成する"
11910
11911 #. type: Plain text
11912 #: build/C/man3/tmpnam.3:35
11913 #, no-wrap
11914 msgid "B<char *tmpnam(char *>I<s>B<);>\n"
11915 msgstr "B<char *tmpnam(char *>I<s>B<);>\n"
11916
11917 #. type: Plain text
11918 #: build/C/man3/tmpnam.3:45
11919 msgid "B<Note:> Avoid use of B<tmpnam>(); use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
11920 msgstr "B<注意:> B<tmpnam>() の使用は避けること。代わりに B<mkstemp>(3) か B<tmpfile>(3) を使うこと。"
11921
11922 #. type: Plain text
11923 #: build/C/man3/tmpnam.3:67
11924 msgid "The B<tmpnam>()  function returns a pointer to a string that is a valid filename, and such that a file with this name did not exist at some point in time, so that naive programmers may think it a suitable name for a temporary file.  If the argument I<s> is NULL, this name is generated in an internal static buffer and may be overwritten by the next call to B<tmpnam>().  If I<s> is not NULL, the name is copied to the character array (of length at least I<L_tmpnam>)  pointed to by I<s> and the value I<s> is returned in case of success."
11925 msgstr "B<tmpnam>()  関数は、ファイル名に使える文字列へのポインタを返す。 ある時点では同じ名前を持つファイルが存在しないファイル名が返されるので、 幼稚なプログラマはこの文字列が一時ファイルのファイル名として 適していると考えるかもしれない。 引き数 I<s> が NULL なら、この名前は内部の静的バッファに作成され、 次に B<tmpnam>()  関数が呼び出された時に上書きされる。 I<s> が NULL でなければ、ファイル名は I<s> が指す (少なくとも I<L_tmpnam> の長さを持つ) 文字配列にコピーされ、 成功した場合は I<s> が返される。"
11926
11927 #. type: Plain text
11928 #: build/C/man3/tmpnam.3:79
11929 msgid "The pathname that is created, has a directory prefix I<P_tmpdir>.  (Both I<L_tmpnam> and I<P_tmpdir> are defined in I<E<lt>stdio.hE<gt>>, just like the B<TMP_MAX> mentioned below.)"
11930 msgstr "作成されるパス名は、ディレクトリの部分に I<P_tmpdir> が使われる。 (I<L_tmpnam> と I<P_tmpdir> は、以下で説明する B<TMP_MAX> 同様 I<E<lt>stdio.hE<gt>> で定義されている。)"
11931
11932 #. type: Plain text
11933 #: build/C/man3/tmpnam.3:84
11934 msgid "The B<tmpnam>()  function returns a pointer to a unique temporary filename, or NULL if a unique name cannot be generated."
11935 msgstr "B<tmpnam>()  関数は一意な一時ファイル名へのポインタを返す。 一意なファイル名が作成できなかった場合は NULL を返す。"
11936
11937 #. type: Plain text
11938 #: build/C/man3/tmpnam.3:86
11939 msgid "No errors are defined."
11940 msgstr "エラーは定義されていない。"
11941
11942 #. type: Plain text
11943 #: build/C/man3/tmpnam.3:92
11944 msgid "The B<tmpnam>()  function is thread-safe with exceptions.  It is not thread-safe if called with a NULL parameter."
11945 msgstr "B<tmpnam>() 関数は例外付きでスレッドセーフである。 NULL パラメータで呼び出された場合はスレッドセーフではない。"
11946
11947 #. type: Plain text
11948 #: build/C/man3/tmpnam.3:96
11949 msgid "The B<tmpnam_r>()  function is thread-safe."
11950 msgstr "B<tmpnam_r>() 関数はスレッドセーフである。"
11951
11952 #. type: Plain text
11953 #: build/C/man3/tmpnam.3:101
11954 msgid "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 marks B<tmpnam>()  as obsolete."
11955 msgstr "SVr4, 4.3BSD, C89, C99, POSIX.1-2001.  POSIX.1-2008 は B<tmpnam>()  を廃止予定としている。"
11956
11957 #. type: Plain text
11958 #: build/C/man3/tmpnam.3:112
11959 msgid "The B<tmpnam>()  function generates a different string each time it is called, up to B<TMP_MAX> times.  If it is called more than B<TMP_MAX> times, the behavior is implementation defined."
11960 msgstr "B<tmpnam>()  関数は最大 B<TMP_MAX> 回まで、呼び出される度に異なる文字列を作成する。 B<TMP_MAX> 回以上呼び出された場合、その動作は実装依存である。"
11961
11962 #. type: Plain text
11963 #: build/C/man3/tmpnam.3:131
11964 msgid "Although B<tmpnam>()  generates names that are difficult to guess, it is nevertheless possible that between the time that B<tmpnam>()  returns a pathname, and the time that the program opens it, another program might create that pathname using B<open>(2), or create it as a symbolic link.  This can lead to security holes.  To avoid such possibilities, use the B<open>(2)  B<O_EXCL> flag to open the pathname.  Or better yet, use B<mkstemp>(3)  or B<tmpfile>(3)."
11965 msgstr "B<tmpnam>()  は推測が難しい名前を生成するが、それにもかかわらず、 B<tmpnam>()  がパス名を返してから、プログラムがそのファイルをオープンする までの間に、別のプログラムが同じパス名で、ファイルを B<open>(2)  で作成したり、シンボリックリンクを作成したりする可能性がある。 これはセキュリティホールにつながる可能性がある。 そのような可能性を回避するためには、 B<open>(2)  の B<O_EXCL> フラグを使ってパス名をオープンすればよい。 もっといいのは、 B<mkstemp>(3)  や B<tmpfile>(3)  を使うことである。"
11966
11967 #. type: Plain text
11968 #: build/C/man3/tmpnam.3:139
11969 msgid "Portable applications that use threads cannot call B<tmpnam>()  with a NULL argument if either B<_POSIX_THREADS> or B<_POSIX_THREAD_SAFE_FUNCTIONS> is defined."
11970 msgstr "移植性が必要な、スレッドを使ったアプリケーションでは、 B<_POSIX_THREADS> か B<_POSIX_THREAD_SAFE_FUNCTIONS> が定義されている場合に、 B<tmpnam>()  関数を NULL 引き数で呼び出してはならない。"
11971
11972 #. type: Plain text
11973 #: build/C/man3/tmpnam.3:143
11974 msgid "A POSIX draft proposed to use a function B<tmpnam_r>()  defined by"
11975 msgstr "POSIX 草案では、関数 B<tmpnam_r>()  を使うことを提案している。 この関数は、以下のように定義されており、 NULL を使わないようにという警告の意味で NULL を別扱いしている。"
11976
11977 #. type: Plain text
11978 #: build/C/man3/tmpnam.3:151
11979 #, no-wrap
11980 msgid ""
11981 "char *\n"
11982 "tmpnam_r(char *s)\n"
11983 "{\n"
11984 "    return s ? tmpnam(s) : NULL;\n"
11985 "}\n"
11986 msgstr ""
11987 "char *\n"
11988 "tmpnam_r(char *s)\n"
11989 "{\n"
11990 "    return s ? tmpnam(s) : NULL;\n"
11991 "}\n"
11992
11993 #. type: Plain text
11994 #: build/C/man3/tmpnam.3:165
11995 msgid "apparently as a warning not to use NULL.  A few systems implement it.  To get a glibc prototype for this function from I<E<lt>stdio.hE<gt>>, define B<_SVID_SOURCE> or B<_BSD_SOURCE> (before including I<any> header file)."
11996 msgstr "数は少ないが、この関数を実装しているシステムもある。 この関数の glibc のプロトタイプを I<E<lt>stdio.hE<gt>> から得るには、 (「どの」ヘッダファイルをインクルードするよりも前に)  B<_SVID_SOURCE> か B<_BSD_SOURCE> を定義しておく必要がある。"
11997
11998 #. type: Plain text
11999 #: build/C/man3/tmpnam.3:172
12000 msgid "Never use this function.  Use B<mkstemp>(3)  or B<tmpfile>(3)  instead."
12001 msgstr "決してこの関数を使ってはならない。代わりに B<mkstemp>(3)  か B<tmpfile>(3)  を使うこと。"
12002
12003 #. type: Plain text
12004 #: build/C/man3/tmpnam.3:177
12005 msgid "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
12006 msgstr "B<mkstemp>(3), B<mktemp>(3), B<tempnam>(3), B<tmpfile>(3)"
12007
12008 #. type: TH
12009 #: build/C/man2/unlink.2:33
12010 #, no-wrap
12011 msgid "UNLINK"
12012 msgstr "UNLINK"
12013
12014 #. type: Plain text
12015 #: build/C/man2/unlink.2:36
12016 msgid "unlink, unlinkat - delete a name and possibly the file it refers to"
12017 msgstr "unlink, unlinkat - 名前を削除し、場合によってはそれが参照しているファイルも削除する"
12018
12019 #. type: Plain text
12020 #: build/C/man2/unlink.2:41
12021 #, no-wrap
12022 msgid "B<int unlink(const char *>I<pathname>B<);>\n"
12023 msgstr "B<int unlink(const char *>I<pathname>B<);>\n"
12024
12025 #. type: Plain text
12026 #: build/C/man2/unlink.2:46
12027 #, no-wrap
12028 msgid "B<int unlinkat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
12029 msgstr "B<int unlinkat(int >I<dirfd>B<, const char *>I<pathname>B<, int >I<flags>B<);>\n"
12030
12031 #. type: Plain text
12032 #: build/C/man2/unlink.2:54
12033 msgid "B<unlinkat>():"
12034 msgstr "B<unlinkat>():"
12035
12036 #. type: Plain text
12037 #: build/C/man2/unlink.2:72
12038 msgid "B<unlink>()  deletes a name from the filesystem.  If that name was the last link to a file and no processes have the file open, the file is deleted and the space it was using is made available for reuse."
12039 msgstr "B<unlink>()  はファイルシステム上の名前を削除する。 もしその名前がファイルへの最後のリンク (link) であり、 どのプロセスもそのファイルをオープン (open) していなければ、 ファイルは削除される。 ファイルが使用していたディスク上の領域は再利用が可能になる。"
12040
12041 #. type: Plain text
12042 #: build/C/man2/unlink.2:76
12043 msgid "If the name was the last link to a file but any processes still have the file open, the file will remain in existence until the last file descriptor referring to it is closed."
12044 msgstr "名前がファイルへの最後のリンクであっても、どこかのプロセスが そのファイルを開いているなら、ファイルの最後のファイル記述子 (file descriptor) が閉じられるまでファイルは存在し続ける。"
12045
12046 #. type: Plain text
12047 #: build/C/man2/unlink.2:82
12048 msgid "If the name referred to a socket, FIFO, or device, the name for it is removed but processes which have the object open may continue to use it."
12049 msgstr "名前が指しているのがソケット、FIFO、デバイスの場合、名前は削除されるが、 そのソケットなどを開いているプロセスはそのまま使い続けることができる。"
12050
12051 #. type: SS
12052 #: build/C/man2/unlink.2:82
12053 #, no-wrap
12054 msgid "unlinkat()"
12055 msgstr "unlinkat()"
12056
12057 #. type: Plain text
12058 #: build/C/man2/unlink.2:95
12059 msgid "The B<unlinkat>()  system call operates in exactly the same way as either B<unlink>()  or B<rmdir>(2)  (depending on whether or not I<flags> includes the B<AT_REMOVEDIR> flag)  except for the differences described here."
12060 msgstr "B<unlinkat>() システムコールは、B<unlink>() と B<rmdir>(2) のいずれかと全く同じ動作をする (どちらと同じになるかは I<flags> に B<AT_REMOVEDIR> フラグが指定されたかにより決まる) が、以下で説明する点が異なる。"
12061
12062 #. type: Plain text
12063 #: build/C/man2/unlink.2:107
12064 msgid "If the pathname given in I<pathname> is relative, then it is interpreted relative to the directory referred to by the file descriptor I<dirfd> (rather than relative to the current working directory of the calling process, as is done by B<unlink>()  and B<rmdir>(2)  for a relative pathname)."
12065 msgstr "I<pathname> で指定されたパス名が相対パスの場合、このパス名はファイルディスクリプター I<dirfd> が参照するディレクトリに対する相対パスと解釈される (B<unlink>() や B<rmdir>(2) に相対パス名を渡した場合のように、呼び出したプロセスのカレントワーキングディレクトリに対する相対パスではない)。"
12066
12067 #. type: Plain text
12068 #: build/C/man2/unlink.2:121
12069 msgid "If the pathname given in I<pathname> is relative and I<dirfd> is the special value B<AT_FDCWD>, then I<pathname> is interpreted relative to the current working directory of the calling process (like B<unlink>()  and B<rmdir>(2))."
12070 msgstr "I<pathname> で指定されたパス名が相対パスで、 I<dirfd> が特別な値 B<AT_FDCWD> の場合、 (B<unlink>() や B<rmdir>(2) と同様に) I<pathname> は呼び出したプロセスのカレントワーキングディレクトリに対する相対パスと解釈される。"
12071
12072 #. type: Plain text
12073 #: build/C/man2/unlink.2:127
12074 msgid "If the pathname given in I<pathname> is absolute, then I<dirfd> is ignored."
12075 msgstr "I<pathname> で指定されたパス名が絶対パスの場合、 I<dirfd> は無視される。"
12076
12077 #. type: Plain text
12078 #: build/C/man2/unlink.2:133
12079 msgid "I<flags> is a bit mask that can either be specified as 0, or by ORing together flag values that control the operation of B<unlinkat>().  Currently only one such flag is defined:"
12080 msgstr "I<flags> はビットマスクで、0 もしくは B<unlinkat>() の動作を制御するフラグ値を論理和の形で指定することができる。現在のところ、定義されているフラグはひとつだけである。"
12081
12082 #. type: TP
12083 #: build/C/man2/unlink.2:133
12084 #, no-wrap
12085 msgid "B<AT_REMOVEDIR>"
12086 msgstr "B<AT_REMOVEDIR>"
12087
12088 #. type: Plain text
12089 #: build/C/man2/unlink.2:148
12090 msgid "By default, B<unlinkat>()  performs the equivalent of B<unlink>()  on I<pathname>.  If the B<AT_REMOVEDIR> flag is specified, then performs the equivalent of B<rmdir>(2)  on I<pathname>."
12091 msgstr "デフォルトでは、 B<unlinkat>() は I<pathname> に対して B<unlink>() と等価な動作をする。 B<AT_REMOVEDIR> フラグが指定された場合、 I<pathname> に対して B<rmdir>(2) と等価な動作をする。"
12092
12093 #. type: Plain text
12094 #: build/C/man2/unlink.2:153
12095 msgid "See B<openat>(2)  for an explanation of the need for B<unlinkat>()."
12096 msgstr "B<unlinkat>() の必要性についての説明については B<openat>(2) を参照。"
12097
12098 #. type: Plain text
12099 #: build/C/man2/unlink.2:169
12100 msgid "Write access to the directory containing I<pathname> is not allowed for the process's effective UID, or one of the directories in I<pathname> did not allow search permission.  (See also B<path_resolution>(7).)"
12101 msgstr "I<pathname> を含んでいるディレクトリの書き込み許可がプロセスの実効 (effective)  ユーザー ID に与えられていないか、 I<pathname> の中のディレクトリのどれかに検索許可が与えられていない (B<path_resolution>(7)  も参照すること)。"
12102
12103 #. type: Plain text
12104 #: build/C/man2/unlink.2:178
12105 msgid "The file I<pathname> cannot be unlinked because it is being used by the system or another process; for example, it is a mount point or the NFS client software created it to represent an active but otherwise nameless inode (\"NFS silly renamed\")."
12106 msgstr ""
12107 "システムか別のプロセスがそのファイルを使用中のため、\n"
12108 "ファイル I<pathname> を unlink できない。\n"
12109 "例えば、そのファイルがマウントポイントの場合や、\n"
12110 "NFS クライアントソフトウェアがそのファイルがアクティブであるが\n"
12111 "名前なし inode (nameless inode) であることを示すために作成した\n"
12112 "場合 (\"NFS silly renamed\") などがある。"
12113
12114 #. type: Plain text
12115 #: build/C/man2/unlink.2:190
12116 msgid "I<pathname> refers to a directory.  (This is the non-POSIX value returned by Linux since 2.1.132.)"
12117 msgstr "I<pathname> がディレクトリを参照している。 (これは POSIX で規定されていない値で、Linux 2.1.132 以降で返される。)"
12118
12119 #. type: Plain text
12120 #: build/C/man2/unlink.2:194
12121 msgid "Too many symbolic links were encountered in translating I<pathname>."
12122 msgstr "I<pathname> を解決する際に遭遇したシンボリックリンクが多過ぎる。"
12123
12124 #. type: Plain text
12125 #: build/C/man2/unlink.2:204
12126 msgid "A component in I<pathname> does not exist or is a dangling symbolic link, or I<pathname> is empty."
12127 msgstr "I<pathname> に対応するものが存在しないか、壊れたシンボリックリンクであるか、 I<pathname> が空である。"
12128
12129 #. type: Plain text
12130 #: build/C/man2/unlink.2:212
12131 msgid "A component used as a directory in I<pathname> is not, in fact, a directory."
12132 msgstr "I<pathname> のディレクトリ部分が、実際には、ディレクトリでない。"
12133
12134 #. type: Plain text
12135 #: build/C/man2/unlink.2:221
12136 msgid "The system does not allow unlinking of directories, or unlinking of directories requires privileges that the calling process doesn't have.  (This is the POSIX prescribed error return; as noted above, Linux returns B<EISDIR> for this case.)"
12137 msgstr "システムがディレクトリに対する unlink 操作を許可していない。 またはディレクトリに対する unlink 操作のために必要な特権を 呼び出し元のプロセスが持っていない。 (これは POSIX で規定されているエラーの返し方である。 上述の通り、この場合には Linux は B<EISDIR> を返す。)"
12138
12139 #. type: TP
12140 #: build/C/man2/unlink.2:221
12141 #, no-wrap
12142 msgid "B<EPERM> (Linux only)"
12143 msgstr "B<EPERM> (Linux のみ)"
12144
12145 #. type: Plain text
12146 #: build/C/man2/unlink.2:224
12147 msgid "The filesystem does not allow unlinking of files."
12148 msgstr "ファイルシステムがファイルに対する unlink 操作を許していない。"
12149
12150 #. type: Plain text
12151 #: build/C/man2/unlink.2:235
12152 msgid "The directory containing I<pathname> has the sticky bit (B<S_ISVTX>)  set and the process's effective UID is neither the UID of the file to be deleted nor that of the directory containing it, and the process is not privileged (Linux: does not have the B<CAP_FOWNER> capability)."
12153 msgstr "I<pathname> を含んでいるディレクトリにスティッキービット (sticky-bit)  (B<S_ISVTX>)  が設定されていて、プロセスの実効ユーザー ID が削除しようとするファイルの UID でもそれを含んでいるディレクトリのものでもなく、 かつプロセスに特権がない (Linux では B<CAP_FOWNER> ケーパビリティ (capability) がない)。"
12154
12155 #. type: Plain text
12156 #: build/C/man2/unlink.2:239
12157 msgid "I<pathname> refers to a file on a read-only filesystem."
12158 msgstr "I<pathname> が読み込み専用のファイルシステムのファイルを参照している。"
12159
12160 #. type: Plain text
12161 #: build/C/man2/unlink.2:248
12162 msgid "The same errors that occur for B<unlink>()  and B<rmdir>(2)  can also occur for B<unlinkat>().  The following additional errors can occur for B<unlinkat>():"
12163 msgstr "B<unlink>() と B<rmdir>(2) で発生するのと同じエラーが B<unlinkat>() でも起こる。 B<unlinkat>() では以下のエラーも発生する。"
12164
12165 #. type: Plain text
12166 #: build/C/man2/unlink.2:263
12167 msgid "I<pathname> refers to a directory, and B<AT_REMOVEDIR> was not specified in I<flags>."
12168 msgstr "I<pathname> がディレクトリを参照していて、 I<flags> に B<AT_REMOVEDIR> がされていなかった。"
12169
12170 #. type: Plain text
12171 #: build/C/man2/unlink.2:273
12172 msgid "B<unlinkat>()  was added to Linux in kernel 2.6.16; library support was added to glibc in version 2.4."
12173 msgstr "B<unlinkat>()  はカーネル 2.6.16 で Linux に追加された。 ライブラリによるサポートはバージョン 2.4 で glibc に追加された。"
12174
12175 #.  SVr4 documents additional error
12176 #.  conditions EINTR, EMULTIHOP, ETXTBSY, ENOLINK.
12177 #. type: Plain text
12178 #: build/C/man2/unlink.2:278
12179 msgid "B<unlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
12180 msgstr "B<unlink>(): SVr4, 4.3BSD, POSIX.1-2001, POSIX.1-2008."
12181
12182 #. type: Plain text
12183 #: build/C/man2/unlink.2:281
12184 msgid "B<unlinkat>(): POSIX.1-2008."
12185 msgstr "B<unlinkat>(): POSIX.1-2008."
12186
12187 #. type: Plain text
12188 #: build/C/man2/unlink.2:297
12189 msgid "On older kernels where B<unlinkat>()  is unavailable, the glibc wrapper function falls back to the use of B<unlink>(2)  or B<rmdir>(2).  When I<pathname> is a relative pathname, glibc constructs a pathname based on the symbolic link in I</proc/self/fd> that corresponds to the I<dirfd> argument."
12190 msgstr "B<unlinkat>() が利用できない古いカーネルでは、 glibc ラッパー関数は B<unlink>(2) と B<rmdir>(2) を使用するモードにフォールバックする。 I<pathname> が相対パスの場合、 glibc は I<dirfd> 引き数に対応する I</proc/self/fd> のシンボリックリンクに基づいてパス名を構成する。"
12191
12192 #. type: Plain text
12193 #: build/C/man2/unlink.2:312
12194 msgid "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), B<rmdir>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>(7), B<symlink>(7)"
12195 msgstr "B<rm>(1), B<chmod>(2), B<link>(2), B<mknod>(2), B<open>(2), B<rename>(2), B<rmdir>(2), B<mkfifo>(3), B<remove>(3), B<path_resolution>(7), B<symlink>(7)"
12196
12197 #. type: TH
12198 #: build/C/man3/unlocked_stdio.3:25
12199 #, no-wrap
12200 msgid "UNLOCKED_STDIO"
12201 msgstr "UNLOCKED_STDIO"
12202
12203 #. type: TH
12204 #: build/C/man3/unlocked_stdio.3:25
12205 #, no-wrap
12206 msgid "2008-08-29"
12207 msgstr "2008-08-29"
12208
12209 #. type: Plain text
12210 #: build/C/man3/unlocked_stdio.3:29
12211 msgid "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - nonlocking stdio functions"
12212 msgstr "getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - ロックを行わずに標準入出力を行う関数群"
12213
12214 #. type: Plain text
12215 #: build/C/man3/unlocked_stdio.3:37
12216 #, no-wrap
12217 msgid ""
12218 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
12219 "B<int getchar_unlocked(void);>\n"
12220 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
12221 "B<int putchar_unlocked(int >I<c>B<);>\n"
12222 msgstr ""
12223 "B<int getc_unlocked(FILE *>I<stream>B<);>\n"
12224 "B<int getchar_unlocked(void);>\n"
12225 "B<int putc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
12226 "B<int putchar_unlocked(int >I<c>B<);>\n"
12227
12228 #. type: Plain text
12229 #: build/C/man3/unlocked_stdio.3:49
12230 #, no-wrap
12231 msgid ""
12232 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
12233 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
12234 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
12235 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
12236 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
12237 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
12238 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
12239 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
12240 "B<                      FILE *>I<stream>B<);>\n"
12241 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
12242 "B<                      FILE *>I<stream>B<);>\n"
12243 msgstr ""
12244 "B<void clearerr_unlocked(FILE *>I<stream>B<);>\n"
12245 "B<int feof_unlocked(FILE *>I<stream>B<);>\n"
12246 "B<int ferror_unlocked(FILE *>I<stream>B<);>\n"
12247 "B<int fileno_unlocked(FILE *>I<stream>B<);>\n"
12248 "B<int fflush_unlocked(FILE *>I<stream>B<);>\n"
12249 "B<int fgetc_unlocked(FILE *>I<stream>B<);>\n"
12250 "B<int fputc_unlocked(int >I<c>B<, FILE *>I<stream>B<);>\n"
12251 "B<size_t fread_unlocked(void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
12252 "B<                      FILE *>I<stream>B<);>\n"
12253 "B<size_t fwrite_unlocked(const void *>I<ptr>B<, size_t >I<size>B<, size_t >I<n>B<,>\n"
12254 "B<                      FILE *>I<stream>B<);>\n"
12255
12256 #. type: Plain text
12257 #: build/C/man3/unlocked_stdio.3:52
12258 #, no-wrap
12259 msgid ""
12260 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
12261 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
12262 msgstr ""
12263 "B<char *fgets_unlocked(char *>I<s>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
12264 "B<int fputs_unlocked(const char *>I<s>B<, FILE *>I<stream>B<);>\n"
12265
12266 #. type: Plain text
12267 #: build/C/man3/unlocked_stdio.3:63
12268 #, no-wrap
12269 msgid ""
12270 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
12271 "B<wint_t getwchar_unlocked(void);>\n"
12272 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
12273 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
12274 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
12275 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
12276 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
12277 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
12278 msgstr ""
12279 "B<wint_t getwc_unlocked(FILE *>I<stream>B<);>\n"
12280 "B<wint_t getwchar_unlocked(void);>\n"
12281 "B<wint_t fgetwc_unlocked(FILE *>I<stream>B<);>\n"
12282 "B<wint_t fputwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
12283 "B<wint_t putwc_unlocked(wchar_t >I<wc>B<, FILE *>I<stream>B<);>\n"
12284 "B<wint_t putwchar_unlocked(wchar_t >I<wc>B<);>\n"
12285 "B<wchar_t *fgetws_unlocked(wchar_t *>I<ws>B<, int >I<n>B<, FILE *>I<stream>B<);>\n"
12286 "B<int fputws_unlocked(const wchar_t *>I<ws>B<, FILE *>I<stream>B<);>\n"
12287
12288 #. type: Plain text
12289 #: build/C/man3/unlocked_stdio.3:75
12290 msgid "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), B<putchar_unlocked>():"
12291 msgstr "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), B<putchar_unlocked>():"
12292
12293 #. type: Plain text
12294 #: build/C/man3/unlocked_stdio.3:78
12295 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
12296 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE || _BSD_SOURCE || _SVID_SOURCE"
12297
12298 #. type: Plain text
12299 #: build/C/man3/unlocked_stdio.3:89
12300 msgid "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
12301 msgstr "B<clearerr_unlocked>(), B<feof_unlocked>(), B<ferror_unlocked>(), B<fileno_unlocked>(), B<fflush_unlocked>(), B<fgetc_unlocked>(), B<fputc_unlocked>(), B<fread_unlocked>(), B<fwrite_unlocked>():"
12302
12303 #. type: Plain text
12304 #: build/C/man3/unlocked_stdio.3:91
12305 msgid "_BSD_SOURCE || _SVID_SOURCE"
12306 msgstr "_BSD_SOURCE || _SVID_SOURCE"
12307
12308 #. type: Plain text
12309 #: build/C/man3/unlocked_stdio.3:102
12310 msgid "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
12311 msgstr "B<fgets_unlocked>(), B<fputs_unlocked>(), B<getwc_unlocked>(), B<getwchar_unlocked>(), B<fgetwc_unlocked>(), B<fputwc_unlocked>(), B<putwchar_unlocked>(), B<fgetws_unlocked>(), B<fputws_unlocked>():"
12312
12313 #. type: Plain text
12314 #: build/C/man3/unlocked_stdio.3:113
12315 msgid "Each of these functions has the same behavior as its counterpart without the \"_unlocked\" suffix, except that they do not use locking (they do not set locks themselves, and do not test for the presence of locks set by others) and hence are thread-unsafe.  See B<flockfile>(3)."
12316 msgstr "これらの関数は、末尾に \"_unlocked\" がついていない関数と同じ動作をするが、 ファイルのロックを使用しない点が異なる。(これらの関数自身はファイルのロック をセットせず、他の関数によってロックがセットされているかどうかのチェックも 行わない) それゆえ、スレッド(thread)で安全に使用することができない。 B<flockfile>(3)  を参照のこと。"
12317
12318 #. type: Plain text
12319 #: build/C/man3/unlocked_stdio.3:120
12320 msgid "The four functions B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), B<putchar_unlocked>()  are in POSIX.1-2001."
12321 msgstr "B<getc_unlocked>(), B<getchar_unlocked>(), B<putc_unlocked>(), B<putchar_unlocked>()  の 4 つの関数は POSIX.1-2001 に規定されている。"
12322
12323 #.  E.g., in HP-UX 10.0. In HP-UX 10.30 they are called obsolescent, and
12324 #.  moved to a compatibility library.
12325 #.  Available in HP-UX 10.0: clearerr_unlocked, fclose_unlocked,
12326 #.  feof_unlocked, ferror_unlocked, fflush_unlocked, fgets_unlocked,
12327 #.  fgetwc_unlocked, fgetws_unlocked, fileno_unlocked, fputs_unlocked,
12328 #.  fputwc_unlocked, fputws_unlocked, fread_unlocked, fseek_unlocked,
12329 #.  ftell_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
12330 #.  getw_unlocked, getwc_unlocked, getwchar_unlocked, putc_unlocked,
12331 #.  putchar_unlocked, puts_unlocked, putws_unlocked, putw_unlocked,
12332 #.  putwc_unlocked, putwchar_unlocked, rewind_unlocked, setvbuf_unlocked,
12333 #.  ungetc_unlocked, ungetwc_unlocked.
12334 #. type: Plain text
12335 #: build/C/man3/unlocked_stdio.3:136
12336 msgid "The nonstandard B<*_unlocked>()  variants occur on a few UNIX systems, and are available in recent glibc.  They should probably not be used."
12337 msgstr "非標準の B<*_unlocked>()  の仲間は 2、3 の UNIX システムで定義されており、 最近の glibc では使用可能であるが、 これらの関数は使わない方がよいだろう。"
12338
12339 #. type: Plain text
12340 #: build/C/man3/unlocked_stdio.3:139
12341 msgid "B<flockfile>(3), B<stdio>(3)"
12342 msgstr "B<flockfile>(3), B<stdio>(3)"
12343
12344 #. type: TH
12345 #: build/C/man3/wprintf.3:16
12346 #, no-wrap
12347 msgid "WPRINTF"
12348 msgstr "WPRINTF"
12349
12350 #. type: TH
12351 #: build/C/man3/wprintf.3:16
12352 #, no-wrap
12353 msgid "2014-03-19"
12354 msgstr "2014-03-19"
12355
12356 #. type: Plain text
12357 #: build/C/man3/wprintf.3:20
12358 msgid "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - formatted wide-character output conversion"
12359 msgstr "wprintf, fwprintf, swprintf, vwprintf, vfwprintf, vswprintf - ワイド文字を フォーマットして出力する"
12360
12361 #. type: Plain text
12362 #: build/C/man3/wprintf.3:24
12363 #, no-wrap
12364 msgid ""
12365 "B<#include E<lt>stdio.hE<gt>>\n"
12366 "B<#include E<lt>wchar.hE<gt>>\n"
12367 msgstr ""
12368 "B<#include E<lt>stdio.hE<gt>>\n"
12369 "B<#include E<lt>wchar.hE<gt>>\n"
12370
12371 #. type: Plain text
12372 #: build/C/man3/wprintf.3:29
12373 #, no-wrap
12374 msgid ""
12375 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
12376 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
12377 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
12378 "B<             const wchar_t *>I<format>B<, ...);>\n"
12379 msgstr ""
12380 "B<int wprintf(const wchar_t *>I<format>B<, ...);>\n"
12381 "B<int fwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, ...);>\n"
12382 "B<int swprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
12383 "B<             const wchar_t *>I<format>B<, ...);>\n"
12384
12385 #. type: Plain text
12386 #: build/C/man3/wprintf.3:34
12387 #, no-wrap
12388 msgid ""
12389 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
12390 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
12391 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
12392 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
12393 msgstr ""
12394 "B<int vwprintf(const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
12395 "B<int vfwprintf(FILE *>I<stream>B<, const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
12396 "B<int vswprintf(wchar_t *>I<wcs>B<, size_t >I<maxlen>B<,>\n"
12397 "B<              const wchar_t *>I<format>B<, va_list >I<args>B<);>\n"
12398
12399 #.  .BR wprintf (),
12400 #.  .BR fwprintf (),
12401 #.  .BR swprintf (),
12402 #.  .BR vwprintf (),
12403 #.  .BR vfwprintf (),
12404 #.  .BR vswprintf ():
12405 #. type: Plain text
12406 #: build/C/man3/wprintf.3:51
12407 msgid "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
12408 msgstr "_XOPEN_SOURCE\\ E<gt>=\\ 500 || _ISOC99_SOURCE ||"
12409
12410 #. type: Plain text
12411 #: build/C/man3/wprintf.3:53
12412 msgid "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
12413 msgstr "_POSIX_C_SOURCE\\ E<gt>=\\ 200112L;"
12414
12415 #. type: Plain text
12416 #: build/C/man3/wprintf.3:56
12417 msgid "or I<cc\\ -std=c99>"
12418 msgstr "or I<cc\\ -std=c99>"
12419
12420 #. type: Plain text
12421 #: build/C/man3/wprintf.3:67
12422 msgid "The B<wprintf>()  family of functions is the wide-character equivalent of the B<printf>(3)  family of functions.  It performs formatted output of wide characters."
12423 msgstr "B<wprintf>()  ファミリーの関数は B<printf>(3)  ファミリーの関数の ワイド文字版である。これらはワイド文字をフォーマットして出力する。"
12424
12425 #. type: Plain text
12426 #: build/C/man3/wprintf.3:79
12427 msgid "The B<wprintf>()  and B<vwprintf>()  functions perform wide-character output to I<stdout>.  I<stdout> must not be byte oriented; see B<fwide>(3)  for more information."
12428 msgstr "B<wprintf>()  と B<vwprintf>()  関数は I<stdout> に出力を行なう。 I<stdout> がバイト単位入出力であってはいけない。より詳しい説明は B<fwide>(3)  を参照すること。"
12429
12430 #. type: Plain text
12431 #: build/C/man3/wprintf.3:91
12432 msgid "The B<fwprintf>()  and B<vfwprintf>()  functions perform wide-character output to I<stream>.  I<stream> must not be byte oriented; see B<fwide>(3)  for more information."
12433 msgstr "B<fwprintf>()  と B<vfwprintf>()  関数は I<stream> にワイド文字出力 を行なう。 I<stream> がバイト単位入出力であってはいけない。 より詳しい説明は B<fwide>(3)  を参照すること。"
12434
12435 #. type: Plain text
12436 #: build/C/man3/wprintf.3:105
12437 msgid "The B<swprintf>()  and B<vswprintf>()  functions perform wide-character output to an array of wide characters.  The programmer must ensure that there is room for at least I<maxlen> wide characters at I<wcs>."
12438 msgstr "B<swprintf>()  と B<vswprintf>()  関数はワイド文字の配列に ワイド文字出力を行なう。プログラマーは I<wcs> に最低でも I<maxlen> 文字のワイド文字を出力できる空きがあることを保証しなければ ならない。"
12439
12440 #. type: Plain text
12441 #: build/C/man3/wprintf.3:116
12442 msgid "These functions are like the B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  functions except for the following differences:"
12443 msgstr "これらの関数は B<printf>(3), B<vprintf>(3), B<fprintf>(3), B<vfprintf>(3), B<sprintf>(3), B<vsprintf>(3)  関数に似ているが以下の 点で異っている。"
12444
12445 #. type: TP
12446 #: build/C/man3/wprintf.3:116 build/C/man3/wprintf.3:121
12447 #: build/C/man3/wprintf.3:124
12448 #, no-wrap
12449 msgid "B<\\(bu>"
12450 msgstr "B<\\(bu>"
12451
12452 #. type: Plain text
12453 #: build/C/man3/wprintf.3:121
12454 msgid "The I<format> string is a wide-character string."
12455 msgstr "I<format> がワイド文字列で与えられる。"
12456
12457 #. type: Plain text
12458 #: build/C/man3/wprintf.3:124
12459 msgid "The output consists of wide characters, not bytes."
12460 msgstr "出力がバイトではなくワイド文字で構成される。"
12461
12462 #. type: Plain text
12463 #: build/C/man3/wprintf.3:143
12464 msgid "B<swprintf>()  and B<vswprintf>()  take a I<maxlen> argument, B<sprintf>(3)  and B<vsprintf>(3)  do not.  (B<snprintf>(3)  and B<vsnprintf>(3)  take a I<maxlen> argument, but these functions do not return -1 upon buffer overflow on Linux.)"
12465 msgstr "B<swprintf>()  と B<vswprintf>()  は I<maxlen> 引き数を取るが、 B<sprintf>()  と B<vsprintf>()  は取らない (B<snprintf>()  と B<vsnprintf>()  は I<maxlen> 引き数を取るが これらの関数が Linux では、バッファーが溢れた場合でも -1 を返さない)。"
12466
12467 #. type: Plain text
12468 #: build/C/man3/wprintf.3:149
12469 msgid "The treatment of the conversion characters B<c> and B<s> is different:"
12470 msgstr "B<c> と B<s> 変換文字の扱いが異っている:"
12471
12472 #. type: Plain text
12473 #: build/C/man3/wprintf.3:163
12474 msgid "If no B<l> modifier is present, the I<int> argument is converted to a wide character by a call to the B<btowc>(3)  function, and the resulting wide character is written.  If an B<l> modifier is present, the I<wint_t> (wide character) argument is written."
12475 msgstr "もし B<l> 修飾子が存在しない場合は I<int> 引き数は B<btowc>(3)  関数によってワイド文字に変換される。そして結果のワイド文字が出力される。 B<l> 修飾子が存在する場合は I<wint_t> (ワイド文字)引き数が出力される。"
12476
12477 #. type: Plain text
12478 #: build/C/man3/wprintf.3:203
12479 msgid "If no B<l> modifier is present: The I<const\\ char\\ *> argument is expected to be a pointer to an array of character type (pointer to a string) containing a multibyte character sequence beginning in the initial shift state.  Characters from the array are converted to wide characters (each by a call to the B<mbrtowc>(3)  function with a conversion state starting in the initial state before the first byte).  The resulting wide characters are written up to (but not including) the terminating null wide character (L\\(aq\\e0\\(aq).  If a precision is specified, no more wide characters than the number specified are written.  Note that the precision determines the number of I<wide characters> written, not the number of I<bytes> or I<screen positions>.  The array must contain a terminating null byte (\\(aq\\e0\\(aq), unless a precision is given and it is so small that the number of converted wide characters reaches it before the end of the array is reached.  If an B<l> modifier is present: The I<const\\ wchar_t\\ *> argument is expected to be a pointer to an array of wide characters.  Wide characters from the array are written up to (but not including) a terminating null wide character.  If a precision is specified, no more than the number specified are written.  The array must contain a terminating null wide character, unless a precision is given and it is smaller than or equal to the number of wide characters in the array."
12480 msgstr "もし B<l> 修飾子が存在しない場合、 I<const\\ char\\ *> 引き数は初期状態より始まるマルチバイト文字列を含んだ char 型の配列へのポインタ(文字列へのポインタ)とみなされる。 配列の文字は(最初のバイト前に初期状態で変換を開始し、それぞれの文字を B<mbrtowc>(3)  関数によって)ワイド文字へと変換される。結果のワイド文字は終端の ナルワイド文字 (L\\(aq\\e0\\(aq) の手前までが書き込まれる。精度(precision)が指定された 場合、指定された数字を超えるワイド文字は書き込まれない。精度は 書き込まれる I<バイト> 数や I<画面上の位置> ではなく I<ワイド文字> の数を指定することに注意すること。 精度がない場合には配列の終端にナルバイト (\\(aq\\e0\\(aq) を含む必要がある。 精度を指定する場合には、配列の最後に到着する前に変換されたワイド文字の 数がそれに到達するよう、精度は十分に小さな数でなければならない。 もし B<l> 修飾子が存在する場合、 I<const\\ wchar_t\\ *> 引き数はワイド文字の配列へのポインタとみなされる。 配列のワイド文字列は終端のナルワイド文字の手間まで出力される。 もし精度が指定された場合には指定された精度以上の文字は出力されない。 精度を指定しない場合には終端のナルワイド文字を含む必要がある。 精度を指定する場合にはそれはワイド文字の配列の大きさよりも小さくな ければならない。"
12481
12482 #. type: Plain text
12483 #: build/C/man3/wprintf.3:211
12484 msgid "The functions return the number of wide characters written, excluding the terminating null wide character in case of the functions B<swprintf>()  and B<vswprintf>().  They return -1 when an error occurs."
12485 msgstr "これらの関数は書き込まれたワイド文字の文字数を返す。 B<swprintf>()  と B<vswprintf>()  関数の場合は 終端のナルワイド文字は含まない。エラーが起こった場合は -1 を返す。"
12486
12487 #. type: Plain text
12488 #: build/C/man3/wprintf.3:213
12489 msgid "C99."
12490 msgstr "C99."
12491
12492 #. type: Plain text
12493 #: build/C/man3/wprintf.3:221
12494 msgid "The behavior of B<wprintf>()  et al. depends on the B<LC_CTYPE> category of the current locale."
12495 msgstr "B<wprintf>()  等の動作は現在のロケールの B<LC_CTYPE> カテゴリに依存している。"
12496
12497 #. type: Plain text
12498 #: build/C/man3/wprintf.3:251
12499 msgid "If the I<format> string contains non-ASCII wide characters, the program will work correctly only if the B<LC_CTYPE> category of the current locale at run time is the same as the B<LC_CTYPE> category of the current locale at compile time.  This is because the I<wchar_t> representation is platform- and locale-dependent.  (The glibc represents wide characters using their Unicode (ISO-10646) code point, but other platforms don't do this.  Also, the use of C99 universal character names of the form \\eunnnn does not solve this problem.)  Therefore, in internationalized programs, the I<format> string should consist of ASCII wide characters only, or should be constructed at run time in an internationalized way (e.g., using B<gettext>(3)  or B<iconv>(3), followed by B<mbstowcs>(3))."
12500 msgstr "I<format> 文字列が ASCII 以外のワイド文字を含んでいる場合、 実行時のロケールの B<LC_CTYPE> カテゴリがコンパイル時の B<LC_CTYPE> カテゴリと 一致している場合にのみプログラムは正常に動作する。これは I<wchar_t> の表現がロケールやプラットホームに依存していることに原因がある。 (glibc ではワイド文字として Unicode (ISO-10646) のコードポイントを 使用している。他のプラットホームではそうではない。同様に ISO C99 の \\eunnnn 形式の汎用文字名称はこの問題を解決しない。)  このため国際化されたプログラムでは I<format> 文字列を ASCII ワイド 文字のみにするか、実行時に国際化された方法で構成する必要がある (例えば B<gettext>()  と B<iconv>()  や B<mbstowcs>()  を組み合わて使用する)。"
12501
12502 #.  .BR wscanf (3)
12503 #. type: Plain text
12504 #: build/C/man3/wprintf.3:258
12505 msgid "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
12506 msgstr "B<fprintf>(3), B<fputwc>(3), B<fwide>(3), B<printf>(3), B<snprintf>(3)"
12507
12508 #. type: TH
12509 #: build/C/man2/write.2:39
12510 #, no-wrap
12511 msgid "WRITE"
12512 msgstr "WRITE"
12513
12514 #. type: Plain text
12515 #: build/C/man2/write.2:42
12516 msgid "write - write to a file descriptor"
12517 msgstr "write - ファイルディスクリプタ (file descriptor) に書き込む"
12518
12519 #. type: Plain text
12520 #: build/C/man2/write.2:46
12521 msgid "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
12522 msgstr "B<ssize_t write(int >I<fd>B<, const void *>I<buf>B<, size_t >I<count>B<);>"
12523
12524 #. type: Plain text
12525 #: build/C/man2/write.2:54
12526 msgid "B<write>()  writes up to I<count> bytes from the buffer pointed I<buf> to the file referred to by the file descriptor I<fd>."
12527 msgstr "B<write>()  は、 I<buf> が指すバッファから、ファイルディスクリプタ I<fd> が参照するファイルへ、最大 I<count> バイトを書き込む。"
12528
12529 #. type: Plain text
12530 #: build/C/man2/write.2:68
12531 msgid "The number of bytes written may be less than I<count> if, for example, there is insufficient space on the underlying physical medium, or the B<RLIMIT_FSIZE> resource limit is encountered (see B<setrlimit>(2)), or the call was interrupted by a signal handler after having written less than I<count> bytes.  (See also B<pipe>(7).)"
12532 msgstr "書き込まれるバイト数は I<count> よりも小さくなることがある。 例えば、書き込み対象の物理メディアに十分な領域がない場合、 リソース上限 B<RLIMIT_FSIZE> に達した場合 (B<setrlimit>(2)  参照)、 I<count> バイト未満の書き込みが行われた後で 呼び出しがシグナルハンドラにより割り込まれた場合、 などである。 (B<pipe>(7)  も参照のこと。)"
12533
12534 #. type: Plain text
12535 #: build/C/man2/write.2:82
12536 msgid "For a seekable file (i.e., one to which B<lseek>(2)  may be applied, for example, a regular file)  writing takes place at the current file offset, and the file offset is incremented by the number of bytes actually written.  If the file was B<open>(2)ed with B<O_APPEND>, the file offset is first set to the end of the file before writing.  The adjustment of the file offset and the write operation are performed as an atomic step."
12537 msgstr "seek 可能なファイル (つまり B<lseek>(2)  が適用できるファイル、例えば通常のファイル) では、 書き込みは現在のファイルオフセットから行われ、 ファイルオフセットは実際に書き込みが行われたバイト数分 加算される。ファイルが B<O_APPEND> で B<open>(2)  された場合、ファイルオフセットは書き込み前に ファイルの末尾に設定される。 ファイルオフセットの調整と書き込み操作はアトミックな処理として 実行される。"
12538
12539 #. type: Plain text
12540 #: build/C/man2/write.2:89
12541 msgid "POSIX requires that a B<read>(2)  which can be proved to occur after a B<write>()  has returned returns the new data.  Note that not all filesystems are POSIX conforming."
12542 msgstr "POSIX は B<write>()  が行なわれた後に実行した B<read>(2)  が 新しいデータを返すことを要求している。 全てのファイルシステムが POSIX 準拠ではない点に注意すること。"
12543
12544 #. type: Plain text
12545 #: build/C/man2/write.2:94
12546 msgid "On success, the number of bytes written is returned (zero indicates nothing was written).  On error, -1 is returned, and I<errno> is set appropriately."
12547 msgstr "成功した場合、書き込まれたバイト数が返される (ゼロは何も書き込まれなかったことを示す)。 エラーならば -1 が返され、I<errno> が適切に設定される。"
12548
12549 #. type: Plain text
12550 #: build/C/man2/write.2:107
12551 msgid "If I<count> is zero and I<fd> refers to a regular file, then B<write>()  may return a failure status if one of the errors below is detected.  If no errors are detected, 0 will be returned without causing any other effect.  If I<count> is zero and I<fd> refers to a file other than a regular file, the results are not specified."
12552 msgstr "I<count> が 0 で、 I<fd> が通常のファイル (regular file) を参照している場合、 B<write>()  は後述のエラーのいずれかを検出した場合、失敗を返すことがある。 エラーが検出されなかった場合は、 0 を返し、他に何の影響も与えない。 I<count> が 0 で、 I<fd> が通常のファイル以外のファイルを参照している場合、 その結果は規定されていない。"
12553
12554 #. type: Plain text
12555 #: build/C/man2/write.2:115
12556 msgid "The file descriptor I<fd> refers to a file other than a socket and has been marked nonblocking (B<O_NONBLOCK>), and the write would block."
12557 msgstr "ファイルディスクリプタ I<fd> がソケット以外のファイルを参照していて、 非停止 (nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にある。"
12558
12559 #.  Actually EAGAIN on Linux
12560 #. type: Plain text
12561 #: build/C/man2/write.2:126
12562 msgid "The file descriptor I<fd> refers to a socket and has been marked nonblocking (B<O_NONBLOCK>), and the write would block.  POSIX.1-2001 allows either error to be returned for this case, and does not require these constants to have the same value, so a portable application should check for both possibilities."
12563 msgstr "ファイルディスクリプタ I<fd> がソケットを参照していて、非停止 (nonblocking) モード (B<O_NONBLOCK>)  に設定されており、書き込みを行うと停止する状況にある。 POSIX.1-2001 は、この場合にどちらのエラーを返すことも認めており、 これら 2 つの定数が同じ値を持つことも求めていない。 したがって、移植性が必要なアプリケーションでは、両方の可能性を 確認すべきである。"
12564
12565 #. type: Plain text
12566 #: build/C/man2/write.2:130
12567 msgid "I<fd> is not a valid file descriptor or is not open for writing."
12568 msgstr "I<fd> が有効なファイルディスクリプタでないか書き込みのためにオープン (open) されていない。"
12569
12570 #. type: TP
12571 #: build/C/man2/write.2:130
12572 #, no-wrap
12573 msgid "B<EDESTADDRREQ>"
12574 msgstr "B<EDESTADDRREQ>"
12575
12576 #. type: Plain text
12577 #: build/C/man2/write.2:135
12578 msgid "I<fd> refers to a datagram socket for which a peer address has not been set using B<connect>(2)."
12579 msgstr "I<fd> が、 B<connect>(2)  を使って通信相手のアドレスが設定されていないデータグラムソケットを 参照している。"
12580
12581 #. type: Plain text
12582 #: build/C/man2/write.2:141
12583 msgid "The user's quota of disk blocks on the filesystem containing the file referred to by I<fd> has been exhausted."
12584 msgstr "I<fd> が参照するファイルを含むファイルシステムのディスクブロックのユーザクォータの上限に達している。"
12585
12586 #. type: Plain text
12587 #: build/C/man2/write.2:150
12588 msgid "An attempt was made to write a file that exceeds the implementation-defined maximum file size or the process's file size limit, or to write at a position past the maximum allowed offset."
12589 msgstr "実装定義の最大ファイルサイズまたはプロセスのファイルサイズ制限を 超えてファイルに書き込もうとした。 または許可されたオフセット値の限界を超えた先の位置に 書き込もうとした。"
12590
12591 #. type: Plain text
12592 #: build/C/man2/write.2:154
12593 msgid "The call was interrupted by a signal before any data was written; see B<signal>(7)."
12594 msgstr "何のデータも書かない間にシグナルにより割り込まれた (interrupt)。 B<signal>(7)  参照。"
12595
12596 #. type: Plain text
12597 #: build/C/man2/write.2:165
12598 msgid "I<fd> is attached to an object which is unsuitable for writing; or the file was opened with the B<O_DIRECT> flag, and either the address specified in I<buf>, the value specified in I<count>, or the current file offset is not suitably aligned."
12599 msgstr "I<fd> が書き込みが不適切なオブジェクトを参照している。 もしくは、ファイルが B<O_DIRECT> フラグを指定してオープンされているが、 I<buf> に指定されたアドレス、 I<count> に指定された値、 現在のファイルオフセットのいずれかの アラインメントが不適切である。"
12600
12601 #. type: Plain text
12602 #: build/C/man2/write.2:168
12603 msgid "A low-level I/O error occurred while modifying the inode."
12604 msgstr "inode の修正中に低レべル (low-level) I/O エラーが発生した。"
12605
12606 #. type: Plain text
12607 #: build/C/man2/write.2:173
12608 msgid "The device containing the file referred to by I<fd> has no room for the data."
12609 msgstr "I<fd> によって参照されるファイルを含むデバイス (device) に十分な空きがない。"
12610
12611 #. type: TP
12612 #: build/C/man2/write.2:177
12613 #, no-wrap
12614 msgid "B<EPIPE>"
12615 msgstr "B<EPIPE>"
12616
12617 #. type: Plain text
12618 #: build/C/man2/write.2:186
12619 msgid "I<fd> is connected to a pipe or socket whose reading end is closed.  When this happens the writing process will also receive a B<SIGPIPE> signal.  (Thus, the write return value is seen only if the program catches, blocks or ignores this signal.)"
12620 msgstr "I<fd> がパイプ (pipe) かソケット (socket) に接続されており、 その反対側 (読み込み側) がクローズ (close) されている。 これが発生した場合には、書き込みを行なうプロセスは B<SIGPIPE> シグナル (signal)も受ける。 (したがって、プログラムがこのシグナルを捕獲 (catch)、停止 (block)、無視 (ignore)  した場合のみ、write の返り値を参照できる。)"
12621
12622 #. type: Plain text
12623 #: build/C/man2/write.2:189
12624 msgid "Other errors may occur, depending on the object connected to I<fd>."
12625 msgstr "I<fd> に接続されたオブジェクトによっては、他のエラーが起こるかもしれない。"
12626
12627 #. type: Plain text
12628 #: build/C/man2/write.2:198
12629 msgid "Under SVr4 a write may be interrupted and return B<EINTR> at any point, not just before any data is written."
12630 msgstr "SVr4 では write が割り込まれると、データが書き込まれる直前ではなく、 その時点で B<EINTR> が返る。"
12631
12632 #. type: Plain text
12633 #: build/C/man2/write.2:207
12634 msgid "A successful return from B<write>()  does not make any guarantee that data has been committed to disk.  In fact, on some buggy implementations, it does not even guarantee that space has successfully been reserved for the data.  The only way to be sure is to call B<fsync>(2)  after you are done writing all your data."
12635 msgstr "B<write>()  が成功して返ってきても、データがディスクに記録されたことを 保証するものではない。 実際、データのためのスペースが確保されたことすら保証されないという バグっぽい実装もある。 これを確実にする唯一の方法は、 全てのデータを write した後に B<fsync>(2)  を呼び出すことである。"
12636
12637 #. type: Plain text
12638 #: build/C/man2/write.2:215
12639 msgid "If a B<write>()  is interrupted by a signal handler before any bytes are written, then the call fails with the error B<EINTR>; if it is interrupted after at least one byte has been written, the call succeeds, and returns the number of bytes written."
12640 msgstr "B<write>()  が 1 バイトも書き込まないうちにシグナルハンドラにより割り込まれた場合、 B<write>()  はエラー B<EINTR> で失敗する。 1バイトでも書き込んだ後で割り込まれた場合には、 B<write>()  は成功し、書き込んだバイト数を返す。"
12641
12642 #
12643 #.  http://thread.gmane.org/gmane.linux.kernel/1649458
12644 #.     From: Michael Kerrisk (man-pages <mtk.manpages <at> gmail.com>
12645 #.     Subject: Update of file offset on write() etc. is non-atomic with I/O
12646 #.     Date: 2014-02-17 15:41:37 GMT
12647 #.     Newsgroups: gmane.linux.kernel, gmane.linux.file-systems
12648 #.  commit 9c225f2655e36a470c4f58dbbc99244c5fc7f2d4
12649 #.     Author: Linus Torvalds <torvalds@linux-foundation.org>
12650 #.     Date:   Mon Mar 3 09:36:58 2014 -0800
12651 #.         vfs: atomic f_pos accesses as per POSIX
12652 #. type: Plain text
12653 #: build/C/man2/write.2:254
12654 msgid "Among the APIs subsequently listed are B<write>()  and B<writev>(2).  And among the effects that should be atomic across threads (and processes)  are updates of the file offset.  However, on Linux before version 3.14, this was not the case: if two processes that share an open file description (see B<open>(2))  perform a B<write>()  (or B<writev>(2))  at the same time, then the I/O operations were not atomic with respect updating the file offset, with the result that the blocks of data output by the two processes might (incorrectly) overlap.  This problem was fixed in Linux 3.14."
12655 msgstr "この後に書かれている API の中に B<write>() と B<writev>(2) である。 スレッド(やプロセス) 間でアトミックに適用することが求められる効果の一つとして、 ファイルオフセットの更新がある。 しかしながら、 バージョン 3.14 より前の Linux では、 この限りではない。 オープンファイル記述 (open file description) を共有する 2 つのプロセスが同時に B<write>() (や B<writev>(2)) を実行した場合、 この I/O 操作ではファイルオフセットの更新に関してはアトミックではなく、 2 つのプロセスから出力されるデータブロックが (間違って) 重なる可能性がある。 この問題は Linux 3.14 で修正された。"
12656
12657 #. type: Plain text
12658 #: build/C/man2/write.2:266
12659 msgid "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"
12660 msgstr "B<close>(2), B<fcntl>(2), B<fsync>(2), B<ioctl>(2), B<lseek>(2), B<open>(2), B<pwrite>(2), B<read>(2), B<select>(2), B<writev>(2), B<fwrite>(3)"