OSDN Git Service

(split) LDP: Update POT and ja.po to LDP v3.38.
[linuxjm/LDP_man-pages.git] / po4a / epoll / 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: 2012-04-23 07:52+0900\n"
10 "PO-Revision-Date: 2012-03-23 04:42+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/man7/epoll.7:21
20 #, no-wrap
21 msgid "EPOLL"
22 msgstr "EPOLL"
23
24 #. type: TH
25 #: build/C/man7/epoll.7:21
26 #, no-wrap
27 msgid "2009-02-01"
28 msgstr "2009-02-01"
29
30 #. type: TH
31 #: build/C/man7/epoll.7:21 build/C/man2/epoll_create.2:25
32 #: build/C/man2/epoll_ctl.2:21 build/C/man2/epoll_wait.2:23
33 #: build/C/man2/poll.2:31
34 #, no-wrap
35 msgid "Linux"
36 msgstr "Linux"
37
38 #. type: TH
39 #: build/C/man7/epoll.7:21 build/C/man2/epoll_create.2:25
40 #: build/C/man2/epoll_ctl.2:21 build/C/man2/epoll_wait.2:23
41 #: build/C/man2/poll.2:31
42 #, no-wrap
43 msgid "Linux Programmer's Manual"
44 msgstr "Linux Programmer's Manual"
45
46 #. type: SH
47 #: build/C/man7/epoll.7:22 build/C/man2/epoll_create.2:26
48 #: build/C/man2/epoll_ctl.2:22 build/C/man2/epoll_wait.2:24
49 #: build/C/man2/poll.2:32
50 #, no-wrap
51 msgid "NAME"
52 msgstr "名前"
53
54 #. type: Plain text
55 #: build/C/man7/epoll.7:24
56 msgid "epoll - I/O event notification facility"
57 msgstr "epoll - I/O イベント通知機能"
58
59 #. type: SH
60 #: build/C/man7/epoll.7:24 build/C/man2/epoll_create.2:28
61 #: build/C/man2/epoll_ctl.2:24 build/C/man2/epoll_wait.2:26
62 #: build/C/man2/poll.2:34
63 #, no-wrap
64 msgid "SYNOPSIS"
65 msgstr "書式"
66
67 #. type: Plain text
68 #: build/C/man7/epoll.7:26 build/C/man2/epoll_ctl.2:26
69 msgid "B<#include E<lt>sys/epoll.hE<gt>>"
70 msgstr "B<#include E<lt>sys/epoll.hE<gt>>"
71
72 #. type: SH
73 #: build/C/man7/epoll.7:26 build/C/man2/epoll_create.2:35
74 #: build/C/man2/epoll_ctl.2:29 build/C/man2/epoll_wait.2:36
75 #: build/C/man2/poll.2:46
76 #, no-wrap
77 msgid "DESCRIPTION"
78 msgstr "説明"
79
80 #. type: Plain text
81 #: build/C/man7/epoll.7:36
82 msgid ""
83 "B<epoll> is a variant of B<poll>(2)  that can be used either as an edge-"
84 "triggered or a level-triggered interface and scales well to large numbers of "
85 "watched file descriptors.  The following system calls are provided to create "
86 "and manage an B<epoll> instance:"
87 msgstr ""
88 "B<epoll> は B<poll>(2)  の一種であり、エッジトリガインタフェースと レベルトリ"
89 "ガインタフェースのどちらとしても使用することができ、 監視するファイルディスク"
90 "リプタの数が多い場合にも使用できる。 B<epoll> インスタンスの作成や管理を行う"
91 "ために 以下のシステムコールが提供されている:"
92
93 #. type: IP
94 #: build/C/man7/epoll.7:36 build/C/man7/epoll.7:46 build/C/man7/epoll.7:54
95 #, no-wrap
96 msgid "*"
97 msgstr "*"
98
99 #. type: Plain text
100 #: build/C/man7/epoll.7:46
101 msgid ""
102 "An B<epoll> instance created by B<epoll_create>(2), which returns a file "
103 "descriptor referring to the epoll instance.  (The more recent "
104 "B<epoll_create1>(2)  extends the functionality of B<epoll_create>(2).)"
105 msgstr ""
106 "B<epoll> インスタンスは B<epoll_create>(2)  で作成される。 B<epoll_create>"
107 "(2)  は作成した epoll インスタンスを参照するファイルディスクリプタを返す。 "
108 "(もっと新しい B<epoll_create1>(2)  では、 B<epoll_create>(2)  の機能が拡張さ"
109 "れている)。"
110
111 #. type: Plain text
112 #: build/C/man7/epoll.7:54
113 msgid ""
114 "Interest in particular file descriptors is then registered via B<epoll_ctl>"
115 "(2).  The set of file descriptors currently registered on an B<epoll> "
116 "instance is sometimes called an I<epoll> set."
117 msgstr ""
118 "特定のファイルディスクリプタに対する監視内容を B<epoll_ctl>(2)  で登録する。 "
119 "B<epoll> インスタンスに現在登録されているファイルディスクリプタの集合は "
120 "I<epoll> 集合と呼ばれることもある。"
121
122 #. type: Plain text
123 #: build/C/man7/epoll.7:57
124 msgid "Finally, the actual wait is started by B<epoll_wait>(2)."
125 msgstr "最後に B<epoll_wait>(2)  で実際のイベント待ちを開始する。"
126
127 #. type: SS
128 #: build/C/man7/epoll.7:57
129 #, no-wrap
130 msgid "Level-Triggered and Edge-Triggered"
131 msgstr "レベルトリガとエッジトリガ"
132
133 #. type: Plain text
134 #: build/C/man7/epoll.7:66
135 msgid ""
136 "The B<epoll> event distribution interface is able to behave both as edge-"
137 "triggered (ET) and as level-triggered (LT).  The difference between the two "
138 "mechanisms can be described as follows.  Suppose that this scenario happens:"
139 msgstr ""
140 "B<epoll> イベント配送 (distribution) インタフェースは、 エッジトリガ (ET) と"
141 "してもレベルトリガ (LT) としても動作させることができる。 二つの配送機構の違い"
142 "は、次のように説明できる。 このようなシナリオが起こったとしよう:"
143
144 #. type: IP
145 #: build/C/man7/epoll.7:66
146 #, no-wrap
147 msgid "1."
148 msgstr "1."
149
150 #. type: Plain text
151 #: build/C/man7/epoll.7:72
152 msgid ""
153 "The file descriptor that represents the read side of a pipe (I<rfd>)  is "
154 "registered on the B<epoll> instance."
155 msgstr ""
156 "パイプの読み込み側を表すファイルディスクリプタ (I<rfd>)  が B<epoll> インスタ"
157 "ンスに登録される。"
158
159 #. type: IP
160 #: build/C/man7/epoll.7:72
161 #, no-wrap
162 msgid "2."
163 msgstr "2."
164
165 #. type: Plain text
166 #: build/C/man7/epoll.7:74
167 msgid "A pipe writer writes 2 kB of data on the write side of the pipe."
168 msgstr ""
169 "パイプへ書き込むプログラムが 2 kB のデータをパイプの書き込み側へ書き込む。"
170
171 #. type: IP
172 #: build/C/man7/epoll.7:74
173 #, no-wrap
174 msgid "3."
175 msgstr "3."
176
177 #. type: Plain text
178 #: build/C/man7/epoll.7:80
179 msgid ""
180 "A call to B<epoll_wait>(2)  is done that will return I<rfd> as a ready file "
181 "descriptor."
182 msgstr ""
183 "B<epoll_wait>(2)  を呼び出すと、読み込み可能 (ready) なファイルディスクリプタ"
184 "として I<rfd> が返る。"
185
186 #. type: IP
187 #: build/C/man7/epoll.7:80
188 #, no-wrap
189 msgid "4."
190 msgstr "4."
191
192 #. type: Plain text
193 #: build/C/man7/epoll.7:83
194 msgid "The pipe reader reads 1 kB of data from I<rfd>."
195 msgstr "パイプから読み出すプログラムが、1 kB のデータを I<rfd> から読み出す。"
196
197 #. type: IP
198 #: build/C/man7/epoll.7:83
199 #, no-wrap
200 msgid "5."
201 msgstr "5."
202
203 #. type: Plain text
204 #: build/C/man7/epoll.7:87
205 msgid "A call to B<epoll_wait>(2)  is done."
206 msgstr "B<epoll_wait>(2)  の呼び出しが行われる。"
207
208 #. type: Plain text
209 #: build/C/man7/epoll.7:122
210 msgid ""
211 "If the I<rfd> file descriptor has been added to the B<epoll> interface using "
212 "the B<EPOLLET> (edge-triggered)  flag, the call to B<epoll_wait>(2)  done in "
213 "step B<5> will probably hang despite the available data still present in the "
214 "file input buffer; meanwhile the remote peer might be expecting a response "
215 "based on the data it already sent.  The reason for this is that edge-"
216 "triggered mode only delivers events when changes occur on the monitored file "
217 "descriptor.  So, in step B<5> the caller might end up waiting for some data "
218 "that is already present inside the input buffer.  In the above example, an "
219 "event on I<rfd> will be generated because of the write done in B<2> and the "
220 "event is consumed in B<3>.  Since the read operation done in B<4> does not "
221 "consume the whole buffer data, the call to B<epoll_wait>(2)  done in step "
222 "B<5> might block indefinitely."
223 msgstr ""
224 "I<rfd> ファイルディスクリプタが B<EPOLLET> フラグ (エッジトリガ) を使って "
225 "B<epoll> に追加されていると、 利用可能なデータがファイル入力バッファにまだ存"
226 "在するにもかかわらず ステップ B<5> の B<epoll_wait>(2)  の呼び出しでハングす"
227 "る可能性がある。 その一方で、リモートの接続先 (peer) は既に送られたデータに "
228 "基づいて応答を期待しているかもしれない。 このようなことが起こる理由は、エッジ"
229 "トリガイベント配送では、 モニタしているファイルでイベントが起ったときにのみイ"
230 "ベントが 配送されるためである。 したがって、ステップ B<5> では、呼び出し側は"
231 "結果的に 入力バッファ内にすで存在するデータを待つことになるかもしれない。 上"
232 "記の例では、 B<2> で行われた書き込みによって I<rfd> に関するイベントが生成さ"
233 "れ、 B<3> でイベントが消費 (consume) される。 B<4> で行われる読み込み操作で"
234 "は、全部のバッファデータを消費しないので、 ステップ B<5> で行われる "
235 "B<epoll_wait>(2)  の呼び出しが 無期限に停止 (block) するかもしれない。"
236
237 #. type: Plain text
238 #: build/C/man7/epoll.7:132
239 msgid ""
240 "An application that employs the B<EPOLLET> flag should use nonblocking file "
241 "descriptors to avoid having a blocking read or write starve a task that is "
242 "handling multiple file descriptors.  The suggested way to use B<epoll> as an "
243 "edge-triggered (B<EPOLLET>)  interface is as follows:"
244 msgstr ""
245 "B<EPOLLET> フラグを採用するアプリケーションでは、 インタフェースはブロックし"
246 "ない (nonblocking) ファイルディスクリプタを 使うべきである。 これは、ブロック"
247 "される読み込みや書き込みによって、 複数のファイルディスクリプタを扱うタスク"
248 "が 停止してしまうのを避けるためである。 B<epoll> をエッジトリガ "
249 "(B<EPOLLET>)  インタフェースとして使うために提案される方法は以下の通りであ"
250 "る。"
251
252 #. type: TP
253 #: build/C/man7/epoll.7:133
254 #, no-wrap
255 msgid "B<i>"
256 msgstr "B<i>"
257
258 #. type: Plain text
259 #: build/C/man7/epoll.7:136
260 msgid "with nonblocking file descriptors; and"
261 msgstr "ブロックしないファイルディスクリプタと共に使う。"
262
263 #. type: TP
264 #: build/C/man7/epoll.7:136
265 #, no-wrap
266 msgid "B<ii>"
267 msgstr "B<ii>"
268
269 #. type: Plain text
270 #: build/C/man7/epoll.7:144
271 msgid ""
272 "by waiting for an event only after B<read>(2)  or B<write>(2)  return "
273 "B<EAGAIN>."
274 msgstr ""
275 "B<read>(2)  または B<write>(2)  が B<EAGAIN> を返した後でのみ、イベントを待"
276 "つ。"
277
278 #. type: Plain text
279 #: build/C/man7/epoll.7:155
280 msgid ""
281 "By contrast, when used as a level-triggered interface (the default, when "
282 "B<EPOLLET> is not specified), B<epoll> is simply a faster B<poll>(2), and "
283 "can be used wherever the latter is used since it shares the same semantics."
284 msgstr ""
285 "一方、レベルトリガインタフェースとして使う場合\n"
286 " (こちらがデフォルトである、\n"
287 "B<EPOLLET> が指定されなかった場合)、\n"
288 "B<epoll> は単に高速な B<poll>(2) であり、使い方が同じなので、\n"
289 "B<poll>(2) が使われているところではどこでも使用することができる。"
290
291 #. type: Plain text
292 #: build/C/man7/epoll.7:172
293 msgid ""
294 "Since even with edge-triggered B<epoll>, multiple events can be generated "
295 "upon receipt of multiple chunks of data, the caller has the option to "
296 "specify the B<EPOLLONESHOT> flag, to tell B<epoll> to disable the associated "
297 "file descriptor after the receipt of an event with B<epoll_wait>(2).  When "
298 "the B<EPOLLONESHOT> flag is specified, it is the caller's responsibility to "
299 "rearm the file descriptor using B<epoll_ctl>(2)  with B<EPOLL_CTL_MOD>."
300 msgstr ""
301 "エッジトリガを使った場合でも、複数のデータを受信すると複数の B<epoll> イベン"
302 "トが生成されるので、 呼び出し側には B<EPOLLONESHOT> フラグを指定するオプショ"
303 "ンがある。 このフラグは B<epoll> に対して、 B<epoll_wait>(2)  によるイベント"
304 "を受信した後で、関連するファイルディスクリプタを無効にさせる。 "
305 "B<EPOLLONESHOT> フラグが指定された場合、 B<epoll_ctl>(2)  に "
306 "B<EPOLL_CTL_MOD> を指定してファイルディスクリプタを再度使用できるようにするの"
307 "は、 呼び出し側の責任である。"
308
309 #. type: SS
310 #: build/C/man7/epoll.7:172
311 #, no-wrap
312 msgid "/proc interfaces"
313 msgstr "/proc インタフェース"
314
315 #.  Following was added in 2.6.28, but them removed in 2.6.29
316 #.  .TP
317 #.  .IR /proc/sys/fs/epoll/max_user_instances " (since Linux 2.6.28)"
318 #.  This specifies an upper limit on the number of epoll instances
319 #.  that can be created per real user ID.
320 #. type: Plain text
321 #: build/C/man7/epoll.7:180
322 msgid ""
323 "The following interfaces can be used to limit the amount of kernel memory "
324 "consumed by epoll:"
325 msgstr ""
326 "epoll が消費するカーネルメモリの量を制限するために、 以下のインタフェースを使"
327 "用することができる。"
328
329 #. type: TP
330 #: build/C/man7/epoll.7:180
331 #, no-wrap
332 msgid "I</proc/sys/fs/epoll/max_user_watches> (since Linux 2.6.28)"
333 msgstr "I</proc/sys/fs/epoll/max_user_watches> (Linux 2.6.28 以降)"
334
335 #.  2.6.29 (in 2.6.28, the default was 1/32 of lowmem)
336 #. type: Plain text
337 #: build/C/man7/epoll.7:194
338 msgid ""
339 "This specifies a limit on the total number of file descriptors that a user "
340 "can register across all epoll instances on the system.  The limit is per "
341 "real user ID.  Each registered file descriptor costs roughly 90 bytes on a "
342 "32-bit kernel, and roughly 160 bytes on a 64-bit kernel.  Currently, the "
343 "default value for I<max_user_watches> is 1/25 (4%) of the available low "
344 "memory, divided by the registration cost in bytes."
345 msgstr ""
346 "このファイルは、あるユーザがシステム上の全ての epoll インスタンスに 登録でき"
347 "るファイルディスクリプタの総数の上限を規定する。 この上限は実ユーザ ID 単位で"
348 "ある。 登録されたファイルディスクリプタ 1 つが消費するメモリ量は、 32 ビット"
349 "カーネルでおよそ 90 バイト、 64 ビットカーネルでおよそ 160 バイトである。 現"
350 "在のところ、 I<max_user_watches> のデフォルト値は、利用可能なメモリ下限の "
351 "1/25 (4%) であり、 登録で消費されるメモリ量 (バイト単位) で割った値となる。"
352
353 #. type: SS
354 #: build/C/man7/epoll.7:194
355 #, no-wrap
356 msgid "Example for Suggested Usage"
357 msgstr "おすすめな使用例"
358
359 #. type: Plain text
360 #: build/C/man7/epoll.7:223
361 msgid ""
362 "While the usage of B<epoll> when employed as a level-triggered interface "
363 "does have the same semantics as B<poll>(2), the edge-triggered usage "
364 "requires more clarification to avoid stalls in the application event loop.  "
365 "In this example, listener is a nonblocking socket on which B<listen>(2)  has "
366 "been called.  The function I<do_use_fd()> uses the new ready file descriptor "
367 "until B<EAGAIN> is returned by either B<read>(2)  or B<write>(2).  An event-"
368 "driven state machine application should, after having received B<EAGAIN>, "
369 "record its current state so that at the next call to I<do_use_fd()> it will "
370 "continue to B<read>(2)  or B<write>(2)  from where it stopped before."
371 msgstr ""
372 "レベルトリガインタフェースとして使用するときの B<epoll> の使い方は B<poll>"
373 "(2)  と同じである。 しかしエッジトリガとして使う場合は、 アプリケーションのイ"
374 "ベントループでストール (stall) しないように、 使い方をより明確にしておく必要"
375 "がある。 この例では、リスナはブロックしないソケットであり、 B<listen>(2)  が"
376 "呼ばれている。 関数 I<do_use_fd()> は、 B<read>(2)  または B<write>(2)  に"
377 "よって B<EAGAIN> が返されるまでは、新しい準備済みのファイルディスクリプタを使"
378 "う。 イベント駆動ステートマシンアプリケーションは、 B<EAGAIN> を受信した後、"
379 "カレントの状態を記録しておくべきである。 これにより、次の I<do_use_fd()> 呼び"
380 "出しのときに、以前に停止したところから B<read>(2)  または B<write>(2)  を継続"
381 "することができる。"
382
383 #. type: Plain text
384 #: build/C/man7/epoll.7:229
385 #, no-wrap
386 msgid ""
387 "#define MAX_EVENTS 10\n"
388 "struct epoll_event ev, events[MAX_EVENTS];\n"
389 "int listen_sock, conn_sock, nfds, epollfd;\n"
390 msgstr ""
391 "#define MAX_EVENTS 10\n"
392 "struct epoll_event ev, events[MAX_EVENTS];\n"
393 "int listen_sock, conn_sock, nfds, epollfd;\n"
394
395 #. type: Plain text
396 #: build/C/man7/epoll.7:232
397 #, no-wrap
398 msgid ""
399 "/* Set up listening socket, \\(aqlisten_sock\\(aq (socket(),\n"
400 "   bind(), listen()) */\n"
401 msgstr ""
402 "/* Set up listening socket, \\(aqlisten_sock\\(aq (socket(),\n"
403 "   bind(), listen()) */\n"
404
405 #. type: Plain text
406 #: build/C/man7/epoll.7:238
407 #, no-wrap
408 msgid ""
409 "epollfd = epoll_create(10);\n"
410 "if (epollfd == -1) {\n"
411 "    perror(\"epoll_create\");\n"
412 "    exit(EXIT_FAILURE);\n"
413 "}\n"
414 msgstr ""
415 "epollfd = epoll_create(10);\n"
416 "if (epollfd == -1) {\n"
417 "    perror(\"epoll_create\");\n"
418 "    exit(EXIT_FAILURE);\n"
419 "}\n"
420
421 #. type: Plain text
422 #: build/C/man7/epoll.7:245
423 #, no-wrap
424 msgid ""
425 "ev.events = EPOLLIN;\n"
426 "ev.data.fd = listen_sock;\n"
427 "if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n"
428 "    perror(\"epoll_ctl: listen_sock\");\n"
429 "    exit(EXIT_FAILURE);\n"
430 "}\n"
431 msgstr ""
432 "ev.events = EPOLLIN;\n"
433 "ev.data.fd = listen_sock;\n"
434 "if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n"
435 "    perror(\"epoll_ctl: listen_sock\");\n"
436 "    exit(EXIT_FAILURE);\n"
437 "}\n"
438
439 #. type: Plain text
440 #: build/C/man7/epoll.7:252
441 #, no-wrap
442 msgid ""
443 "for (;;) {\n"
444 "    nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n"
445 "    if (nfds == -1) {\n"
446 "        perror(\"epoll_pwait\");\n"
447 "        exit(EXIT_FAILURE);\n"
448 "    }\n"
449 msgstr ""
450 "for (;;) {\n"
451 "    nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n"
452 "    if (nfds == -1) {\n"
453 "        perror(\"epoll_pwait\");\n"
454 "        exit(EXIT_FAILURE);\n"
455 "    }\n"
456
457 #. type: Plain text
458 #: build/C/man7/epoll.7:274
459 #, no-wrap
460 msgid ""
461 "    for (n = 0; n E<lt> nfds; ++n) {\n"
462 "        if (events[n].data.fd == listen_sock) {\n"
463 "            conn_sock = accept(listen_sock,\n"
464 "                            (struct sockaddr *) &local, &addrlen);\n"
465 "            if (conn_sock == -1) {\n"
466 "                perror(\"accept\");\n"
467 "                exit(EXIT_FAILURE);\n"
468 "            }\n"
469 "            setnonblocking(conn_sock);\n"
470 "            ev.events = EPOLLIN | EPOLLET;\n"
471 "            ev.data.fd = conn_sock;\n"
472 "            if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n"
473 "                        &ev) == -1) {\n"
474 "                perror(\"epoll_ctl: conn_sock\");\n"
475 "                exit(EXIT_FAILURE);\n"
476 "            }\n"
477 "        } else {\n"
478 "            do_use_fd(events[n].data.fd);\n"
479 "        }\n"
480 "    }\n"
481 "}\n"
482 msgstr ""
483 "    for (n = 0; n E<lt> nfds; ++n) {\n"
484 "        if (events[n].data.fd == listen_sock) {\n"
485 "            conn_sock = accept(listen_sock,\n"
486 "                            (struct sockaddr *) &local, &addrlen);\n"
487 "            if (conn_sock == -1) {\n"
488 "                perror(\"accept\");\n"
489 "                exit(EXIT_FAILURE);\n"
490 "            }\n"
491 "            setnonblocking(conn_sock);\n"
492 "            ev.events = EPOLLIN | EPOLLET;\n"
493 "            ev.data.fd = conn_sock;\n"
494 "            if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n"
495 "                        &ev) == -1) {\n"
496 "                perror(\"epoll_ctl: conn_sock\");\n"
497 "                exit(EXIT_FAILURE);\n"
498 "            }\n"
499 "        } else {\n"
500 "            do_use_fd(events[n].data.fd);\n"
501 "        }\n"
502 "    }\n"
503 "}\n"
504
505 #. type: Plain text
506 #: build/C/man7/epoll.7:293
507 msgid ""
508 "When used as an edge-triggered interface, for performance reasons, it is "
509 "possible to add the file descriptor inside the B<epoll> interface "
510 "(B<EPOLL_CTL_ADD>)  once by specifying (B<EPOLLIN>|B<EPOLLOUT>).  This "
511 "allows you to avoid continuously switching between B<EPOLLIN> and "
512 "B<EPOLLOUT> calling B<epoll_ctl>(2)  with B<EPOLL_CTL_MOD>."
513 msgstr ""
514 "エッジトリガインタフェースとして使う場合、性能上の理由により、 一度 "
515 "(B<EPOLLIN>|B<EPOLLOUT>)  を指定してから (B<EPOLL_CTL_ADD> で) ファイルディス"
516 "クリプタを B<epoll> インタフェースに追加することができる。 これにより、 "
517 "B<epoll_ctl>(2)  に B<EPOLL_CTL_MOD> を指定して呼び出すことで B<EPOLLIN> と "
518 "B<EPOLLOUT> の連続的な切り替えが避けられる。"
519
520 #. type: SS
521 #: build/C/man7/epoll.7:293
522 #, no-wrap
523 msgid "Questions and Answers"
524 msgstr "質問と解答"
525
526 #. type: TP
527 #: build/C/man7/epoll.7:294
528 #, no-wrap
529 msgid "B<Q0>"
530 msgstr "B<Q0>"
531
532 #. type: Plain text
533 #: build/C/man7/epoll.7:299
534 msgid ""
535 "What is the key used to distinguish the file descriptors registered in an "
536 "B<epoll> set?"
537 msgstr ""
538 "B<epoll> 集合内の登録されたファイルディスクリプタを区別するには、 何をキーと"
539 "して使えばよいか?"
540
541 #. type: TP
542 #: build/C/man7/epoll.7:299
543 #, no-wrap
544 msgid "B<A0>"
545 msgstr "B<A0>"
546
547 #. type: Plain text
548 #: build/C/man7/epoll.7:305
549 msgid ""
550 "The key is the combination of the file descriptor number and the open file "
551 "description (also known as an \"open file handle\", the kernel's internal "
552 "representation of an open file)."
553 msgstr ""
554 "キーはファイルディスクリプタ番号とオープンファイル記述 (open file "
555 "description) の組である (オープンファイル記述は \"open file handle\" とも 呼"
556 "ばれ、オープンされたファイルのカーネルの内部表現である)。"
557
558 #. type: TP
559 #: build/C/man7/epoll.7:305
560 #, no-wrap
561 msgid "B<Q1>"
562 msgstr "B<Q1>"
563
564 #. type: Plain text
565 #: build/C/man7/epoll.7:310
566 msgid ""
567 "What happens if you register the same file descriptor on an B<epoll> "
568 "instance twice?"
569 msgstr ""
570 "1 つの B<epoll> インスタンスに同じファイルディスクリプタを 2 回登録するとどう"
571 "なるか?"
572
573 #. type: TP
574 #: build/C/man7/epoll.7:310
575 #, no-wrap
576 msgid "B<A1>"
577 msgstr "B<A1>"
578
579 #.  But a descriptor duplicated by fork(2) can't be added to the
580 #.  set, because the [file *, fd] pair is already in the epoll set.
581 #.  That is a somewhat ugly inconsistency.  On the one hand, a child process
582 #.  cannot add the duplicate file descriptor to the epoll set.  (In every
583 #.  other case that I can think of, descriptors duplicated by fork have
584 #.  similar semantics to descriptors duplicated by dup() and friends.)  On
585 #.  the other hand, the very fact that the child has a duplicate of the
586 #.  descriptor means that even if the parent closes its descriptor, then
587 #.  epoll_wait() in the parent will continue to receive notifications for
588 #.  that descriptor because of the duplicated descriptor in the child.
589 #.  See http://thread.gmane.org/gmane.linux.kernel/596462/
590 #.  "epoll design problems with common fork/exec patterns"
591 #.  mtk, Feb 2008
592 #. type: Plain text
593 #: build/C/man7/epoll.7:341
594 msgid ""
595 "You will probably get B<EEXIST>.  However, it is possible to add a duplicate "
596 "(B<dup>(2), B<dup2>(2), B<fcntl>(2)  B<F_DUPFD>)  descriptor to the same "
597 "B<epoll> instance.  This can be a useful technique for filtering events, if "
598 "the duplicate file descriptors are registered with different I<events> masks."
599 msgstr ""
600 "たぶん B<EEXIST> を受け取るだろう。 しかしながら、同じ B<epoll> インスタンス"
601 "に対して複製されたディスクリプタを追加することは可能である (B<dup>(2), "
602 "B<dup2>(2), B<fcntl>(2)  B<F_DUPFD> など)。 複製したファイルディスクリプタを"
603 "異なる I<events> マスクで登録すれば、イベントをフィルタリングするのに この機"
604 "能は有用な手法である。"
605
606 #. type: TP
607 #: build/C/man7/epoll.7:341
608 #, no-wrap
609 msgid "B<Q2>"
610 msgstr "B<Q2>"
611
612 #. type: Plain text
613 #: build/C/man7/epoll.7:349
614 msgid ""
615 "Can two B<epoll> instances wait for the same file descriptor? If so, are "
616 "events reported to both B<epoll> file descriptors?"
617 msgstr ""
618 "2 つの B<epoll> インスタンスが同じファイルディスクリプタを待ち受けることは可"
619 "能か? もし可能であれば、イベントは両方の B<epoll> ファイルディスクリプタに報"
620 "告されるか?"
621
622 #. type: TP
623 #: build/C/man7/epoll.7:349
624 #, no-wrap
625 msgid "B<A2>"
626 msgstr "B<A2>"
627
628 #. type: Plain text
629 #: build/C/man7/epoll.7:353
630 msgid ""
631 "Yes, and events would be reported to both.  However, careful programming may "
632 "be needed to do this correctly."
633 msgstr ""
634 "イベントは両方に報告される。 しかしながら、これを正しく扱うには注意深くプログ"
635 "ラミングする必要が あるかもしれない。"
636
637 #. type: TP
638 #: build/C/man7/epoll.7:353
639 #, no-wrap
640 msgid "B<Q3>"
641 msgstr "B<Q3>"
642
643 #. type: Plain text
644 #: build/C/man7/epoll.7:358
645 msgid "Is the B<epoll> file descriptor itself poll/epoll/selectable?"
646 msgstr "B<epoll> ファイルディスクリプタ自身は poll/epoll/select が可能か?"
647
648 #. type: TP
649 #: build/C/man7/epoll.7:358
650 #, no-wrap
651 msgid "B<A3>"
652 msgstr "B<A3>"
653
654 #. type: Plain text
655 #: build/C/man7/epoll.7:365
656 msgid ""
657 "Yes.  If an B<epoll> file descriptor has events waiting then it will "
658 "indicate as being readable."
659 msgstr ""
660 "可能である。 B<epoll> ファイルディスクリプタに処理待ちのイベントがある場合"
661 "は、 読み出し可能だと通知されることだろう。"
662
663 #. type: TP
664 #: build/C/man7/epoll.7:365
665 #, no-wrap
666 msgid "B<Q4>"
667 msgstr "B<Q4>"
668
669 #. type: Plain text
670 #: build/C/man7/epoll.7:370
671 msgid ""
672 "What happens if one attempts to put an B<epoll> file descriptor into its own "
673 "file descriptor set?"
674 msgstr ""
675 "B<epoll> ファイルディスクリプタを自身のファイルディスクリプタ集合に 入れよう"
676 "とするとどうなるか?"
677
678 #. type: TP
679 #: build/C/man7/epoll.7:370
680 #, no-wrap
681 msgid "B<A4>"
682 msgstr "B<A4>"
683
684 #. type: Plain text
685 #: build/C/man7/epoll.7:381
686 msgid ""
687 "The B<epoll_ctl>(2)  call will fail (B<EINVAL>).  However, you can add an "
688 "B<epoll> file descriptor inside another B<epoll> file descriptor set."
689 msgstr ""
690 "B<epoll_ctl>(2)  の呼び出しは (B<EINVAL> で) 失敗するだろう。 ただし "
691 "B<epoll> ファイルディスクリプタを他の B<epoll> ファイルディスクリプタ集合の内"
692 "部に追加することは可能である。"
693
694 #. type: TP
695 #: build/C/man7/epoll.7:381
696 #, no-wrap
697 msgid "B<Q5>"
698 msgstr "B<Q5>"
699
700 #. type: Plain text
701 #: build/C/man7/epoll.7:386
702 msgid ""
703 "Can I send an B<epoll> file descriptor over a UNIX domain socket to another "
704 "process?"
705 msgstr ""
706 "B<epoll> ファイルディスクリプタを UNIX ドメインソケットで他のプロセスに送るこ"
707 "とは可能か?"
708
709 #. type: TP
710 #: build/C/man7/epoll.7:386
711 #, no-wrap
712 msgid "B<A5>"
713 msgstr "B<A5>"
714
715 #. type: Plain text
716 #: build/C/man7/epoll.7:392
717 msgid ""
718 "Yes, but it does not make sense to do this, since the receiving process "
719 "would not have copies of the file descriptors in the B<epoll> set."
720 msgstr ""
721 "可能だが、これをすることに意味はない。 なぜなら、受信側のプロセスが B<epoll> "
722 "集合内のファイルディスクリプタのコピーを持っていないからである。"
723
724 #. type: TP
725 #: build/C/man7/epoll.7:392
726 #, no-wrap
727 msgid "B<Q6>"
728 msgstr "B<Q6>"
729
730 #. type: Plain text
731 #: build/C/man7/epoll.7:397
732 msgid ""
733 "Will closing a file descriptor cause it to be removed from all B<epoll> sets "
734 "automatically?"
735 msgstr ""
736 "ファイルディスクリプタをクローズすると、そのファイルディスクリプタは全ての "
737 "B<epoll> 集合から自動的に削除されるか?"
738
739 #. type: TP
740 #: build/C/man7/epoll.7:397
741 #, no-wrap
742 msgid "B<A6>"
743 msgstr "B<A6>"
744
745 #. type: Plain text
746 #: build/C/man7/epoll.7:425
747 msgid ""
748 "Yes, but be aware of the following point.  A file descriptor is a reference "
749 "to an open file description (see B<open>(2)).  Whenever a descriptor is "
750 "duplicated via B<dup>(2), B<dup2>(2), B<fcntl>(2)  B<F_DUPFD>, or B<fork>"
751 "(2), a new file descriptor referring to the same open file description is "
752 "created.  An open file description continues to exist until all file "
753 "descriptors referring to it have been closed.  A file descriptor is removed "
754 "from an B<epoll> set only after all the file descriptors referring to the "
755 "underlying open file description have been closed (or before if the "
756 "descriptor is explicitly removed using B<epoll_ctl>(2)  B<EPOLL_CTL_DEL>).  "
757 "This means that even after a file descriptor that is part of an B<epoll> set "
758 "has been closed, events may be reported for that file descriptor if other "
759 "file descriptors referring to the same underlying file description remain "
760 "open."
761 msgstr ""
762 "削除されるが、以下の点に注意が必要である。 ファイルディスクリプタはオープン"
763 "ファイル記述 (B<open>(2)  参照) への参照である。 ディスクリプタの複製を "
764 "B<dup>(2), B<dup2>(2), B<fcntl>(2)  の B<F_DUPFD> や B<fork>(2)  経由で行う度"
765 "に、同じオープンファイル記述を参照する新規のファイル ディスクリプタが生成され"
766 "る。 オープンファイル記述自体は、自身を参照する全てのファイルディスクリプタ "
767 "がクローズされるまで存在し続ける。 ファイルディスクリプタが B<epoll> 集合から"
768 "削除されるのは、対応するオープンファイル記述を参照している 全てのファイルディ"
769 "スクリプタがクローズされた後である (B<epoll_ctl>(2)  B<EPOLL_CTL_DEL> を使っ"
770 "てそのディスクリプタを明示的に削除した場合にも削除される)。 このことは、 "
771 "B<epoll> 集合に属しているあるファイルディスクリプタをクローズした後であって"
772 "も、 同じファイル記述を参照する他のファイルディスクリプタがオープンされている"
773 "間は、 クローズしたファイルディスクリプタ宛にイベントが報告される可能性がある"
774 "と いうことを意味する。"
775
776 #. type: TP
777 #: build/C/man7/epoll.7:425
778 #, no-wrap
779 msgid "B<Q7>"
780 msgstr "B<Q7>"
781
782 #. type: Plain text
783 #: build/C/man7/epoll.7:430
784 msgid ""
785 "If more than one event occurs between B<epoll_wait>(2)  calls, are they "
786 "combined or reported separately?"
787 msgstr ""
788 "2 つ以上のイベントが B<epoll_wait>(2)  コールの間に発生した場合、それらはまと"
789 "めて報告されるか、 それとも別々に報告されるか?"
790
791 #. type: TP
792 #: build/C/man7/epoll.7:430
793 #, no-wrap
794 msgid "B<A7>"
795 msgstr "B<A7>"
796
797 #. type: Plain text
798 #: build/C/man7/epoll.7:433
799 msgid "They will be combined."
800 msgstr "まとめて報告されるだろう。"
801
802 #. type: TP
803 #: build/C/man7/epoll.7:433
804 #, no-wrap
805 msgid "B<Q8>"
806 msgstr "B<Q8>"
807
808 #. type: Plain text
809 #: build/C/man7/epoll.7:437
810 msgid ""
811 "Does an operation on a file descriptor affect the already collected but not "
812 "yet reported events?"
813 msgstr ""
814 "ファイルディスクリプタに対する操作は、 既に集められているがまだ報告されていな"
815 "いイベントに影響するか?"
816
817 #. type: TP
818 #: build/C/man7/epoll.7:437
819 #, no-wrap
820 msgid "B<A8>"
821 msgstr "B<A8>"
822
823 #. type: Plain text
824 #: build/C/man7/epoll.7:443
825 msgid ""
826 "You can do two operations on an existing file descriptor.  Remove would be "
827 "meaningless for this case.  Modify will reread available I/O."
828 msgstr ""
829 "既存のファイルディスクリプタに対して 2 つの操作を行うことができる。 この場"
830 "合、削除には意味がない。 変更すると、使用可能な I/O が再び読み込まれる。"
831
832 #. type: TP
833 #: build/C/man7/epoll.7:443
834 #, no-wrap
835 msgid "B<Q9>"
836 msgstr "B<Q9>"
837
838 #. type: Plain text
839 #: build/C/man7/epoll.7:451
840 msgid ""
841 "Do I need to continuously read/write a file descriptor until B<EAGAIN> when "
842 "using the B<EPOLLET> flag (edge-triggered behavior) ?"
843 msgstr ""
844 "B<EPOLLET> フラグ (エッジトリガ動作) を使っている場合、 B<EAGAIN> を受け取る"
845 "まで、 継続してファイルディスクリプタを読み書きする必要があるか?"
846
847 #. type: TP
848 #: build/C/man7/epoll.7:451
849 #, no-wrap
850 msgid "B<A9>"
851 msgstr "B<A9>"
852
853 #. type: Plain text
854 #: build/C/man7/epoll.7:461
855 msgid ""
856 "Receiving an event from B<epoll_wait>(2)  should suggest to you that such "
857 "file descriptor is ready for the requested I/O operation.  You must consider "
858 "it ready until the next (nonblocking)  read/write yields B<EAGAIN>.  When "
859 "and how you will use the file descriptor is entirely up to you."
860 msgstr ""
861 "B<epoll_wait>(2)  からイベントを受け取ることは、 そのファイルディスクリプタが"
862 "要求された I/O 操作に対して準備済みである、 ということをユーザに示すものであ"
863 "る。 次の (ブロックしない) read/write で B<EAGAIN> を受け取るまではファイル"
864 "ディスクリプタは準備済みであると 考えなければならない。 そのファイルディスク"
865 "リプタをいつどのように使うかは、 全くユーザに任されてる。"
866
867 #. type: Plain text
868 #: build/C/man7/epoll.7:467
869 msgid ""
870 "For packet/token-oriented files (e.g., datagram socket, terminal in "
871 "canonical mode), the only way to detect the end of the read/write I/O space "
872 "is to continue to read/write until B<EAGAIN>."
873 msgstr ""
874 "パケット指向やトークン指向のファイル (例えば、データグラムソケット、 "
875 "canonical モードの端末) では、 読み込み用 / 書き込み用の I/O 空間の末尾を検知"
876 "する唯一の方法は B<EAGAIN> になるまで read/write を行うことである。"
877
878 #. type: Plain text
879 #: build/C/man7/epoll.7:483
880 msgid ""
881 "For stream-oriented files (e.g., pipe, FIFO, stream socket), the condition "
882 "that the read/write I/O space is exhausted can also be detected by checking "
883 "the amount of data read from / written to the target file descriptor.  For "
884 "example, if you call B<read>(2)  by asking to read a certain amount of data "
885 "and B<read>(2)  returns a lower number of bytes, you can be sure of having "
886 "exhausted the read I/O space for the file descriptor.  The same is true when "
887 "writing using B<write>(2).  (Avoid this latter technique if you cannot "
888 "guarantee that the monitored file descriptor always refers to a stream-"
889 "oriented file.)"
890 msgstr ""
891 "ストリーム指向のファイル (例えば、パイプ、FIFO、ストリームソケット) では、 読"
892 "み込み用 / 書き込み用の I/O 空間が使い尽くされた状態は、 対象となるファイル"
893 "ディスクリプタから読み込んだデータ量または 書き込んだデータ量をチェックするこ"
894 "とでも検知できる。 例えば、ある特定の量のデータを読み込むために B<read>(2)  "
895 "を呼んだときに、 B<read>(2)  が返したバイト数がそれより少なかった場合、 その"
896 "ファイルディスクリプタの読み込み用 I/O 空間が 使い尽くされたことが分かる。 "
897 "B<write>(2)  を使って書き込みをするときも、同じことが言える (監視しているファ"
898 "イルディスクリプタが常にストリーム指向のファイルを 参照していることを保証でき"
899 "ない場合には、後者の手法の使用を避けること)。"
900
901 #. type: SS
902 #: build/C/man7/epoll.7:483
903 #, no-wrap
904 msgid "Possible Pitfalls and Ways to Avoid Them"
905 msgstr "ありがちな落とし穴と回避方法"
906
907 #. type: TP
908 #: build/C/man7/epoll.7:484
909 #, no-wrap
910 msgid "B<o Starvation (edge-triggered)>"
911 msgstr "B<o 飢餓 (starvation) (エッジトリガ)>"
912
913 #. type: Plain text
914 #: build/C/man7/epoll.7:492
915 msgid ""
916 "If there is a large amount of I/O space, it is possible that by trying to "
917 "drain it the other files will not get processed causing starvation.  (This "
918 "problem is not specific to B<epoll>.)"
919 msgstr ""
920 "大きな I/O 空間がある場合、 その I/O 空間のデータを全て処理 (drain) しようと"
921 "すると、 他のファイルが処理されず、飢餓を発生させることがある (この問題は "
922 "B<epoll> に固有のものではない)。"
923
924 #. type: Plain text
925 #: build/C/man7/epoll.7:500
926 msgid ""
927 "The solution is to maintain a ready list and mark the file descriptor as "
928 "ready in its associated data structure, thereby allowing the application to "
929 "remember which files need to be processed but still round robin amongst all "
930 "the ready files.  This also supports ignoring subsequent events you receive "
931 "for file descriptors that are already ready."
932 msgstr ""
933 "この問題の解決法は、準備済み状態のリストを管理して、 関連する data 構造体の中"
934 "でファイルディスクリプタが 利用可能であるとマークすることである。 それによっ"
935 "て、利用可能なすべてのファイルの中で どのファイルを処理する必要があるかを憶え"
936 "ることができ、 しかも順番に処理 (round robin) することができる。 既に利用可能"
937 "であるファイルディスクリプタに対して それ以後に受け取るイベントを無視すること"
938 "もできる。"
939
940 #. type: TP
941 #: build/C/man7/epoll.7:500
942 #, no-wrap
943 msgid "B<o If using an event cache...>"
944 msgstr "B<o イベントキャッシュを使っている場合>"
945
946 #. type: Plain text
947 #: build/C/man7/epoll.7:516
948 msgid ""
949 "If you use an event cache or store all the file descriptors returned from "
950 "B<epoll_wait>(2), then make sure to provide a way to mark its closure "
951 "dynamically (i.e., caused by a previous event's processing).  Suppose you "
952 "receive 100 events from B<epoll_wait>(2), and in event #47 a condition "
953 "causes event #13 to be closed.  If you remove the structure and B<close>(2)  "
954 "the file descriptor for event #13, then your event cache might still say "
955 "there are events waiting for that file descriptor causing confusion."
956 msgstr ""
957 "イベントキャッシュを使っている場合、 または B<epoll_wait>(2)  から返された全"
958 "てのファイルディスクリプタを格納している場合、 クローズされたことを動的にマー"
959 "クする (つまり前のイベントの処理によってマークされる) 方法を提供すべきであ"
960 "る。 B<epoll_wait>(2)  から 100 個のイベントを受け取り、 イベント #47 ではあ"
961 "る条件でイベント #13 が閉じられると仮定する。 イベント #13 の構造体を削除し"
962 "ファイルディスクリプタを B<close>(2)  すると、イベントキャッシュはそのファイ"
963 "ルディスクリプタを待つイベントが 存在するといって、混乱が起きる。"
964
965 #. type: Plain text
966 #: build/C/man7/epoll.7:527
967 msgid ""
968 "One solution for this is to call, during the processing of event 47, "
969 "B<epoll_ctl>(B<EPOLL_CTL_DEL>)  to delete file descriptor 13 and B<close>"
970 "(2), then mark its associated data structure as removed and link it to a "
971 "cleanup list.  If you find another event for file descriptor 13 in your "
972 "batch processing, you will discover the file descriptor had been previously "
973 "removed and there will be no confusion."
974 msgstr ""
975 "この問題を解決する 1 つの方法は、イベント 47 の処理をしている間に、 ファイル"
976 "ディスクリプタ 13 を削除して B<close>(2)  するために B<epoll_ctl>"
977 "(B<EPOLL_CTL_DEL>)  を呼び出し、関連付けられた data 構造体を削除済みとマーク"
978 "して、 クリーンアップリストにリンクすることである。 バッチ処理の中でファイル"
979 "ディスクリプタ 13 についての 他のイベントを見つけた場合、 そのファイルディス"
980 "クリプタが以前に削除されたものであると分かるので、 混乱は起きない。"
981
982 #. type: SH
983 #: build/C/man7/epoll.7:527 build/C/man2/epoll_create.2:114
984 #: build/C/man2/epoll_ctl.2:224 build/C/man2/epoll_wait.2:174
985 #: build/C/man2/poll.2:286
986 #, no-wrap
987 msgid "VERSIONS"
988 msgstr "バージョン"
989
990 #.  Its interface should be finalized in Linux kernel 2.5.66.
991 #. type: Plain text
992 #: build/C/man7/epoll.7:533
993 msgid ""
994 "The B<epoll> API was introduced in Linux kernel 2.5.44.  Support was added "
995 "to glibc in version 2.3.2."
996 msgstr ""
997 "B<epoll> API は Linux カーネル 2.5.44 に導入された。 glibc でのサポートはバー"
998 "ジョン 2.3.2 で追加された。"
999
1000 #. type: SH
1001 #: build/C/man7/epoll.7:533 build/C/man2/epoll_create.2:124
1002 #: build/C/man2/epoll_ctl.2:229 build/C/man2/epoll_wait.2:184
1003 #: build/C/man2/poll.2:306
1004 #, no-wrap
1005 msgid "CONFORMING TO"
1006 msgstr "準拠"
1007
1008 #. type: Plain text
1009 #: build/C/man7/epoll.7:542
1010 msgid ""
1011 "The B<epoll> API is Linux-specific.  Some other systems provide similar "
1012 "mechanisms, for example, FreeBSD has I<kqueue>, and Solaris has I</dev/poll>."
1013 msgstr ""
1014 "B<epoll> API は Linux 固有である。 他のシステムでも同様の機構が提供されている"
1015 "場合がある。 例えば、FreeBSD の I<kqueue> や Solaris の I</dev/poll> などであ"
1016 "る。"
1017
1018 #. type: SH
1019 #: build/C/man7/epoll.7:542 build/C/man2/epoll_create.2:133
1020 #: build/C/man2/epoll_ctl.2:252 build/C/man2/epoll_wait.2:187
1021 #: build/C/man2/poll.2:338
1022 #, no-wrap
1023 msgid "SEE ALSO"
1024 msgstr "関連項目"
1025
1026 #. type: Plain text
1027 #: build/C/man7/epoll.7:547
1028 msgid ""
1029 "B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2)"
1030 msgstr ""
1031 "B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2)"
1032
1033 #. type: SH
1034 #: build/C/man7/epoll.7:547 build/C/man2/epoll_create.2:138
1035 #: build/C/man2/epoll_ctl.2:257 build/C/man2/epoll_wait.2:191
1036 #: build/C/man2/poll.2:342
1037 #, no-wrap
1038 msgid "COLOPHON"
1039 msgstr "この文書について"
1040
1041 #. type: Plain text
1042 #: build/C/man7/epoll.7:554 build/C/man2/epoll_create.2:145
1043 #: build/C/man2/epoll_ctl.2:264 build/C/man2/epoll_wait.2:198
1044 #: build/C/man2/poll.2:349
1045 #, fuzzy
1046 #| msgid ""
1047 #| "This page is part of release 3.37 of the Linux I<man-pages> project.  A "
1048 #| "description of the project, and information about reporting bugs, can be "
1049 #| "found at http://www.kernel.org/doc/man-pages/."
1050 msgid ""
1051 "This page is part of release 3.38 of the Linux I<man-pages> project.  A "
1052 "description of the project, and information about reporting bugs, can be "
1053 "found at http://www.kernel.org/doc/man-pages/."
1054 msgstr ""
1055 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.37 の一部であ"
1056 "る。\n"
1057 "プロジェクトの説明とバグ報告に関する情報は\n"
1058 "http://www.kernel.org/doc/man-pages/ に書かれている。"
1059
1060 #. type: TH
1061 #: build/C/man2/epoll_create.2:25
1062 #, no-wrap
1063 msgid "EPOLL_CREATE"
1064 msgstr "EPOLL_CREATE"
1065
1066 #. type: TH
1067 #: build/C/man2/epoll_create.2:25 build/C/man2/epoll_ctl.2:21
1068 #: build/C/man2/epoll_wait.2:23
1069 #, fuzzy, no-wrap
1070 #| msgid "2010-09-20"
1071 msgid "2010-12-03"
1072 msgstr "2010-09-20"
1073
1074 #. type: Plain text
1075 #: build/C/man2/epoll_create.2:28
1076 msgid "epoll_create, epoll_create1 - open an epoll file descriptor"
1077 msgstr ""
1078 "epoll_create, epoll_create1 - epoll ファイルディスクリプタをオープンする"
1079
1080 #. type: Plain text
1081 #: build/C/man2/epoll_create.2:31 build/C/man2/epoll_wait.2:29
1082 #, no-wrap
1083 msgid "B<#include E<lt>sys/epoll.hE<gt>>\n"
1084 msgstr "B<#include E<lt>sys/epoll.hE<gt>>\n"
1085
1086 #. type: Plain text
1087 #: build/C/man2/epoll_create.2:34
1088 #, no-wrap
1089 msgid ""
1090 "B<int epoll_create(int >I<size>B<);>\n"
1091 "B<int epoll_create1(int >I<flags>B<);>\n"
1092 msgstr ""
1093 "B<int epoll_create(int >I<size>B<);>\n"
1094 "B<int epoll_create1(int >I<flags>B<);>\n"
1095
1096 #. type: Plain text
1097 #: build/C/man2/epoll_create.2:48
1098 #, fuzzy
1099 #| msgid ""
1100 #| "B<epoll_create>()  creates an epoll \"instance\", requesting the kernel "
1101 #| "to allocate an event backing store dimensioned for I<size> descriptors.  "
1102 #| "The I<size> is not the maximum size of the backing store but just a hint "
1103 #| "to the kernel about how to dimension internal structures.  (Nowadays, "
1104 #| "I<size> is ignored; see NOTES below.)"
1105 msgid ""
1106 "B<epoll_create>()  creates an epoll \"instance\", requesting the kernel to "
1107 "allocate an event backing store dimensioned for I<size> descriptors.  The "
1108 "I<size> is not the maximum size of the backing store but just a hint to the "
1109 "kernel about how to dimension internal structures.  (Nowadays, I<size> is "
1110 "unused; see NOTES below.)"
1111 msgstr ""
1112 "B<epoll_create>()  は、 I<size> 個のディスクリプタを保持できる大きさのイベン"
1113 "トバッキング ストアの割り当てをカーネルに対して要求することにより、 epoll "
1114 "「インスタンス」を作成する。 I<size> はバッキングストアの最大サイズではな"
1115 "く、 内部構造の大きさをどの位にするかをカーネルに知らせるヒントでしかない。 "
1116 "(現在は I<size> は無視される。下記の「注意」を参照。)"
1117
1118 #. type: Plain text
1119 #: build/C/man2/epoll_create.2:61
1120 msgid ""
1121 "B<epoll_create>()  returns a file descriptor referring to the new epoll "
1122 "instance.  This file descriptor is used for all the subsequent calls to the "
1123 "B<epoll> interface.  When no longer required, the file descriptor returned "
1124 "by B<epoll_create>()  should be closed by using B<close>(2).  When all file "
1125 "descriptors referring to an epoll instance have been closed, the kernel "
1126 "destroys the instance and releases the associated resources for reuse."
1127 msgstr ""
1128 "B<epoll_create>()  は、新しい epoll インスタンスを参照するファイルディスクリ"
1129 "プタを返す。 このファイルディスクリプタは、その後の B<epoll> インタフェースの"
1130 "呼び出しに使われる。 もう必要でなくなった場合は、 B<epoll_create>()  で返され"
1131 "たファイルディスクリプタは B<close>(2)  を使ってクローズされるべきである。 あ"
1132 "る epoll インスタンスを参照する全てのファイルディスクリプタがクローズされる"
1133 "と、 カーネルはそのインスタンスを破壊して、対応するリソースを解放し、 再使用"
1134 "できるようにする。"
1135
1136 #. type: Plain text
1137 #: build/C/man2/epoll_create.2:73
1138 msgid ""
1139 "If I<flags> is 0, then, other than the fact that the obsolete I<size> "
1140 "argument is dropped, B<epoll_create1>()  is the same as B<epoll_create>().  "
1141 "The following value can be included in I<flags> to obtain different behavior:"
1142 msgstr ""
1143 "B<epoll_create1>()  は、 I<flags> が 0 の場合、現在では使われていない "
1144 "I<size> 引き数がなくなっている点を除けば B<epoll_create>()  と同じである。 "
1145 "I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさ"
1146 "せることができる。"
1147
1148 #. type: TP
1149 #: build/C/man2/epoll_create.2:73
1150 #, no-wrap
1151 msgid "B<EPOLL_CLOEXEC>"
1152 msgstr "B<EPOLL_CLOEXEC>"
1153
1154 #. type: Plain text
1155 #: build/C/man2/epoll_create.2:83
1156 msgid ""
1157 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
1158 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
1159 "may be useful."
1160 msgstr ""
1161 "新しいファイルディスクリプタに対して close-on-exec (B<FD_CLOEXEC>)  フラグを"
1162 "セットする。 このフラグが役に立つ理由については、 B<open>(2)  の "
1163 "B<O_CLOEXEC> フラグの説明を参照のこと。"
1164
1165 #. type: SH
1166 #: build/C/man2/epoll_create.2:83 build/C/man2/epoll_ctl.2:156
1167 #: build/C/man2/epoll_wait.2:137 build/C/man2/poll.2:257
1168 #, no-wrap
1169 msgid "RETURN VALUE"
1170 msgstr "返り値"
1171
1172 #. type: Plain text
1173 #: build/C/man2/epoll_create.2:90
1174 msgid ""
1175 "On success, these system calls return a nonnegative file descriptor.  On "
1176 "error, -1 is returned, and I<errno> is set to indicate the error."
1177 msgstr ""
1178 "成功すると、これらのシステムコールは 非負のファイルディスクリプタを返す。 エ"
1179 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
1180
1181 #. type: SH
1182 #: build/C/man2/epoll_create.2:90 build/C/man2/epoll_ctl.2:165
1183 #: build/C/man2/epoll_wait.2:149 build/C/man2/poll.2:267
1184 #, no-wrap
1185 msgid "ERRORS"
1186 msgstr "エラー"
1187
1188 #. type: TP
1189 #: build/C/man2/epoll_create.2:91 build/C/man2/epoll_create.2:95
1190 #: build/C/man2/epoll_ctl.2:180 build/C/man2/epoll_wait.2:166
1191 #: build/C/man2/poll.2:276
1192 #, no-wrap
1193 msgid "B<EINVAL>"
1194 msgstr "B<EINVAL>"
1195
1196 #. type: Plain text
1197 #: build/C/man2/epoll_create.2:95
1198 msgid "I<size> is not positive."
1199 msgstr "I<size> が正でない。"
1200
1201 #. type: Plain text
1202 #: build/C/man2/epoll_create.2:100
1203 msgid "(B<epoll_create1>())  Invalid value specified in I<flags>."
1204 msgstr "(B<epoll_create1>())  I<flags> に無効な値が指定された。"
1205
1206 #. type: TP
1207 #: build/C/man2/epoll_create.2:100
1208 #, no-wrap
1209 msgid "B<EMFILE>"
1210 msgstr "B<EMFILE>"
1211
1212 #. type: Plain text
1213 #: build/C/man2/epoll_create.2:108
1214 msgid ""
1215 "The per-user limit on the number of epoll instances imposed by I</proc/sys/"
1216 "fs/epoll/max_user_instances> was encountered.  See B<epoll>(7)  for further "
1217 "details."
1218 msgstr ""
1219 "I</proc/sys/fs/epoll/max_user_instances> によって指定されている、epoll インス"
1220 "タンスのユーザー単位の制限に達した。 更なる詳細については B<epoll>(7)  を参照"
1221 "のこと。"
1222
1223 #. type: TP
1224 #: build/C/man2/epoll_create.2:108
1225 #, no-wrap
1226 msgid "B<ENFILE>"
1227 msgstr "B<ENFILE>"
1228
1229 #. type: Plain text
1230 #: build/C/man2/epoll_create.2:111
1231 msgid "The system limit on the total number of open files has been reached."
1232 msgstr "オープンされたファイルの総数がシステム制限に達した。"
1233
1234 #. type: TP
1235 #: build/C/man2/epoll_create.2:111 build/C/man2/epoll_ctl.2:203
1236 #: build/C/man2/poll.2:283
1237 #, no-wrap
1238 msgid "B<ENOMEM>"
1239 msgstr "B<ENOMEM>"
1240
1241 #. type: Plain text
1242 #: build/C/man2/epoll_create.2:114
1243 msgid "There was insufficient memory to create the kernel object."
1244 msgstr "カーネルオブジェクトを作成するのに十分なメモリがなかった。"
1245
1246 #. type: Plain text
1247 #: build/C/man2/epoll_create.2:118
1248 #, fuzzy
1249 #| msgid ""
1250 #| "The B<epoll> API was introduced in Linux kernel 2.5.44.  Support was "
1251 #| "added to glibc in version 2.3.2."
1252 msgid ""
1253 "B<epoll_create>()  was added to the kernel in version 2.6.  Library support "
1254 "is provided in glibc starting with version 2.3.2."
1255 msgstr ""
1256 "B<epoll> API は Linux カーネル 2.5.44 に導入された。 glibc でのサポートはバー"
1257 "ジョン 2.3.2 で追加された。"
1258
1259 #.  To be precise: kernel 2.5.44.
1260 #.  The interface should be finalized by Linux kernel 2.5.66.
1261 #. type: Plain text
1262 #: build/C/man2/epoll_create.2:124
1263 msgid ""
1264 "B<epoll_create1>()  was added to the kernel in version 2.6.27.  Library "
1265 "support is provided in glibc starting with version 2.9."
1266 msgstr ""
1267
1268 #. type: Plain text
1269 #: build/C/man2/epoll_create.2:127
1270 #, fuzzy
1271 #| msgid ""
1272 #| "B<epoll_create>()  is Linux-specific, and was introduced in kernel 2.5.44."
1273 msgid "B<epoll_create>()  is Linux-specific."
1274 msgstr "B<epoll_create>()  は Linux 独自であり、カーネル 2.5.44 で導入された。"
1275
1276 #. type: SH
1277 #: build/C/man2/epoll_create.2:127 build/C/man2/epoll_ctl.2:233
1278 #: build/C/man2/poll.2:312
1279 #, no-wrap
1280 msgid "NOTES"
1281 msgstr "注意"
1282
1283 #. type: Plain text
1284 #: build/C/man2/epoll_create.2:133
1285 #, fuzzy
1286 #| msgid ""
1287 #| "Since Linux 2.6.8, the I<size> argument is unused.  (The kernel "
1288 #| "dynamically sizes the required data structures without needing this "
1289 #| "initial hint.)"
1290 msgid ""
1291 "Since Linux 2.6.8, the I<size> argument is unused, but must be greater than "
1292 "zero.  (The kernel dynamically sizes the required data structures without "
1293 "needing this initial hint.)"
1294 msgstr ""
1295 "Linux 2.6.8 以降では、 I<size> 引き数は使用されない (カーネルは、動的に必要な"
1296 "データ構造の大きさを決定し、 最初のヒントを必要しない)。"
1297
1298 #. type: Plain text
1299 #: build/C/man2/epoll_create.2:138
1300 msgid "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1301 msgstr "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1302
1303 #. type: TH
1304 #: build/C/man2/epoll_ctl.2:21
1305 #, no-wrap
1306 msgid "EPOLL_CTL"
1307 msgstr "EPOLL_CTL"
1308
1309 #. type: Plain text
1310 #: build/C/man2/epoll_ctl.2:24
1311 msgid "epoll_ctl - control interface for an epoll descriptor"
1312 msgstr "epoll_ctl - epoll ディスクリプタのインタフェースを操作する"
1313
1314 #. type: Plain text
1315 #: build/C/man2/epoll_ctl.2:29
1316 msgid ""
1317 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1318 "epoll_event *>I<event>B<);>"
1319 msgstr ""
1320 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1321 "epoll_event *>I<event>B<);>"
1322
1323 #. type: Plain text
1324 #: build/C/man2/epoll_ctl.2:37
1325 msgid ""
1326 "This system call performs control operations on the epoll instance referred "
1327 "to by the file descriptor I<epfd>.  It requests that the operation I<op> be "
1328 "performed for the target file descriptor, I<fd>."
1329 msgstr ""
1330 "このシステムコールは、ファイルディスクリプタ I<epfd> が参照する epoll インス"
1331 "タンスに対する操作を行う。 対象のファイルディスクリプタ I<fd> に対して、操作 "
1332 "I<op> の実行が要求される。"
1333
1334 #. type: Plain text
1335 #: build/C/man2/epoll_ctl.2:41
1336 msgid "Valid values for the I<op> argument are :"
1337 msgstr "I<op> 引き数に指定できる有効な値は以下の通りである。"
1338
1339 #. type: TP
1340 #: build/C/man2/epoll_ctl.2:41
1341 #, no-wrap
1342 msgid "B<EPOLL_CTL_ADD>"
1343 msgstr "B<EPOLL_CTL_ADD>"
1344
1345 #. type: Plain text
1346 #: build/C/man2/epoll_ctl.2:53
1347 msgid ""
1348 "Register the target file descriptor I<fd> on the B<epoll> instance referred "
1349 "to by the file descriptor I<epfd> and associate the event I<event> with the "
1350 "internal file linked to I<fd>."
1351 msgstr ""
1352 "対象のファイルディスクリプタ I<fd> をファイルディスクリプタ I<epfd> が参照す"
1353 "る B<epoll> インスタンスに登録し、イベント I<event> を I<fd> に結び付けられた"
1354 "内部ファイルに関連付ける。"
1355
1356 #. type: TP
1357 #: build/C/man2/epoll_ctl.2:53
1358 #, no-wrap
1359 msgid "B<EPOLL_CTL_MOD>"
1360 msgstr "B<EPOLL_CTL_MOD>"
1361
1362 #. type: Plain text
1363 #: build/C/man2/epoll_ctl.2:59
1364 msgid ""
1365 "Change the event I<event> associated with the target file descriptor I<fd>."
1366 msgstr ""
1367 "イベント I<event> を対象のファイルディスクリプタ I<fd> に関連付けるように変更"
1368 "する。"
1369
1370 #. type: TP
1371 #: build/C/man2/epoll_ctl.2:59
1372 #, no-wrap
1373 msgid "B<EPOLL_CTL_DEL>"
1374 msgstr "B<EPOLL_CTL_DEL>"
1375
1376 #. type: Plain text
1377 #: build/C/man2/epoll_ctl.2:70
1378 msgid ""
1379 "Remove (deregister) the target file descriptor I<fd> from the B<epoll> "
1380 "instance referred to by I<epfd>.  The I<event> is ignored and can be NULL "
1381 "(but see BUGS below)."
1382 msgstr ""
1383 "対象のファイルディスクリプタ I<fd> を I<epfd> が参照する B<epoll> インスタン"
1384 "スから削除する。 I<event> 引き数は無視されるので、NULL にすることもできる (但"
1385 "し、下記の「バグ」を参照)。"
1386
1387 #. type: Plain text
1388 #: build/C/man2/epoll_ctl.2:78
1389 msgid ""
1390 "The I<event> argument describes the object linked to the file descriptor "
1391 "I<fd>.  The I<struct epoll_event> is defined as :"
1392 msgstr ""
1393 "I<event> 引き数は、ファイルディスクリプタ I<fd> にリンクされたオブジェクトを"
1394 "表す。 I<struct epoll_event> は以下のように定義される:"
1395
1396 #. type: Plain text
1397 #: build/C/man2/epoll_ctl.2:87
1398 #, no-wrap
1399 msgid ""
1400 "typedef union epoll_data {\n"
1401 "    void        *ptr;\n"
1402 "    int          fd;\n"
1403 "    uint32_t     u32;\n"
1404 "    uint64_t     u64;\n"
1405 "} epoll_data_t;\n"
1406 msgstr ""
1407 "typedef union epoll_data {\n"
1408 "    void        *ptr;\n"
1409 "    int          fd;\n"
1410 "    uint32_t     u32;\n"
1411 "    uint64_t     u64;\n"
1412 "} epoll_data_t;\n"
1413
1414 #. type: Plain text
1415 #: build/C/man2/epoll_ctl.2:92
1416 #, no-wrap
1417 msgid ""
1418 "struct epoll_event {\n"
1419 "    uint32_t     events;      /* Epoll events */\n"
1420 "    epoll_data_t data;        /* User data variable */\n"
1421 "};\n"
1422 msgstr ""
1423 "struct epoll_event {\n"
1424 "    uint32_t     events;      /* epoll イベント */\n"
1425 "    epoll_data_t data;        /* ユーザデータ変数 */\n"
1426 "};\n"
1427
1428 #. type: Plain text
1429 #: build/C/man2/epoll_ctl.2:99
1430 msgid ""
1431 "The I<events> member is a bit set composed using the following available "
1432 "event types:"
1433 msgstr ""
1434 "I<events> メンバは、以下のような使用可能なイベントタイプを使って構成された "
1435 "ビットセットである。"
1436
1437 #. type: TP
1438 #: build/C/man2/epoll_ctl.2:99
1439 #, no-wrap
1440 msgid "B<EPOLLIN>"
1441 msgstr "B<EPOLLIN>"
1442
1443 #. type: Plain text
1444 #: build/C/man2/epoll_ctl.2:104
1445 msgid "The associated file is available for B<read>(2)  operations."
1446 msgstr "関連付けられたファイルに対して、 B<read>(2)  操作が可能である。"
1447
1448 #. type: TP
1449 #: build/C/man2/epoll_ctl.2:104
1450 #, no-wrap
1451 msgid "B<EPOLLOUT>"
1452 msgstr "B<EPOLLOUT>"
1453
1454 #. type: Plain text
1455 #: build/C/man2/epoll_ctl.2:109
1456 msgid "The associated file is available for B<write>(2)  operations."
1457 msgstr "関連付けられたファイルに対して、 B<write>(2)  操作が可能である。"
1458
1459 #. type: TP
1460 #: build/C/man2/epoll_ctl.2:109
1461 #, no-wrap
1462 msgid "B<EPOLLRDHUP> (since Linux 2.6.17)"
1463 msgstr "B<EPOLLRDHUP\">(LinuxB<2.6.17>以降)\""
1464
1465 #. type: Plain text
1466 #: build/C/man2/epoll_ctl.2:115
1467 msgid ""
1468 "Stream socket peer closed connection, or shut down writing half of "
1469 "connection.  (This flag is especially useful for writing simple code to "
1470 "detect peer shutdown when using Edge Triggered monitoring.)"
1471 msgstr ""
1472 "ストリームソケットの他端が、コネクションの close 、 またはコネクションの書き"
1473 "込み側の shutdown を行った。 (このフラグを使うと、エッジトリガの監視を行う場"
1474 "合に、 通信のもう一端が閉じられたことを検知するコードを 非常に簡潔に書くこと"
1475 "ができる。)"
1476
1477 #. type: TP
1478 #: build/C/man2/epoll_ctl.2:115
1479 #, no-wrap
1480 msgid "B<EPOLLPRI>"
1481 msgstr "B<EPOLLPRI>"
1482
1483 #. type: Plain text
1484 #: build/C/man2/epoll_ctl.2:120
1485 msgid "There is urgent data available for B<read>(2)  operations."
1486 msgstr "B<read>(2)  操作が可能な緊急 (urgent) データがある。"
1487
1488 #. type: TP
1489 #: build/C/man2/epoll_ctl.2:120
1490 #, no-wrap
1491 msgid "B<EPOLLERR>"
1492 msgstr "B<EPOLLERR>"
1493
1494 #. type: Plain text
1495 #: build/C/man2/epoll_ctl.2:126
1496 msgid ""
1497 "Error condition happened on the associated file descriptor.  B<epoll_wait>"
1498 "(2)  will always wait for this event; it is not necessary to set it in "
1499 "I<events>."
1500 msgstr ""
1501 "関連付けられたファイルディスクリプタにエラー条件が起こった。 B<epoll_wait>"
1502 "(2)  は常にこのイベントを待つので、 I<events> に設定する必要はない。"
1503
1504 #. type: TP
1505 #: build/C/man2/epoll_ctl.2:126
1506 #, no-wrap
1507 msgid "B<EPOLLHUP>"
1508 msgstr "B<EPOLLHUP>"
1509
1510 #. type: Plain text
1511 #: build/C/man2/epoll_ctl.2:132
1512 msgid ""
1513 "Hang up happened on the associated file descriptor.  B<epoll_wait>(2)  will "
1514 "always wait for this event; it is not necessary to set it in I<events>."
1515 msgstr ""
1516 "関連付けられたファイルディスクリプタにハングアップが起こった。 B<epoll_wait>"
1517 "(2)  は常にこのイベントを待つので、 I<events> に設定する必要はない。"
1518
1519 #. type: TP
1520 #: build/C/man2/epoll_ctl.2:132
1521 #, no-wrap
1522 msgid "B<EPOLLET>"
1523 msgstr "B<EPOLLET>"
1524
1525 #. type: Plain text
1526 #: build/C/man2/epoll_ctl.2:142
1527 msgid ""
1528 "Sets the Edge Triggered behavior for the associated file descriptor.  The "
1529 "default behavior for B<epoll> is Level Triggered.  See B<epoll>(7)  for more "
1530 "detailed information about Edge and Level Triggered event distribution "
1531 "architectures."
1532 msgstr ""
1533 "関連付けられたファイルディスクリプタに エッジトリガ動作 (Edge Triggered "
1534 "behavior) を設定する。 B<epoll> のデフォルトの動作は、レベルトリガ (Level "
1535 "Triggered) である。 エッジトリガとレベルトリガによるイベント分配機構 (event "
1536 "distribution architectures) についての詳細な情報は、 B<epoll>(7)  を参照する"
1537 "こと。"
1538
1539 #. type: TP
1540 #: build/C/man2/epoll_ctl.2:142
1541 #, no-wrap
1542 msgid "B<EPOLLONESHOT> (since Linux 2.6.2)"
1543 msgstr "B<EPOLLONESHOT> (Linux 2.6.2 以降)"
1544
1545 #. type: Plain text
1546 #: build/C/man2/epoll_ctl.2:156
1547 msgid ""
1548 "Sets the one-shot behavior for the associated file descriptor.  This means "
1549 "that after an event is pulled out with B<epoll_wait>(2)  the associated file "
1550 "descriptor is internally disabled and no other events will be reported by "
1551 "the B<epoll> interface.  The user must call B<epoll_ctl>()  with "
1552 "B<EPOLL_CTL_MOD> to rearm the file descriptor with a new event mask."
1553 msgstr ""
1554 "関連付けられたファイルディスクリプタに 一撃動作 (One-Shot behavior) を設定す"
1555 "る。 これはイベントが B<epoll_wait>(2)  によって引き出された後、 関連付けられ"
1556 "たファイルディスクリプタが内部的に破棄され、 B<epoll> インタフェースによって"
1557 "イベントが報告されなくなることを意味する。 新しいイベントマスクでファイルディ"
1558 "スクリプタを再度有効にするためには、 B<epoll_ctl>()  に B<EPOLL_CTL_MOD> を指"
1559 "定して呼び出さなければならない。 I<op> 引き数に指定できる有効な値は、以下の通"
1560 "り:"
1561
1562 #. type: Plain text
1563 #: build/C/man2/epoll_ctl.2:165
1564 msgid ""
1565 "When successful, B<epoll_ctl>()  returns zero.  When an error occurs, "
1566 "B<epoll_ctl>()  returns -1 and I<errno> is set appropriately."
1567 msgstr ""
1568 "成功した場合、 B<epoll_ctl>()  は 0 を返す。 エラーが起こった場合、 "
1569 "B<epoll_ctl>()  は -1 を返し、 I<errno> を適切に設定する。"
1570
1571 #. type: TP
1572 #: build/C/man2/epoll_ctl.2:166 build/C/man2/epoll_wait.2:150
1573 #, no-wrap
1574 msgid "B<EBADF>"
1575 msgstr "B<EBADF>"
1576
1577 #. type: Plain text
1578 #: build/C/man2/epoll_ctl.2:172
1579 msgid "I<epfd> or I<fd> is not a valid file descriptor."
1580 msgstr "I<epfd> か I<fd> が有効なファイルディスクリプタでない。"
1581
1582 #. type: TP
1583 #: build/C/man2/epoll_ctl.2:172
1584 #, no-wrap
1585 msgid "B<EEXIST>"
1586 msgstr "B<EEXIST>"
1587
1588 #. type: Plain text
1589 #: build/C/man2/epoll_ctl.2:180
1590 msgid ""
1591 "I<op> was B<EPOLL_CTL_ADD>, and the supplied file descriptor I<fd> is "
1592 "already registered with this epoll instance."
1593 msgstr ""
1594 "I<op> が B<EPOLL_CTL_ADD> であり、かつ与えられたファイルディスクリプタ I<fd> "
1595 "がこの epoll インスタンスに既に登録されている。"
1596
1597 #. type: Plain text
1598 #: build/C/man2/epoll_ctl.2:193
1599 msgid ""
1600 "I<epfd> is not an B<epoll> file descriptor, or I<fd> is the same as I<epfd>, "
1601 "or the requested operation I<op> is not supported by this interface."
1602 msgstr ""
1603 "I<epfd> が B<epoll> ファイルディスクリプタでない。 または I<fd> が I<epfd> と"
1604 "同一である。 または要求された操作 I<op> がこのインタフェースでサポートされて"
1605 "いない。"
1606
1607 #. type: TP
1608 #: build/C/man2/epoll_ctl.2:193
1609 #, no-wrap
1610 msgid "B<ENOENT>"
1611 msgstr "B<ENOENT>"
1612
1613 #. type: Plain text
1614 #: build/C/man2/epoll_ctl.2:203
1615 msgid ""
1616 "I<op> was B<EPOLL_CTL_MOD> or B<EPOLL_CTL_DEL>, and I<fd> is not registered "
1617 "with this epoll instance."
1618 msgstr ""
1619 "I<op> が B<EPOLL_CTL_MOD> または B<EPOLL_CTL_DEL> で、かつ I<fd> がこの "
1620 "epoll インスタンスに登録されていない。"
1621
1622 #. type: Plain text
1623 #: build/C/man2/epoll_ctl.2:208
1624 msgid ""
1625 "There was insufficient memory to handle the requested I<op> control "
1626 "operation."
1627 msgstr "要求された I<op> 制御操作を扱うのに十分なメモリがない。"
1628
1629 #. type: TP
1630 #: build/C/man2/epoll_ctl.2:208
1631 #, no-wrap
1632 msgid "B<ENOSPC>"
1633 msgstr "B<ENOSPC>"
1634
1635 #. type: Plain text
1636 #: build/C/man2/epoll_ctl.2:218
1637 msgid ""
1638 "The limit imposed by I</proc/sys/fs/epoll/max_user_watches> was encountered "
1639 "while trying to register (B<EPOLL_CTL_ADD>)  a new file descriptor on an "
1640 "epoll instance.  See B<epoll>(7)  for further details."
1641 msgstr ""
1642 "epoll インスタンスに新しいファイルディスクリプタを登録 (B<EPOLL_CTL_ADD>)  し"
1643 "ようとした際に、 I</proc/sys/fs/epoll/max_user_watches> で決まる上限に達し"
1644 "た。 詳細は B<epoll>(7)  を参照。"
1645
1646 #. type: TP
1647 #: build/C/man2/epoll_ctl.2:218
1648 #, no-wrap
1649 msgid "B<EPERM>"
1650 msgstr "B<EPERM>"
1651
1652 #. type: Plain text
1653 #: build/C/man2/epoll_ctl.2:224
1654 msgid "The target file I<fd> does not support B<epoll>."
1655 msgstr "対象ファイル I<fd> が B<epoll> をサポートしていない。"
1656
1657 #.  To be precise: kernel 2.5.44.
1658 #.  The interface should be finalized by Linux kernel 2.5.66.
1659 #. type: Plain text
1660 #: build/C/man2/epoll_ctl.2:229
1661 #, fuzzy
1662 #| msgid "B<epoll_pwait>()  was added to Linux in kernel 2.6.19."
1663 msgid "B<epoll_ctl>()  was added to the kernel in version 2.6."
1664 msgstr "B<epoll_pwait>()  はカーネル 2.6.19 で Linux に追加された。"
1665
1666 #. type: Plain text
1667 #: build/C/man2/epoll_ctl.2:233
1668 #, fuzzy
1669 #| msgid ""
1670 #| "B<epoll_ctl>()  is Linux-specific, and was introduced in kernel 2.5.44."
1671 msgid ""
1672 "B<epoll_ctl>()  is Linux-specific.  Library support is provided in glibc "
1673 "starting with version 2.3.2."
1674 msgstr "B<epoll_ctl>()  は Linux 独自であり、カーネル 2.5.44 で導入された。"
1675
1676 #. type: Plain text
1677 #: build/C/man2/epoll_ctl.2:238
1678 msgid ""
1679 "The B<epoll> interface supports all file descriptors that support B<poll>(2)."
1680 msgstr ""
1681 "B<epoll> インタフェースは、 B<poll>(2)  に対応している全てのファイルディスク"
1682 "リプタに対応している。"
1683
1684 #. type: SH
1685 #: build/C/man2/epoll_ctl.2:238 build/C/man2/poll.2:334
1686 #, no-wrap
1687 msgid "BUGS"
1688 msgstr "バグ"
1689
1690 #. type: Plain text
1691 #: build/C/man2/epoll_ctl.2:252
1692 msgid ""
1693 "In kernel versions before 2.6.9, the B<EPOLL_CTL_DEL> operation required a "
1694 "non-NULL pointer in I<event>, even though this argument is ignored.  Since "
1695 "Linux 2.6.9, I<event> can be specified as NULL when using B<EPOLL_CTL_DEL>.  "
1696 "Applications that need to be portable to kernels before 2.6.9 should specify "
1697 "a non-NULL pointer in I<event>."
1698 msgstr ""
1699 "Linux 2.6.9 より前では、 B<EPOLL_CTL_DEL> 操作の際、引き数 I<event> に (たと"
1700 "え無視される場合であっても) NULL でないポインタを渡す必要があった。 カーネル "
1701 "2.6.9 以降では、 B<EPOLL_CTL_DEL> を使う際に I<event> に NULL を指定できるよ"
1702 "うになっている。 2.6.9 より前のカーネルへの移植性が必要なアプリケーションで"
1703 "は、 I<event> に NULL でないポインタを指定すべきである。"
1704
1705 #. type: Plain text
1706 #: build/C/man2/epoll_ctl.2:257
1707 msgid "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1708 msgstr "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1709
1710 #. type: TH
1711 #: build/C/man2/epoll_wait.2:23
1712 #, no-wrap
1713 msgid "EPOLL_WAIT"
1714 msgstr "EPOLL_WAIT"
1715
1716 #. type: Plain text
1717 #: build/C/man2/epoll_wait.2:26
1718 msgid ""
1719 "epoll_wait, epoll_pwait - wait for an I/O event on an epoll file descriptor"
1720 msgstr ""
1721 "epoll_wait, epoll_pwait - epoll ファイルディスクリプタの I/O イベントを待つ"
1722
1723 #. type: Plain text
1724 #: build/C/man2/epoll_wait.2:35
1725 #, no-wrap
1726 msgid ""
1727 "B<int epoll_wait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1728 "B<               int >I<maxevents>B<, int >I<timeout>B<);>\n"
1729 "B<int epoll_pwait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1730 "B<               int >I<maxevents>B<, int >I<timeout>B<,>\n"
1731 "B<               const sigset_t *>I<sigmask>B<);>\n"
1732 msgstr ""
1733 "B<int epoll_wait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1734 "B<               int >I<maxevents>B<, int >I<timeout>B<);>\n"
1735 "B<int epoll_pwait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1736 "B<               int >I<maxevents>B<, int >I<timeout>B<,>\n"
1737 "B<               const sigset_t *>I<sigmask>B<);>\n"
1738
1739 #. type: Plain text
1740 #: build/C/man2/epoll_wait.2:53
1741 msgid ""
1742 "The B<epoll_wait>()  system call waits for events on the B<epoll> instance "
1743 "referred to by the file descriptor I<epfd>.  The memory area pointed to by "
1744 "I<events> will contain the events that will be available for the caller.  Up "
1745 "to I<maxevents> are returned by B<epoll_wait>().  The I<maxevents> argument "
1746 "must be greater than zero."
1747 msgstr ""
1748 "B<epoll_wait>()  システムコールは、 ファイルディスクリプタ I<epfd> で参照され"
1749 "る B<epoll> インスタンスに対するイベントを待つ。 I<events> が指すメモリ領域に"
1750 "は、呼び出し側が利用可能なイベントが格納される。 最大 I<maxevents> 個のイベン"
1751 "トが B<epoll_wait>()  によって返される。 I<maxevents> 引き数は 0 より大きくな"
1752 "ければならない。"
1753
1754 #. type: Plain text
1755 #: build/C/man2/epoll_wait.2:67
1756 msgid ""
1757 "The call waits for a maximum time of I<timeout> milliseconds.  Specifying a "
1758 "I<timeout> of -1 makes B<epoll_wait>()  wait indefinitely, while specifying "
1759 "a I<timeout> equal to zero makes B<epoll_wait>()  to return immediately even "
1760 "if no events are available (return code equal to zero)."
1761 msgstr ""
1762 "最大で I<timeout> ミリ秒間イベントを待つ。 I<timeout> を -1 に指定すると、 "
1763 "B<epoll_wait>()  は無限に待つ。 また I<timeout> を 0 に指定すると、 "
1764 "B<epoll_wait>()  はイベントが利用可能でなくても、すぐに返る (返り値は 0 であ"
1765 "る)。"
1766
1767 #. type: Plain text
1768 #: build/C/man2/epoll_wait.2:71
1769 msgid "The I<struct epoll_event> is defined as :"
1770 msgstr "I<struct epoll_event> は以下のように定義される:"
1771
1772 #. type: Plain text
1773 #: build/C/man2/epoll_wait.2:80
1774 #, no-wrap
1775 msgid ""
1776 "typedef union epoll_data {\n"
1777 "    void    *ptr;\n"
1778 "    int      fd;\n"
1779 "    uint32_t u32;\n"
1780 "    uint64_t u64;\n"
1781 "} epoll_data_t;\n"
1782 msgstr ""
1783 "typedef union epoll_data {\n"
1784 "    void    *ptr;\n"
1785 "    int      fd;\n"
1786 "    uint32_t u32;\n"
1787 "    uint64_t u64;\n"
1788 "} epoll_data_t;\n"
1789
1790 #. type: Plain text
1791 #: build/C/man2/epoll_wait.2:85
1792 #, no-wrap
1793 msgid ""
1794 "struct epoll_event {\n"
1795 "    uint32_t     events;    /* Epoll events */\n"
1796 "    epoll_data_t data;      /* User data variable */\n"
1797 "};\n"
1798 msgstr ""
1799 "struct epoll_event {\n"
1800 "    uint32_t     events;    /* epoll イベント */\n"
1801 "    epoll_data_t data;      /* ユーザデータ変数 */\n"
1802 "};\n"
1803
1804 #. type: Plain text
1805 #: build/C/man2/epoll_wait.2:96
1806 msgid ""
1807 "The I<data> of each returned structure will contain the same data the user "
1808 "set with an B<epoll_ctl>(2)  (B<EPOLL_CTL_ADD>,B<EPOLL_CTL_MOD>)  while the "
1809 "I<events> member will contain the returned event bit field."
1810 msgstr ""
1811 "返される構造体の I<data> メンバには、ユーザが B<epoll_ctl>(2)  "
1812 "(B<EPOLL_CTL_ADD>, B<EPOLL_CTL_MOD>)  で指定したデータが格納される。 一方、 "
1813 "I<events> メンバには返された利用可能なイベントのビットフィールドが格納され"
1814 "る。"
1815
1816 #. type: SS
1817 #: build/C/man2/epoll_wait.2:96
1818 #, no-wrap
1819 msgid "epoll_pwait()"
1820 msgstr "epoll_pwait()"
1821
1822 #. type: Plain text
1823 #: build/C/man2/epoll_wait.2:110
1824 msgid ""
1825 "The relationship between B<epoll_wait>()  and B<epoll_pwait>()  is analogous "
1826 "to the relationship between B<select>(2)  and B<pselect>(2): like B<pselect>"
1827 "(2), B<epoll_pwait>()  allows an application to safely wait until either a "
1828 "file descriptor becomes ready or until a signal is caught."
1829 msgstr ""
1830 "B<epoll_wait>()  と B<epoll_pwait>()  の関係は、 B<select>(2)  と B<pselect>"
1831 "(2)  の関係と同様である。 B<pselect>(2)  同様、 B<epoll_pwait>()  を使うと、"
1832 "アプリケーションは、ファイルディスクリプタが準備できた状態になるか、 シグナル"
1833 "が捕捉されるまで、安全に待つことができる。"
1834
1835 #. type: Plain text
1836 #: build/C/man2/epoll_wait.2:114
1837 msgid "The following B<epoll_pwait>()  call:"
1838 msgstr "以下の B<epoll_pwait>()  の呼び出しは、"
1839
1840 #. type: Plain text
1841 #: build/C/man2/epoll_wait.2:117
1842 #, no-wrap
1843 msgid "    ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
1844 msgstr "    ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
1845
1846 #. type: Plain text
1847 #: build/C/man2/epoll_wait.2:122 build/C/man2/poll.2:206
1848 msgid "is equivalent to I<atomically> executing the following calls:"
1849 msgstr "次の呼び出しを I<atomic> に実行するのと等価である。"
1850
1851 #. type: Plain text
1852 #: build/C/man2/epoll_wait.2:125
1853 #, no-wrap
1854 msgid "    sigset_t origmask;\n"
1855 msgstr "    sigset_t origmask;\n"
1856
1857 #. type: Plain text
1858 #: build/C/man2/epoll_wait.2:129
1859 #, no-wrap
1860 msgid ""
1861 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
1862 "    ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
1863 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
1864 msgstr ""
1865 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
1866 "    ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
1867 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
1868
1869 #. type: Plain text
1870 #: build/C/man2/epoll_wait.2:137
1871 msgid ""
1872 "The I<sigmask> argument may be specified as NULL, in which case "
1873 "B<epoll_pwait>()  is equivalent to B<epoll_wait>()."
1874 msgstr ""
1875 "I<sigmask> 引き数には NULL を指定してもよい。 その場合には、 B<epoll_pwait>"
1876 "()  は B<epoll_wait>()  と等価となる。"
1877
1878 #. type: Plain text
1879 #: build/C/man2/epoll_wait.2:149
1880 msgid ""
1881 "When successful, B<epoll_wait>()  returns the number of file descriptors "
1882 "ready for the requested I/O, or zero if no file descriptor became ready "
1883 "during the requested I<timeout> milliseconds.  When an error occurs, "
1884 "B<epoll_wait>()  returns -1 and I<errno> is set appropriately."
1885 msgstr ""
1886 "成功した場合、 B<epoll_wait>()  は要求された I/O に対して準備ができているファ"
1887 "イルディスクリプタの数を返す。 また要求された I<timeout> ミリ秒の間にファイル"
1888 "ディスクリプタが準備できない場合は、0 を返す。 エラーが起こった場合、 "
1889 "B<epoll_wait>()  は -1 を返し、 I<errno> を適切に設定する。"
1890
1891 #. type: Plain text
1892 #: build/C/man2/epoll_wait.2:154
1893 msgid "I<epfd> is not a valid file descriptor."
1894 msgstr "I<epfd> が有効なファイルディスクリプタでない。"
1895
1896 #. type: TP
1897 #: build/C/man2/epoll_wait.2:154 build/C/man2/poll.2:268
1898 #, no-wrap
1899 msgid "B<EFAULT>"
1900 msgstr "B<EFAULT>"
1901
1902 #. type: Plain text
1903 #: build/C/man2/epoll_wait.2:159
1904 msgid ""
1905 "The memory area pointed to by I<events> is not accessible with write "
1906 "permissions."
1907 msgstr "I<events> で指されるメモリ領域に書き込み権限でアクセスできない。"
1908
1909 #. type: TP
1910 #: build/C/man2/epoll_wait.2:159 build/C/man2/poll.2:272
1911 #, no-wrap
1912 msgid "B<EINTR>"
1913 msgstr "B<EINTR>"
1914
1915 #. type: Plain text
1916 #: build/C/man2/epoll_wait.2:166
1917 msgid ""
1918 "The call was interrupted by a signal handler before any of the requested "
1919 "events occurred or the I<timeout> expired; see B<signal>(7)."
1920 msgstr ""
1921 "要求されたどのイベントも発生せず、かつ I<timeout> の期限が切れる前に、システ"
1922 "ムコールがシグナルハンドラによって割り込まれた。 B<signal>(7)  参照。"
1923
1924 #. type: Plain text
1925 #: build/C/man2/epoll_wait.2:174
1926 msgid ""
1927 "I<epfd> is not an B<epoll> file descriptor, or I<maxevents> is less than or "
1928 "equal to zero."
1929 msgstr ""
1930 "I<epfd> が B<epoll> ファイルディスクリプタでない。 または I<maxevents> が 0 "
1931 "以下である。"
1932
1933 #.  To be precise: kernel 2.5.44.
1934 #.  The interface should be finalized by Linux kernel 2.5.66.
1935 #. type: Plain text
1936 #: build/C/man2/epoll_wait.2:180
1937 #, fuzzy
1938 #| msgid ""
1939 #| "The B<epoll> API was introduced in Linux kernel 2.5.44.  Support was "
1940 #| "added to glibc in version 2.3.2."
1941 msgid ""
1942 "B<epoll_wait>()  was added to the kernel in version 2.6.  Library support is "
1943 "provided in glibc starting with version 2.3.2."
1944 msgstr ""
1945 "B<epoll> API は Linux カーネル 2.5.44 に導入された。 glibc でのサポートはバー"
1946 "ジョン 2.3.2 で追加された。"
1947
1948 #. type: Plain text
1949 #: build/C/man2/epoll_wait.2:184
1950 #, fuzzy
1951 #| msgid ""
1952 #| "The B<epoll> API was introduced in Linux kernel 2.5.44.  Support was "
1953 #| "added to glibc in version 2.3.2."
1954 msgid ""
1955 "B<epoll_pwait>()  was added to Linux in kernel 2.6.19.  Library support is "
1956 "provided in glibc starting with version 2.6."
1957 msgstr ""
1958 "B<epoll> API は Linux カーネル 2.5.44 に導入された。 glibc でのサポートはバー"
1959 "ジョン 2.3.2 で追加された。"
1960
1961 #. type: Plain text
1962 #: build/C/man2/epoll_wait.2:187
1963 #, fuzzy
1964 #| msgid ""
1965 #| "B<epoll_wait>()  is Linux-specific, and was introduced in kernel 2.5.44."
1966 msgid "B<epoll_wait>()  is Linux-specific."
1967 msgstr "B<epoll_wait>()  は Linux 独自であり、カーネル 2.5.44 で導入された。"
1968
1969 #. type: Plain text
1970 #: build/C/man2/epoll_wait.2:191
1971 msgid "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
1972 msgstr "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
1973
1974 #. type: TH
1975 #: build/C/man2/poll.2:31
1976 #, no-wrap
1977 msgid "POLL"
1978 msgstr "POLL"
1979
1980 #. type: TH
1981 #: build/C/man2/poll.2:31
1982 #, no-wrap
1983 msgid "2010-09-20"
1984 msgstr "2010-09-20"
1985
1986 #. type: Plain text
1987 #: build/C/man2/poll.2:34
1988 msgid "poll, ppoll - wait for some event on a file descriptor"
1989 msgstr "poll, ppoll - ファイルディスクリプタにおけるイベントを待つ"
1990
1991 #. type: Plain text
1992 #: build/C/man2/poll.2:37
1993 #, no-wrap
1994 msgid "B<#include E<lt>poll.hE<gt>>\n"
1995 msgstr "B<#include E<lt>poll.hE<gt>>\n"
1996
1997 #. type: Plain text
1998 #: build/C/man2/poll.2:39
1999 #, no-wrap
2000 msgid "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
2001 msgstr "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
2002
2003 #. type: Plain text
2004 #: build/C/man2/poll.2:42
2005 #, no-wrap
2006 msgid ""
2007 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
2008 "B<#include E<lt>poll.hE<gt>>\n"
2009 msgstr ""
2010 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
2011 "B<#include E<lt>poll.hE<gt>>\n"
2012
2013 #. type: Plain text
2014 #: build/C/man2/poll.2:45
2015 #, no-wrap
2016 msgid ""
2017 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, >\n"
2018 "B<        const struct timespec *>I<timeout_ts>B<, const sigset_t *>I<sigmask>B<);>\n"
2019 msgstr ""
2020 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, >\n"
2021 "B<        const struct timespec *>I<timeout_ts>B<, const sigset_t *>I<sigmask>B<);>\n"
2022
2023 #. type: Plain text
2024 #: build/C/man2/poll.2:52
2025 msgid ""
2026 "B<poll>()  performs a similar task to B<select>(2): it waits for one of a "
2027 "set of file descriptors to become ready to perform I/O."
2028 msgstr ""
2029 "B<poll>()  は B<select>(2)  と同様の仕事を行う、つまり、ファイルディスクリプ"
2030 "タ集合のいずれか一つが I/O を実行可能な状態になるのを待つ。"
2031
2032 #. type: Plain text
2033 #: build/C/man2/poll.2:56
2034 msgid ""
2035 "The set of file descriptors to be monitored is specified in the I<fds> "
2036 "argument, which is an array of structures of the following form:"
2037 msgstr ""
2038 "監視するファイルディスクリプタ集合は、 I<fds> 引き数で指定する。 I<fds> は、"
2039 "以下の型の構造体の配列である。"
2040
2041 #. type: Plain text
2042 #: build/C/man2/poll.2:64
2043 #, no-wrap
2044 msgid ""
2045 "struct pollfd {\n"
2046 "    int   fd;         /* file descriptor */\n"
2047 "    short events;     /* requested events */\n"
2048 "    short revents;    /* returned events */\n"
2049 "};\n"
2050 msgstr ""
2051 "struct pollfd {\n"
2052 "    int   fd;         /* file descriptor */\n"
2053 "    short events;     /* requested events */\n"
2054 "    short revents;    /* returned events */\n"
2055 "};\n"
2056
2057 #. type: Plain text
2058 #: build/C/man2/poll.2:71
2059 msgid ""
2060 "The caller should specify the number of items in the I<fds> array in I<nfds>."
2061 msgstr "I<nfds> には、 I<fds> 配列の要素数を指定する。"
2062
2063 #. type: Plain text
2064 #: build/C/man2/poll.2:75
2065 msgid "The field I<fd> contains a file descriptor for an open file."
2066 msgstr ""
2067 "構造体の I<fd> にはオープンしたファイルのファイルディスクリプタを入れる。"
2068
2069 #. type: Plain text
2070 #: build/C/man2/poll.2:80
2071 msgid ""
2072 "The field I<events> is an input parameter, a bit mask specifying the events "
2073 "the application is interested in."
2074 msgstr ""
2075 "構造体の I<events> 要素は入力パラメータで、アプリケーションが興味を持っている"
2076 "イベントの ビットマスクを指定する。"
2077
2078 #. type: Plain text
2079 #: build/C/man2/poll.2:99
2080 msgid ""
2081 "The field I<revents> is an output parameter, filled by the kernel with the "
2082 "events that actually occurred.  The bits returned in I<revents> can include "
2083 "any of those specified in I<events>, or one of the values B<POLLERR>, "
2084 "B<POLLHUP>, or B<POLLNVAL>.  (These three bits are meaningless in the "
2085 "I<events> field, and will be set in the I<revents> field whenever the "
2086 "corresponding condition is true.)"
2087 msgstr ""
2088 "I<revents> 要素は出力パラメータで、実際に起こったイベントがカーネルにより設定"
2089 "される。 I<revents> で返されるビット列には、 I<events> で指定したもののどれ"
2090 "か、もしくは B<POLLERR>, B<POLLHUP>, B<POLLNVAL> のうちの一つが含まれる "
2091 "(B<POLLERR>, B<POLLHUP>, B<POLLNVAL> の 3つのビットは I<events> に指定しても"
2092 "意味がなく、対応した状態が真の場合に I<revents> に設定される)。"
2093
2094 #. type: Plain text
2095 #: build/C/man2/poll.2:104
2096 msgid ""
2097 "If none of the events requested (and no error) has occurred for any of the "
2098 "file descriptors, then B<poll>()  blocks until one of the events occurs."
2099 msgstr ""
2100 "どのファイルディスクリプタにも要求したイベントが発生しておらず、 エラーも起こ"
2101 "らない場合、 B<poll>()  はイベントのうちいずれか一つが発生するまで停止 "
2102 "(block) する。"
2103
2104 #. type: Plain text
2105 #: build/C/man2/poll.2:113
2106 msgid ""
2107 "The I<timeout> argument specifies an upper limit on the time for which "
2108 "B<poll>()  will block, in milliseconds.  Specifying a negative value in "
2109 "I<timeout> means an infinite timeout."
2110 msgstr ""
2111 "I<timeout> 引き数は B<poll>()  が停止する時間の上限を設定するもので、ミリ秒単"
2112 "位で指定する。 I<timeout> に負の値を指定すると、タイムアウト時間が無限とな"
2113 "る。"
2114
2115 #. type: Plain text
2116 #: build/C/man2/poll.2:119
2117 msgid ""
2118 "The bits that may be set/returned in I<events> and I<revents> are defined in "
2119 "I<E<lt>poll.hE<gt>>:"
2120 msgstr ""
2121 "I<events> に指定したり、 I<revents> で返されるビットは I<E<lt>poll.hE<gt>> で"
2122 "定義されている:"
2123
2124 #. type: TP
2125 #: build/C/man2/poll.2:120
2126 #, no-wrap
2127 msgid "B<POLLIN>"
2128 msgstr "B<POLLIN>"
2129
2130 #. type: Plain text
2131 #: build/C/man2/poll.2:123
2132 msgid "There is data to read."
2133 msgstr "読み出し可能なデータがある。"
2134
2135 #. type: TP
2136 #: build/C/man2/poll.2:123
2137 #, no-wrap
2138 msgid "B<POLLPRI>"
2139 msgstr "B<POLLPRI>"
2140
2141 #. type: Plain text
2142 #: build/C/man2/poll.2:127
2143 msgid ""
2144 "There is urgent data to read (e.g., out-of-band data on TCP socket; "
2145 "pseudoterminal master in packet mode has seen state change in slave)."
2146 msgstr ""
2147 "読み出し可能な緊急データ (urgent data) がある (例えば、TCP ソケットの帯域外 "
2148 "(out-of-band data) データを受信した場合や、 パケットモードの擬似端末のマスタ"
2149 "がスレーブ側の変化を見つけたとき)。"
2150
2151 #. type: TP
2152 #: build/C/man2/poll.2:127
2153 #, no-wrap
2154 msgid "B<POLLOUT>"
2155 msgstr "B<POLLOUT>"
2156
2157 #. type: Plain text
2158 #: build/C/man2/poll.2:130
2159 msgid "Writing now will not block."
2160 msgstr "書き込みが停止 (block) しない状態である。"
2161
2162 #. type: TP
2163 #: build/C/man2/poll.2:130
2164 #, no-wrap
2165 msgid "B<POLLRDHUP> (since Linux 2.6.17)"
2166 msgstr "B<POLLRDHUP> (Linux 2.6.17 以降)"
2167
2168 #. type: Plain text
2169 #: build/C/man2/poll.2:141
2170 msgid ""
2171 "Stream socket peer closed connection, or shut down writing half of "
2172 "connection.  The B<_GNU_SOURCE> feature test macro must be defined (before "
2173 "including I<any> header files)  in order to obtain this definition."
2174 msgstr ""
2175 "ストリームソケットの他端が、コネクションを close したか、 コネクションの書き"
2176 "込み側を shutdown した。 この定義を有効にするには、 (「どの」ヘッダファイルを"
2177 "インクルードするよりも前に)  B<_GNU_SOURCE> 機能検査マクロを定義しなければな"
2178 "らない。"
2179
2180 #. type: TP
2181 #: build/C/man2/poll.2:141
2182 #, no-wrap
2183 msgid "B<POLLERR>"
2184 msgstr "B<POLLERR>"
2185
2186 #. type: Plain text
2187 #: build/C/man2/poll.2:144
2188 msgid "Error condition (output only)."
2189 msgstr "エラー状態 (出力の場合のみ)。"
2190
2191 #. type: TP
2192 #: build/C/man2/poll.2:144
2193 #, no-wrap
2194 msgid "B<POLLHUP>"
2195 msgstr "B<POLLHUP>"
2196
2197 #. type: Plain text
2198 #: build/C/man2/poll.2:147
2199 msgid "Hang up (output only)."
2200 msgstr "ハングアップした (出力の場合のみ)。"
2201
2202 #. type: TP
2203 #: build/C/man2/poll.2:147
2204 #, no-wrap
2205 msgid "B<POLLNVAL>"
2206 msgstr "B<POLLNVAL>"
2207
2208 #. type: Plain text
2209 #: build/C/man2/poll.2:152
2210 msgid "Invalid request: I<fd> not open (output only)."
2211 msgstr "不正な要求: I<fd> がオープンされていない (出力の場合のみ)。"
2212
2213 #. type: Plain text
2214 #: build/C/man2/poll.2:158
2215 msgid ""
2216 "When compiling with B<_XOPEN_SOURCE> defined, one also has the following, "
2217 "which convey no further information beyond the bits listed above:"
2218 msgstr ""
2219 "B<_XOPEN_SOURCE> を定義してコンパイルした場合には、以下の定義も行われる。 た"
2220 "だし、上記のリストにあるビット以上の情報が得られる訳ではない。"
2221
2222 #. type: TP
2223 #: build/C/man2/poll.2:159
2224 #, no-wrap
2225 msgid "B<POLLRDNORM>"
2226 msgstr "B<POLLRDNORM>"
2227
2228 #. type: Plain text
2229 #: build/C/man2/poll.2:163
2230 msgid "Equivalent to B<POLLIN>."
2231 msgstr "B<POLLIN> と同じ。"
2232
2233 #. type: TP
2234 #: build/C/man2/poll.2:163
2235 #, no-wrap
2236 msgid "B<POLLRDBAND>"
2237 msgstr "B<POLLRDBAND>"
2238
2239 #.  POLLRDBAND is used in the DECnet protocol.
2240 #. type: Plain text
2241 #: build/C/man2/poll.2:167
2242 msgid "Priority band data can be read (generally unused on Linux)."
2243 msgstr ""
2244 "優先帯域データ (priority band data) が読み出し可能である (普通は Linux では使"
2245 "用されない)。"
2246
2247 #. type: TP
2248 #: build/C/man2/poll.2:167
2249 #, no-wrap
2250 msgid "B<POLLWRNORM>"
2251 msgstr "B<POLLWRNORM>"
2252
2253 #. type: Plain text
2254 #: build/C/man2/poll.2:171
2255 msgid "Equivalent to B<POLLOUT>."
2256 msgstr "B<POLLOUT> と同じ。"
2257
2258 #. type: TP
2259 #: build/C/man2/poll.2:171
2260 #, no-wrap
2261 msgid "B<POLLWRBAND>"
2262 msgstr "B<POLLWRBAND>"
2263
2264 #. type: Plain text
2265 #: build/C/man2/poll.2:174
2266 msgid "Priority data may be written."
2267 msgstr "優先帯域データ (priority data) が書き込み可能である。"
2268
2269 #. type: Plain text
2270 #: build/C/man2/poll.2:178
2271 msgid "Linux also knows about, but does not use B<POLLMSG>."
2272 msgstr "Linux では B<POLLMSG> も定義されているが、使用されていない。"
2273
2274 #. type: SS
2275 #: build/C/man2/poll.2:178
2276 #, no-wrap
2277 msgid "ppoll()"
2278 msgstr "ppoll()"
2279
2280 #. type: Plain text
2281 #: build/C/man2/poll.2:192
2282 msgid ""
2283 "The relationship between B<poll>()  and B<ppoll>()  is analogous to the "
2284 "relationship between B<select>(2)  and B<pselect>(2): like B<pselect>(2), "
2285 "B<ppoll>()  allows an application to safely wait until either a file "
2286 "descriptor becomes ready or until a signal is caught."
2287 msgstr ""
2288 "B<poll>()  と B<ppoll>()  の関係は B<select>(2)  と B<pselect>(2)  の関係と同"
2289 "じようなものである: B<pselect>(2)  と同様に、 B<ppoll>()  を使うと、アプリ"
2290 "ケーションはファイルディスクリプタの状態変化 もしくはシグナルの捕捉を安全に待"
2291 "つことができる。"
2292
2293 #. type: Plain text
2294 #: build/C/man2/poll.2:198
2295 msgid ""
2296 "Other than the difference in the precision of the I<timeout> argument, the "
2297 "following B<ppoll>()  call:"
2298 msgstr ""
2299 "I<timeout> 引き数の精度の違いを除くと、以下の B<ppoll>()  の呼び出しは、"
2300
2301 #. type: Plain text
2302 #: build/C/man2/poll.2:201
2303 #, no-wrap
2304 msgid "    ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2305 msgstr "    ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2306
2307 #. type: Plain text
2308 #: build/C/man2/poll.2:210
2309 #, no-wrap
2310 msgid ""
2311 "    sigset_t origmask;\n"
2312 "    int timeout;\n"
2313 msgstr ""
2314 "    sigset_t origmask;\n"
2315 "    int timeout;\n"
2316
2317 #. type: Plain text
2318 #: build/C/man2/poll.2:216
2319 #, no-wrap
2320 msgid ""
2321 "    timeout = (timeout_ts == NULL) ? -1 :\n"
2322 "              (timeout_ts.tv_sec * 1000 + timeout_ts.tv_nsec / 1000000);\n"
2323 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2324 "    ready = poll(&fds, nfds, timeout);\n"
2325 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2326 msgstr ""
2327 "    timeout = (timeout_ts == NULL) ? -1 :\n"
2328 "              (timeout_ts.tv_sec * 1000 + timeout_ts.tv_nsec / 1000000);\n"
2329 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2330 "    ready = poll(&fds, nfds, timeout);\n"
2331 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2332
2333 #. type: Plain text
2334 #: build/C/man2/poll.2:223
2335 msgid ""
2336 "See the description of B<pselect>(2)  for an explanation of why B<ppoll>()  "
2337 "is necessary."
2338 msgstr ""
2339 "なぜ B<ppoll>()  が必要なのかについての説明は B<pselect>(2)  の説明を参照のこ"
2340 "と。"
2341
2342 #. type: Plain text
2343 #: build/C/man2/poll.2:235
2344 msgid ""
2345 "If the I<sigmask> argument is specified as NULL, then no signal mask "
2346 "manipulation is performed (and thus B<ppoll>()  differs from B<poll>()  only "
2347 "in the precision of the I<timeout> argument)."
2348 msgstr ""
2349 "I<sigmask> 引き数に NULL が指定された場合、シグナルマスクの操作は行われない "
2350 "(したがって、 B<ppoll>()  の B<poll>()  との違いは I<timeout> 引き数の精度だ"
2351 "けとなる)。"
2352
2353 #. type: Plain text
2354 #: build/C/man2/poll.2:242
2355 msgid ""
2356 "The I<timeout_ts> argument specifies an upper limit on the amount of time "
2357 "that B<ppoll>()  will block.  This argument is a pointer to a structure of "
2358 "the following form:"
2359 msgstr ""
2360 "I<timeout> 引き数は B<ppoll>()  が停止する時間の上限を指定するものである。 こ"
2361 "の引き数には以下の型の構造体へのポインタを指定する。"
2362
2363 #. type: Plain text
2364 #: build/C/man2/poll.2:249
2365 #, no-wrap
2366 msgid ""
2367 "struct timespec {\n"
2368 "    long    tv_sec;         /* seconds */\n"
2369 "    long    tv_nsec;        /* nanoseconds */\n"
2370 "};\n"
2371 msgstr ""
2372 "struct timespec {\n"
2373 "    long    tv_sec;         /* seconds */\n"
2374 "    long    tv_nsec;        /* nanoseconds */\n"
2375 "};\n"
2376
2377 #. type: Plain text
2378 #: build/C/man2/poll.2:257
2379 msgid ""
2380 "If I<timeout_ts> is specified as NULL, then B<ppoll>()  can block "
2381 "indefinitely."
2382 msgstr ""
2383 "I<timeout_ts> に NULL が指定された場合、 B<ppoll> は無限に停止することがあり"
2384 "得る。"
2385
2386 #. type: Plain text
2387 #: build/C/man2/poll.2:267
2388 msgid ""
2389 "On success, a positive number is returned; this is the number of structures "
2390 "which have nonzero I<revents> fields (in other words, those descriptors with "
2391 "events or errors reported).  A value of 0 indicates that the call timed out "
2392 "and no file descriptors were ready.  On error, -1 is returned, and I<errno> "
2393 "is set appropriately."
2394 msgstr ""
2395 "成功した場合は正の数を返す。この数は 0 以外の I<revents> 要素を持つ構造体の数"
2396 "である (別の言い方をすると、これらのディスクリプタ にはイベントかエラー報告が"
2397 "ある)。 値 0 は、タイムアウトとなり、どのファイルディスクリプタでもイベント"
2398 "が 発生しなかったことを示す。エラーの場合は -1 が返され、 I<errno> が適切に設"
2399 "定される。"
2400
2401 #. type: Plain text
2402 #: build/C/man2/poll.2:272
2403 msgid ""
2404 "The array given as argument was not contained in the calling program's "
2405 "address space."
2406 msgstr ""
2407 "引き数として指定した配列が、呼び出したプロセスのアドレス空間に 含まれていな"
2408 "い。"
2409
2410 #. type: Plain text
2411 #: build/C/man2/poll.2:276
2412 msgid "A signal occurred before any requested event; see B<signal>(7)."
2413 msgstr ""
2414 "要求されたイベントのどれかが起こる前にシグナルが発生した。 B<signal>(7)  参"
2415 "照。"
2416
2417 #. type: Plain text
2418 #: build/C/man2/poll.2:283
2419 msgid "The I<nfds> value exceeds the B<RLIMIT_NOFILE> value."
2420 msgstr "I<nfds> の値が B<RLIMIT_NOFILE> を超えた。"
2421
2422 #. type: Plain text
2423 #: build/C/man2/poll.2:286
2424 msgid "There was no space to allocate file descriptor tables."
2425 msgstr "ファイルディスクリプタ・テーブルを確保するためのメモリがない。"
2426
2427 #. type: Plain text
2428 #: build/C/man2/poll.2:299
2429 msgid ""
2430 "The B<poll>()  system call was introduced in Linux 2.1.23.  The B<poll>()  "
2431 "library call was introduced in libc 5.4.28 (and provides emulation using "
2432 "B<select>(2)  if your kernel does not have a B<poll>()  system call)."
2433 msgstr ""
2434 "B<poll>()  システムコールは Linux 2.1.23 で導入された。 B<poll>()  ライブラ"
2435 "リ・コールは libc 5.4.28 から導入された (これはカーネルが B<poll>()  システム"
2436 "コールをサポートしていない場合に B<select>(2)  を使用してエミュレートを行"
2437 "う)。"
2438
2439 #. type: Plain text
2440 #: build/C/man2/poll.2:306
2441 msgid ""
2442 "The B<ppoll>()  system call was added to Linux in kernel 2.6.16.  The "
2443 "B<ppoll>()  library call was added in glibc 2.4."
2444 msgstr ""
2445 "B<ppoll>()  システムコールは カーネル 2.6.16 で Linux に追加された。 B<ppoll>"
2446 "()  ライブラリコールは glibc 2.4 に追加された。"
2447
2448 #.  NetBSD 3.0 has a pollts() which is like Linux ppoll().
2449 #. type: Plain text
2450 #: build/C/man2/poll.2:312
2451 msgid "B<poll>()  conforms to POSIX.1-2001.  B<ppoll>()  is Linux-specific."
2452 msgstr ""
2453 "B<poll>()  は POSIX.1-2001 に準拠している。 B<ppoll>()  は Linux 固有である。"
2454
2455 #. type: Plain text
2456 #: build/C/man2/poll.2:320
2457 msgid ""
2458 "Some implementations define the nonstandard constant B<INFTIM> with the "
2459 "value -1 for use as a I<timeout> for B<poll>().  This constant is not "
2460 "provided in glibc."
2461 msgstr ""
2462 "いくつかの実装では、値 -1 を持った非標準の定数 B<INFTIM> が定義されており、 "
2463 "B<poll>()  の I<timeout> の指定に使用できる。 この定数は glibc では定義されて"
2464 "いない。"
2465
2466 #. type: SS
2467 #: build/C/man2/poll.2:320
2468 #, no-wrap
2469 msgid "Linux Notes"
2470 msgstr "Linux での注意"
2471
2472 #. type: Plain text
2473 #: build/C/man2/poll.2:334
2474 msgid ""
2475 "The Linux B<ppoll>()  system call modifies its I<timeout_ts> argument.  "
2476 "However, the glibc wrapper function hides this behavior by using a local "
2477 "variable for the timeout argument that is passed to the system call.  Thus, "
2478 "the glibc B<ppoll>()  function does not modify its I<timeout_ts> argument."
2479 msgstr ""
2480 "Linux の B<ppoll>()  システムコールは I<timeout_ts> 引き数を変更する。 しか"
2481 "し、glibc のラッパー関数は、システムコールに渡す timeout 引き数 としてローカ"
2482 "ル変数を使うことでこの動作を隠蔽している。 このため、glibc の B<ppoll>()  関"
2483 "数では I<timeout_ts> 引き数は変更されない。"
2484
2485 #. type: Plain text
2486 #: build/C/man2/poll.2:338
2487 msgid ""
2488 "See the discussion of spurious readiness notifications under the BUGS "
2489 "section of B<select>(2)."
2490 msgstr ""
2491 "B<select>(2)  の「バグ」の節に書かれている、誤った準備完了通知 (spurious "
2492 "readiness notifications) についての議論を参照のこと。"
2493
2494 #. type: Plain text
2495 #: build/C/man2/poll.2:342
2496 msgid "B<select>(2), B<select_tut>(2), B<time>(7)"
2497 msgstr "B<select>(2), B<select_tut>(2), B<time>(7)"
2498
2499 #~ msgid "2009-01-17"
2500 #~ msgstr "2009-01-17"
2501
2502 #~ msgid "2010-08-29"
2503 #~ msgstr "2010-08-29"
2504
2505 #~ msgid ""
2506 #~ "Glibc support for B<epoll_pwait>()  is provided starting with version 2.6."
2507 #~ msgstr ""
2508 #~ "B<epoll_pwait>()  の glibc でのサポートは glibc 2.6 以降で提供されている。"