OSDN Git Service

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