OSDN Git Service

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