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.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2012-05-01 04:38+0900\n"
10 "PO-Revision-Date: 2012-05-01 04:44+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
19 #: build/C/man7/epoll.7:21
25 #: build/C/man7/epoll.7:21 build/C/man2/epoll_wait.2:23
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
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
43 msgid "Linux Programmer's Manual"
44 msgstr "Linux Programmer's Manual"
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
55 #: build/C/man7/epoll.7:24
56 msgid "epoll - I/O event notification facility"
57 msgstr "epoll - I/O イベント通知機能"
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
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>>"
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
81 #: build/C/man7/epoll.7:40
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:"
89 "B<epoll> API は B<poll>(2) と同様の処理を行う、つまり、複数のファイルディス"
91 "リプタを監視し、その中のいずれかが入出力可能な状態であるかを確認する。\n"
92 "B<epoll> API は、エッジトリガインタフェースとレベルトリガインタフェースの\n"
93 "いずれとしても使用することができ、監視するファイルディスクリプタの数が多い\n"
94 "場合にも使用できる。 B<epoll> インスタンスの作成や管理を行うために\n"
98 #: build/C/man7/epoll.7:40 build/C/man7/epoll.7:49 build/C/man7/epoll.7:57
104 #: build/C/man7/epoll.7:49
106 "B<epoll_create>(2) creates an B<epoll> instance and returns a file "
107 "descriptor referring to that instance. (The more recent B<epoll_create1>"
108 "(2) extends the functionality of B<epoll_create>(2).)"
110 "B<epoll_create>(2) は B<epoll> インスタンスを作成し、そのインスタンスを参照す"
112 "ファイルディスクリプタを返す。(もっと新しい B<epoll_create1>(2) では、\n"
113 "B<epoll_create>(2) の機能が拡張されている)。"
116 #: build/C/man7/epoll.7:57
118 "Interest in particular file descriptors is then registered via B<epoll_ctl>"
119 "(2). The set of file descriptors currently registered on an B<epoll> "
120 "instance is sometimes called an I<epoll> set."
122 "特定のファイルディスクリプタに対する監視内容を B<epoll_ctl>(2) で登録する。 "
123 "B<epoll> インスタンスに現在登録されているファイルディスクリプタの集合は "
124 "I<epoll> 集合と呼ばれることもある。"
127 #: build/C/man7/epoll.7:61
129 "B<epoll_wait>(2) waits for I/O events, blocking the calling thread if no "
130 "events are currently available."
132 "B<epoll_wait>(2) は I/O イベントを待つ。\n"
133 "現在利用可能な状態のイベントがなければ、呼び出したスレッドを停止する。"
136 #: build/C/man7/epoll.7:61
138 msgid "Level-Triggered and Edge-Triggered"
139 msgstr "レベルトリガとエッジトリガ"
142 #: build/C/man7/epoll.7:70
144 "The B<epoll> event distribution interface is able to behave both as edge-"
145 "triggered (ET) and as level-triggered (LT). The difference between the two "
146 "mechanisms can be described as follows. Suppose that this scenario happens:"
148 "B<epoll> イベント配送 (distribution) インタフェースは、 エッジトリガ (ET) と"
149 "してもレベルトリガ (LT) としても動作させることができる。 二つの配送機構の違い"
150 "は、次のように説明できる。 このようなシナリオが起こったとしよう:"
153 #: build/C/man7/epoll.7:70
159 #: build/C/man7/epoll.7:76
161 "The file descriptor that represents the read side of a pipe (I<rfd>) is "
162 "registered on the B<epoll> instance."
164 "パイプの読み込み側を表すファイルディスクリプタ (I<rfd>) が B<epoll> インスタ"
168 #: build/C/man7/epoll.7:76
174 #: build/C/man7/epoll.7:78
175 msgid "A pipe writer writes 2 kB of data on the write side of the pipe."
177 "パイプへ書き込むプログラムが 2 kB のデータをパイプの書き込み側へ書き込む。"
180 #: build/C/man7/epoll.7:78
186 #: build/C/man7/epoll.7:84
188 "A call to B<epoll_wait>(2) is done that will return I<rfd> as a ready file "
191 "B<epoll_wait>(2) を呼び出すと、読み込み可能 (ready) なファイルディスクリプタ"
195 #: build/C/man7/epoll.7:84
201 #: build/C/man7/epoll.7:87
202 msgid "The pipe reader reads 1 kB of data from I<rfd>."
203 msgstr "パイプから読み出すプログラムが、1 kB のデータを I<rfd> から読み出す。"
206 #: build/C/man7/epoll.7:87
212 #: build/C/man7/epoll.7:91
213 msgid "A call to B<epoll_wait>(2) is done."
214 msgstr "B<epoll_wait>(2) の呼び出しが行われる。"
217 #: build/C/man7/epoll.7:126
219 "If the I<rfd> file descriptor has been added to the B<epoll> interface using "
220 "the B<EPOLLET> (edge-triggered) flag, the call to B<epoll_wait>(2) done in "
221 "step B<5> will probably hang despite the available data still present in the "
222 "file input buffer; meanwhile the remote peer might be expecting a response "
223 "based on the data it already sent. The reason for this is that edge-"
224 "triggered mode only delivers events when changes occur on the monitored file "
225 "descriptor. So, in step B<5> the caller might end up waiting for some data "
226 "that is already present inside the input buffer. In the above example, an "
227 "event on I<rfd> will be generated because of the write done in B<2> and the "
228 "event is consumed in B<3>. Since the read operation done in B<4> does not "
229 "consume the whole buffer data, the call to B<epoll_wait>(2) done in step "
230 "B<5> might block indefinitely."
232 "I<rfd> ファイルディスクリプタが B<EPOLLET> フラグ (エッジトリガ) を使って "
233 "B<epoll> に追加されていると、 利用可能なデータがファイル入力バッファにまだ存"
234 "在するにもかかわらず ステップ B<5> の B<epoll_wait>(2) の呼び出しでハングす"
235 "る可能性がある。 その一方で、リモートの接続先 (peer) は既に送られたデータに "
236 "基づいて応答を期待しているかもしれない。 このようなことが起こる理由は、エッジ"
237 "トリガイベント配送では、 モニタしているファイルでイベントが起ったときにのみイ"
238 "ベントが 配送されるためである。 したがって、ステップ B<5> では、呼び出し側は"
239 "結果的に 入力バッファ内にすで存在するデータを待つことになるかもしれない。 上"
240 "記の例では、 B<2> で行われた書き込みによって I<rfd> に関するイベントが生成さ"
241 "れ、 B<3> でイベントが消費 (consume) される。 B<4> で行われる読み込み操作で"
242 "は、全部のバッファデータを消費しないので、 ステップ B<5> で行われる "
243 "B<epoll_wait>(2) の呼び出しが 無期限に停止 (block) するかもしれない。"
246 #: build/C/man7/epoll.7:136
248 "An application that employs the B<EPOLLET> flag should use nonblocking file "
249 "descriptors to avoid having a blocking read or write starve a task that is "
250 "handling multiple file descriptors. The suggested way to use B<epoll> as an "
251 "edge-triggered (B<EPOLLET>) interface is as follows:"
253 "B<EPOLLET> フラグを採用するアプリケーションでは、 インタフェースはブロックし"
254 "ない (nonblocking) ファイルディスクリプタを 使うべきである。 これは、ブロック"
255 "される読み込みや書き込みによって、 複数のファイルディスクリプタを扱うタスク"
256 "が 停止してしまうのを避けるためである。 B<epoll> をエッジトリガ "
257 "(B<EPOLLET>) インタフェースとして使うために提案される方法は以下の通りであ"
261 #: build/C/man7/epoll.7:137
267 #: build/C/man7/epoll.7:140
268 msgid "with nonblocking file descriptors; and"
269 msgstr "ブロックしないファイルディスクリプタと共に使う。"
272 #: build/C/man7/epoll.7:140
278 #: build/C/man7/epoll.7:148
280 "by waiting for an event only after B<read>(2) or B<write>(2) return "
283 "B<read>(2) または B<write>(2) が B<EAGAIN> を返した後でのみ、イベントを待"
287 #: build/C/man7/epoll.7:159
289 "By contrast, when used as a level-triggered interface (the default, when "
290 "B<EPOLLET> is not specified), B<epoll> is simply a faster B<poll>(2), and "
291 "can be used wherever the latter is used since it shares the same semantics."
293 "一方、レベルトリガインタフェースとして使う場合\n"
295 "B<EPOLLET> が指定されなかった場合)、\n"
296 "B<epoll> は単に高速な B<poll>(2) であり、使い方が同じなので、\n"
297 "B<poll>(2) が使われているところではどこでも使用することができる。"
300 #: build/C/man7/epoll.7:176
302 "Since even with edge-triggered B<epoll>, multiple events can be generated "
303 "upon receipt of multiple chunks of data, the caller has the option to "
304 "specify the B<EPOLLONESHOT> flag, to tell B<epoll> to disable the associated "
305 "file descriptor after the receipt of an event with B<epoll_wait>(2). When "
306 "the B<EPOLLONESHOT> flag is specified, it is the caller's responsibility to "
307 "rearm the file descriptor using B<epoll_ctl>(2) with B<EPOLL_CTL_MOD>."
309 "エッジトリガを使った場合でも、複数のデータを受信すると複数の B<epoll> イベン"
310 "トが生成されるので、 呼び出し側には B<EPOLLONESHOT> フラグを指定するオプショ"
311 "ンがある。 このフラグは B<epoll> に対して、 B<epoll_wait>(2) によるイベント"
312 "を受信した後で、関連するファイルディスクリプタを無効にさせる。 "
313 "B<EPOLLONESHOT> フラグが指定された場合、 B<epoll_ctl>(2) に "
314 "B<EPOLL_CTL_MOD> を指定してファイルディスクリプタを再度使用できるようにするの"
318 #: build/C/man7/epoll.7:176
320 msgid "/proc interfaces"
321 msgstr "/proc インタフェース"
323 #. Following was added in 2.6.28, but them removed in 2.6.29
325 #. .IR /proc/sys/fs/epoll/max_user_instances " (since Linux 2.6.28)"
326 #. This specifies an upper limit on the number of epoll instances
327 #. that can be created per real user ID.
329 #: build/C/man7/epoll.7:184
331 "The following interfaces can be used to limit the amount of kernel memory "
334 "epoll が消費するカーネルメモリの量を制限するために、 以下のインタフェースを使"
338 #: build/C/man7/epoll.7:184
340 msgid "I</proc/sys/fs/epoll/max_user_watches> (since Linux 2.6.28)"
341 msgstr "I</proc/sys/fs/epoll/max_user_watches> (Linux 2.6.28 以降)"
343 #. 2.6.29 (in 2.6.28, the default was 1/32 of lowmem)
345 #: build/C/man7/epoll.7:198
347 "This specifies a limit on the total number of file descriptors that a user "
348 "can register across all epoll instances on the system. The limit is per "
349 "real user ID. Each registered file descriptor costs roughly 90 bytes on a "
350 "32-bit kernel, and roughly 160 bytes on a 64-bit kernel. Currently, the "
351 "default value for I<max_user_watches> is 1/25 (4%) of the available low "
352 "memory, divided by the registration cost in bytes."
354 "このファイルは、あるユーザがシステム上の全ての epoll インスタンスに 登録でき"
355 "るファイルディスクリプタの総数の上限を規定する。 この上限は実ユーザ ID 単位で"
356 "ある。 登録されたファイルディスクリプタ 1 つが消費するメモリ量は、 32 ビット"
357 "カーネルでおよそ 90 バイト、 64 ビットカーネルでおよそ 160 バイトである。 現"
358 "在のところ、 I<max_user_watches> のデフォルト値は、利用可能なメモリ下限の "
359 "1/25 (4%) であり、 登録で消費されるメモリ量 (バイト単位) で割った値となる。"
362 #: build/C/man7/epoll.7:198
364 msgid "Example for Suggested Usage"
368 #: build/C/man7/epoll.7:227
370 "While the usage of B<epoll> when employed as a level-triggered interface "
371 "does have the same semantics as B<poll>(2), the edge-triggered usage "
372 "requires more clarification to avoid stalls in the application event loop. "
373 "In this example, listener is a nonblocking socket on which B<listen>(2) has "
374 "been called. The function I<do_use_fd()> uses the new ready file descriptor "
375 "until B<EAGAIN> is returned by either B<read>(2) or B<write>(2). An event-"
376 "driven state machine application should, after having received B<EAGAIN>, "
377 "record its current state so that at the next call to I<do_use_fd()> it will "
378 "continue to B<read>(2) or B<write>(2) from where it stopped before."
380 "レベルトリガインタフェースとして使用するときの B<epoll> の使い方は B<poll>"
381 "(2) と同じである。 しかしエッジトリガとして使う場合は、 アプリケーションのイ"
382 "ベントループでストール (stall) しないように、 使い方をより明確にしておく必要"
383 "がある。 この例では、リスナはブロックしないソケットであり、 B<listen>(2) が"
384 "呼ばれている。 関数 I<do_use_fd()> は、 B<read>(2) または B<write>(2) に"
385 "よって B<EAGAIN> が返されるまでは、新しい準備済みのファイルディスクリプタを使"
386 "う。 イベント駆動ステートマシンアプリケーションは、 B<EAGAIN> を受信した後、"
387 "カレントの状態を記録しておくべきである。 これにより、次の I<do_use_fd()> 呼び"
388 "出しのときに、以前に停止したところから B<read>(2) または B<write>(2) を継続"
392 #: build/C/man7/epoll.7:233
395 "#define MAX_EVENTS 10\n"
396 "struct epoll_event ev, events[MAX_EVENTS];\n"
397 "int listen_sock, conn_sock, nfds, epollfd;\n"
399 "#define MAX_EVENTS 10\n"
400 "struct epoll_event ev, events[MAX_EVENTS];\n"
401 "int listen_sock, conn_sock, nfds, epollfd;\n"
404 #: build/C/man7/epoll.7:236
407 "/* Set up listening socket, \\(aqlisten_sock\\(aq (socket(),\n"
408 " bind(), listen()) */\n"
410 "/* Set up listening socket, \\(aqlisten_sock\\(aq (socket(),\n"
411 " bind(), listen()) */\n"
414 #: build/C/man7/epoll.7:242
417 "epollfd = epoll_create(10);\n"
418 "if (epollfd == -1) {\n"
419 " perror(\"epoll_create\");\n"
420 " exit(EXIT_FAILURE);\n"
423 "epollfd = epoll_create(10);\n"
424 "if (epollfd == -1) {\n"
425 " perror(\"epoll_create\");\n"
426 " exit(EXIT_FAILURE);\n"
430 #: build/C/man7/epoll.7:249
433 "ev.events = EPOLLIN;\n"
434 "ev.data.fd = listen_sock;\n"
435 "if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n"
436 " perror(\"epoll_ctl: listen_sock\");\n"
437 " exit(EXIT_FAILURE);\n"
440 "ev.events = EPOLLIN;\n"
441 "ev.data.fd = listen_sock;\n"
442 "if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n"
443 " perror(\"epoll_ctl: listen_sock\");\n"
444 " exit(EXIT_FAILURE);\n"
448 #: build/C/man7/epoll.7:256
452 " nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n"
453 " if (nfds == -1) {\n"
454 " perror(\"epoll_pwait\");\n"
455 " exit(EXIT_FAILURE);\n"
459 " nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n"
460 " if (nfds == -1) {\n"
461 " perror(\"epoll_pwait\");\n"
462 " exit(EXIT_FAILURE);\n"
466 #: build/C/man7/epoll.7:278
469 " for (n = 0; n E<lt> nfds; ++n) {\n"
470 " if (events[n].data.fd == listen_sock) {\n"
471 " conn_sock = accept(listen_sock,\n"
472 " (struct sockaddr *) &local, &addrlen);\n"
473 " if (conn_sock == -1) {\n"
474 " perror(\"accept\");\n"
475 " exit(EXIT_FAILURE);\n"
477 " setnonblocking(conn_sock);\n"
478 " ev.events = EPOLLIN | EPOLLET;\n"
479 " ev.data.fd = conn_sock;\n"
480 " if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n"
482 " perror(\"epoll_ctl: conn_sock\");\n"
483 " exit(EXIT_FAILURE);\n"
486 " do_use_fd(events[n].data.fd);\n"
491 " for (n = 0; n E<lt> nfds; ++n) {\n"
492 " if (events[n].data.fd == listen_sock) {\n"
493 " conn_sock = accept(listen_sock,\n"
494 " (struct sockaddr *) &local, &addrlen);\n"
495 " if (conn_sock == -1) {\n"
496 " perror(\"accept\");\n"
497 " exit(EXIT_FAILURE);\n"
499 " setnonblocking(conn_sock);\n"
500 " ev.events = EPOLLIN | EPOLLET;\n"
501 " ev.data.fd = conn_sock;\n"
502 " if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n"
504 " perror(\"epoll_ctl: conn_sock\");\n"
505 " exit(EXIT_FAILURE);\n"
508 " do_use_fd(events[n].data.fd);\n"
514 #: build/C/man7/epoll.7:297
516 "When used as an edge-triggered interface, for performance reasons, it is "
517 "possible to add the file descriptor inside the B<epoll> interface "
518 "(B<EPOLL_CTL_ADD>) once by specifying (B<EPOLLIN>|B<EPOLLOUT>). This "
519 "allows you to avoid continuously switching between B<EPOLLIN> and "
520 "B<EPOLLOUT> calling B<epoll_ctl>(2) with B<EPOLL_CTL_MOD>."
522 "エッジトリガインタフェースとして使う場合、性能上の理由により、 一度 "
523 "(B<EPOLLIN>|B<EPOLLOUT>) を指定してから (B<EPOLL_CTL_ADD> で) ファイルディス"
524 "クリプタを B<epoll> インタフェースに追加することができる。 これにより、 "
525 "B<epoll_ctl>(2) に B<EPOLL_CTL_MOD> を指定して呼び出すことで B<EPOLLIN> と "
526 "B<EPOLLOUT> の連続的な切り替えが避けられる。"
529 #: build/C/man7/epoll.7:297
531 msgid "Questions and Answers"
535 #: build/C/man7/epoll.7:298
541 #: build/C/man7/epoll.7:303
543 "What is the key used to distinguish the file descriptors registered in an "
546 "B<epoll> 集合内の登録されたファイルディスクリプタを区別するには、 何をキーと"
550 #: build/C/man7/epoll.7:303
556 #: build/C/man7/epoll.7:309
558 "The key is the combination of the file descriptor number and the open file "
559 "description (also known as an \"open file handle\", the kernel's internal "
560 "representation of an open file)."
562 "キーはファイルディスクリプタ番号とオープンファイル記述 (open file "
563 "description) の組である (オープンファイル記述は \"open file handle\" とも 呼"
564 "ばれ、オープンされたファイルのカーネルの内部表現である)。"
567 #: build/C/man7/epoll.7:309
573 #: build/C/man7/epoll.7:314
575 "What happens if you register the same file descriptor on an B<epoll> "
578 "1 つの B<epoll> インスタンスに同じファイルディスクリプタを 2 回登録するとどう"
582 #: build/C/man7/epoll.7:314
587 #. But a descriptor duplicated by fork(2) can't be added to the
588 #. set, because the [file *, fd] pair is already in the epoll set.
589 #. That is a somewhat ugly inconsistency. On the one hand, a child process
590 #. cannot add the duplicate file descriptor to the epoll set. (In every
591 #. other case that I can think of, descriptors duplicated by fork have
592 #. similar semantics to descriptors duplicated by dup() and friends.) On
593 #. the other hand, the very fact that the child has a duplicate of the
594 #. descriptor means that even if the parent closes its descriptor, then
595 #. epoll_wait() in the parent will continue to receive notifications for
596 #. that descriptor because of the duplicated descriptor in the child.
597 #. See http://thread.gmane.org/gmane.linux.kernel/596462/
598 #. "epoll design problems with common fork/exec patterns"
601 #: build/C/man7/epoll.7:345
603 "You will probably get B<EEXIST>. However, it is possible to add a duplicate "
604 "(B<dup>(2), B<dup2>(2), B<fcntl>(2) B<F_DUPFD>) descriptor to the same "
605 "B<epoll> instance. This can be a useful technique for filtering events, if "
606 "the duplicate file descriptors are registered with different I<events> masks."
608 "たぶん B<EEXIST> を受け取るだろう。 しかしながら、同じ B<epoll> インスタンス"
609 "に対して複製されたディスクリプタを追加することは可能である (B<dup>(2), "
610 "B<dup2>(2), B<fcntl>(2) B<F_DUPFD> など)。 複製したファイルディスクリプタを"
611 "異なる I<events> マスクで登録すれば、イベントをフィルタリングするのに この機"
615 #: build/C/man7/epoll.7:345
621 #: build/C/man7/epoll.7:353
623 "Can two B<epoll> instances wait for the same file descriptor? If so, are "
624 "events reported to both B<epoll> file descriptors?"
626 "2 つの B<epoll> インスタンスが同じファイルディスクリプタを待ち受けることは可"
627 "能か? もし可能であれば、イベントは両方の B<epoll> ファイルディスクリプタに報"
631 #: build/C/man7/epoll.7:353
637 #: build/C/man7/epoll.7:357
639 "Yes, and events would be reported to both. However, careful programming may "
640 "be needed to do this correctly."
642 "イベントは両方に報告される。 しかしながら、これを正しく扱うには注意深くプログ"
643 "ラミングする必要が あるかもしれない。"
646 #: build/C/man7/epoll.7:357
652 #: build/C/man7/epoll.7:362
653 msgid "Is the B<epoll> file descriptor itself poll/epoll/selectable?"
654 msgstr "B<epoll> ファイルディスクリプタ自身は poll/epoll/select が可能か?"
657 #: build/C/man7/epoll.7:362
663 #: build/C/man7/epoll.7:369
665 "Yes. If an B<epoll> file descriptor has events waiting then it will "
666 "indicate as being readable."
668 "可能である。 B<epoll> ファイルディスクリプタに処理待ちのイベントがある場合"
669 "は、 読み出し可能だと通知されることだろう。"
672 #: build/C/man7/epoll.7:369
678 #: build/C/man7/epoll.7:374
680 "What happens if one attempts to put an B<epoll> file descriptor into its own "
681 "file descriptor set?"
683 "B<epoll> ファイルディスクリプタを自身のファイルディスクリプタ集合に 入れよう"
687 #: build/C/man7/epoll.7:374
693 #: build/C/man7/epoll.7:385
695 "The B<epoll_ctl>(2) call will fail (B<EINVAL>). However, you can add an "
696 "B<epoll> file descriptor inside another B<epoll> file descriptor set."
698 "B<epoll_ctl>(2) の呼び出しは (B<EINVAL> で) 失敗するだろう。 ただし "
699 "B<epoll> ファイルディスクリプタを他の B<epoll> ファイルディスクリプタ集合の内"
703 #: build/C/man7/epoll.7:385
709 #: build/C/man7/epoll.7:390
711 "Can I send an B<epoll> file descriptor over a UNIX domain socket to another "
714 "B<epoll> ファイルディスクリプタを UNIX ドメインソケットで他のプロセスに送るこ"
718 #: build/C/man7/epoll.7:390
724 #: build/C/man7/epoll.7:396
726 "Yes, but it does not make sense to do this, since the receiving process "
727 "would not have copies of the file descriptors in the B<epoll> set."
729 "可能だが、これをすることに意味はない。 なぜなら、受信側のプロセスが B<epoll> "
730 "集合内のファイルディスクリプタのコピーを持っていないからである。"
733 #: build/C/man7/epoll.7:396
739 #: build/C/man7/epoll.7:401
741 "Will closing a file descriptor cause it to be removed from all B<epoll> sets "
744 "ファイルディスクリプタをクローズすると、そのファイルディスクリプタは全ての "
745 "B<epoll> 集合から自動的に削除されるか?"
748 #: build/C/man7/epoll.7:401
754 #: build/C/man7/epoll.7:429
756 "Yes, but be aware of the following point. A file descriptor is a reference "
757 "to an open file description (see B<open>(2)). Whenever a descriptor is "
758 "duplicated via B<dup>(2), B<dup2>(2), B<fcntl>(2) B<F_DUPFD>, or B<fork>"
759 "(2), a new file descriptor referring to the same open file description is "
760 "created. An open file description continues to exist until all file "
761 "descriptors referring to it have been closed. A file descriptor is removed "
762 "from an B<epoll> set only after all the file descriptors referring to the "
763 "underlying open file description have been closed (or before if the "
764 "descriptor is explicitly removed using B<epoll_ctl>(2) B<EPOLL_CTL_DEL>). "
765 "This means that even after a file descriptor that is part of an B<epoll> set "
766 "has been closed, events may be reported for that file descriptor if other "
767 "file descriptors referring to the same underlying file description remain "
770 "削除されるが、以下の点に注意が必要である。 ファイルディスクリプタはオープン"
771 "ファイル記述 (B<open>(2) 参照) への参照である。 ディスクリプタの複製を "
772 "B<dup>(2), B<dup2>(2), B<fcntl>(2) の B<F_DUPFD> や B<fork>(2) 経由で行う度"
773 "に、同じオープンファイル記述を参照する新規のファイル ディスクリプタが生成され"
774 "る。 オープンファイル記述自体は、自身を参照する全てのファイルディスクリプタ "
775 "がクローズされるまで存在し続ける。 ファイルディスクリプタが B<epoll> 集合から"
776 "削除されるのは、対応するオープンファイル記述を参照している 全てのファイルディ"
777 "スクリプタがクローズされた後である (B<epoll_ctl>(2) B<EPOLL_CTL_DEL> を使っ"
778 "てそのディスクリプタを明示的に削除した場合にも削除される)。 このことは、 "
779 "B<epoll> 集合に属しているあるファイルディスクリプタをクローズした後であって"
780 "も、 同じファイル記述を参照する他のファイルディスクリプタがオープンされている"
781 "間は、 クローズしたファイルディスクリプタ宛にイベントが報告される可能性がある"
785 #: build/C/man7/epoll.7:429
791 #: build/C/man7/epoll.7:434
793 "If more than one event occurs between B<epoll_wait>(2) calls, are they "
794 "combined or reported separately?"
796 "2 つ以上のイベントが B<epoll_wait>(2) コールの間に発生した場合、それらはまと"
797 "めて報告されるか、 それとも別々に報告されるか?"
800 #: build/C/man7/epoll.7:434
806 #: build/C/man7/epoll.7:437
807 msgid "They will be combined."
808 msgstr "まとめて報告されるだろう。"
811 #: build/C/man7/epoll.7:437
817 #: build/C/man7/epoll.7:441
819 "Does an operation on a file descriptor affect the already collected but not "
820 "yet reported events?"
822 "ファイルディスクリプタに対する操作は、 既に集められているがまだ報告されていな"
826 #: build/C/man7/epoll.7:441
832 #: build/C/man7/epoll.7:447
834 "You can do two operations on an existing file descriptor. Remove would be "
835 "meaningless for this case. Modify will reread available I/O."
837 "既存のファイルディスクリプタに対して 2 つの操作を行うことができる。 この場"
838 "合、削除には意味がない。 変更すると、使用可能な I/O が再び読み込まれる。"
841 #: build/C/man7/epoll.7:447
847 #: build/C/man7/epoll.7:455
849 "Do I need to continuously read/write a file descriptor until B<EAGAIN> when "
850 "using the B<EPOLLET> flag (edge-triggered behavior) ?"
852 "B<EPOLLET> フラグ (エッジトリガ動作) を使っている場合、 B<EAGAIN> を受け取る"
853 "まで、 継続してファイルディスクリプタを読み書きする必要があるか?"
856 #: build/C/man7/epoll.7:455
862 #: build/C/man7/epoll.7:465
864 "Receiving an event from B<epoll_wait>(2) should suggest to you that such "
865 "file descriptor is ready for the requested I/O operation. You must consider "
866 "it ready until the next (nonblocking) read/write yields B<EAGAIN>. When "
867 "and how you will use the file descriptor is entirely up to you."
869 "B<epoll_wait>(2) からイベントを受け取ることは、 そのファイルディスクリプタが"
870 "要求された I/O 操作に対して準備済みである、 ということをユーザに示すものであ"
871 "る。 次の (ブロックしない) read/write で B<EAGAIN> を受け取るまではファイル"
872 "ディスクリプタは準備済みであると 考えなければならない。 そのファイルディスク"
873 "リプタをいつどのように使うかは、 全くユーザに任されてる。"
876 #: build/C/man7/epoll.7:471
878 "For packet/token-oriented files (e.g., datagram socket, terminal in "
879 "canonical mode), the only way to detect the end of the read/write I/O space "
880 "is to continue to read/write until B<EAGAIN>."
882 "パケット指向やトークン指向のファイル (例えば、データグラムソケット、 "
883 "canonical モードの端末) では、 読み込み用 / 書き込み用の I/O 空間の末尾を検知"
884 "する唯一の方法は B<EAGAIN> になるまで read/write を行うことである。"
887 #: build/C/man7/epoll.7:487
889 "For stream-oriented files (e.g., pipe, FIFO, stream socket), the condition "
890 "that the read/write I/O space is exhausted can also be detected by checking "
891 "the amount of data read from / written to the target file descriptor. For "
892 "example, if you call B<read>(2) by asking to read a certain amount of data "
893 "and B<read>(2) returns a lower number of bytes, you can be sure of having "
894 "exhausted the read I/O space for the file descriptor. The same is true when "
895 "writing using B<write>(2). (Avoid this latter technique if you cannot "
896 "guarantee that the monitored file descriptor always refers to a stream-"
899 "ストリーム指向のファイル (例えば、パイプ、FIFO、ストリームソケット) では、 読"
900 "み込み用 / 書き込み用の I/O 空間が使い尽くされた状態は、 対象となるファイル"
901 "ディスクリプタから読み込んだデータ量または 書き込んだデータ量をチェックするこ"
902 "とでも検知できる。 例えば、ある特定の量のデータを読み込むために B<read>(2) "
903 "を呼んだときに、 B<read>(2) が返したバイト数がそれより少なかった場合、 その"
904 "ファイルディスクリプタの読み込み用 I/O 空間が 使い尽くされたことが分かる。 "
905 "B<write>(2) を使って書き込みをするときも、同じことが言える (監視しているファ"
906 "イルディスクリプタが常にストリーム指向のファイルを 参照していることを保証でき"
907 "ない場合には、後者の手法の使用を避けること)。"
910 #: build/C/man7/epoll.7:487
912 msgid "Possible Pitfalls and Ways to Avoid Them"
913 msgstr "ありがちな落とし穴と回避方法"
916 #: build/C/man7/epoll.7:488
918 msgid "B<o Starvation (edge-triggered)>"
919 msgstr "B<o 飢餓 (starvation) (エッジトリガ)>"
922 #: build/C/man7/epoll.7:496
924 "If there is a large amount of I/O space, it is possible that by trying to "
925 "drain it the other files will not get processed causing starvation. (This "
926 "problem is not specific to B<epoll>.)"
928 "大きな I/O 空間がある場合、 その I/O 空間のデータを全て処理 (drain) しようと"
929 "すると、 他のファイルが処理されず、飢餓を発生させることがある (この問題は "
930 "B<epoll> に固有のものではない)。"
933 #: build/C/man7/epoll.7:504
935 "The solution is to maintain a ready list and mark the file descriptor as "
936 "ready in its associated data structure, thereby allowing the application to "
937 "remember which files need to be processed but still round robin amongst all "
938 "the ready files. This also supports ignoring subsequent events you receive "
939 "for file descriptors that are already ready."
941 "この問題の解決法は、準備済み状態のリストを管理して、 関連する data 構造体の中"
942 "でファイルディスクリプタが 利用可能であるとマークすることである。 それによっ"
943 "て、利用可能なすべてのファイルの中で どのファイルを処理する必要があるかを憶え"
944 "ることができ、 しかも順番に処理 (round robin) することができる。 既に利用可能"
945 "であるファイルディスクリプタに対して それ以後に受け取るイベントを無視すること"
949 #: build/C/man7/epoll.7:504
951 msgid "B<o If using an event cache...>"
952 msgstr "B<o イベントキャッシュを使っている場合>"
955 #: build/C/man7/epoll.7:520
957 "If you use an event cache or store all the file descriptors returned from "
958 "B<epoll_wait>(2), then make sure to provide a way to mark its closure "
959 "dynamically (i.e., caused by a previous event's processing). Suppose you "
960 "receive 100 events from B<epoll_wait>(2), and in event #47 a condition "
961 "causes event #13 to be closed. If you remove the structure and B<close>(2) "
962 "the file descriptor for event #13, then your event cache might still say "
963 "there are events waiting for that file descriptor causing confusion."
965 "イベントキャッシュを使っている場合、 または B<epoll_wait>(2) から返された全"
966 "てのファイルディスクリプタを格納している場合、 クローズされたことを動的にマー"
967 "クする (つまり前のイベントの処理によってマークされる) 方法を提供すべきであ"
968 "る。 B<epoll_wait>(2) から 100 個のイベントを受け取り、 イベント #47 ではあ"
969 "る条件でイベント #13 が閉じられると仮定する。 イベント #13 の構造体を削除し"
970 "ファイルディスクリプタを B<close>(2) すると、イベントキャッシュはそのファイ"
971 "ルディスクリプタを待つイベントが 存在するといって、混乱が起きる。"
974 #: build/C/man7/epoll.7:531
976 "One solution for this is to call, during the processing of event 47, "
977 "B<epoll_ctl>(B<EPOLL_CTL_DEL>) to delete file descriptor 13 and B<close>"
978 "(2), then mark its associated data structure as removed and link it to a "
979 "cleanup list. If you find another event for file descriptor 13 in your "
980 "batch processing, you will discover the file descriptor had been previously "
981 "removed and there will be no confusion."
983 "この問題を解決する 1 つの方法は、イベント 47 の処理をしている間に、 ファイル"
984 "ディスクリプタ 13 を削除して B<close>(2) するために B<epoll_ctl>"
985 "(B<EPOLL_CTL_DEL>) を呼び出し、関連付けられた data 構造体を削除済みとマーク"
986 "して、 クリーンアップリストにリンクすることである。 バッチ処理の中でファイル"
987 "ディスクリプタ 13 についての 他のイベントを見つけた場合、 そのファイルディス"
988 "クリプタが以前に削除されたものであると分かるので、 混乱は起きない。"
991 #: build/C/man7/epoll.7:531 build/C/man2/epoll_create.2:110
992 #: build/C/man2/epoll_ctl.2:226 build/C/man2/epoll_wait.2:173
993 #: build/C/man2/poll.2:304
998 #. Its interface should be finalized in Linux kernel 2.5.66.
1000 #: build/C/man7/epoll.7:537
1002 "The B<epoll> API was introduced in Linux kernel 2.5.44. Support was added "
1003 "to glibc in version 2.3.2."
1005 "B<epoll> API は Linux カーネル 2.5.44 に導入された。 glibc でのサポートはバー"
1009 #: build/C/man7/epoll.7:537 build/C/man2/epoll_create.2:120
1010 #: build/C/man2/epoll_ctl.2:231 build/C/man2/epoll_wait.2:183
1011 #: build/C/man2/poll.2:324
1013 msgid "CONFORMING TO"
1017 #: build/C/man7/epoll.7:546
1019 "The B<epoll> API is Linux-specific. Some other systems provide similar "
1020 "mechanisms, for example, FreeBSD has I<kqueue>, and Solaris has I</dev/poll>."
1022 "B<epoll> API は Linux 固有である。 他のシステムでも同様の機構が提供されている"
1023 "場合がある。 例えば、FreeBSD の I<kqueue> や Solaris の I</dev/poll> などであ"
1027 #: build/C/man7/epoll.7:546 build/C/man2/epoll_create.2:146
1028 #: build/C/man2/epoll_ctl.2:254 build/C/man2/epoll_wait.2:196
1029 #: build/C/man2/poll.2:356
1035 #: build/C/man7/epoll.7:551
1037 "B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2)"
1039 "B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2)"
1042 #: build/C/man7/epoll.7:551 build/C/man2/epoll_create.2:151
1043 #: build/C/man2/epoll_ctl.2:259 build/C/man2/epoll_wait.2:200
1044 #: build/C/man2/poll.2:360
1050 #: build/C/man7/epoll.7:558 build/C/man2/epoll_create.2:158
1051 #: build/C/man2/epoll_ctl.2:266 build/C/man2/epoll_wait.2:207
1052 #: build/C/man2/poll.2:367
1054 "This page is part of release 3.40 of the Linux I<man-pages> project. A "
1055 "description of the project, and information about reporting bugs, can be "
1056 "found at http://www.kernel.org/doc/man-pages/."
1058 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.40 の一部\n"
1059 "である。プロジェクトの説明とバグ報告に関する情報は\n"
1060 "http://www.kernel.org/doc/man-pages/ に書かれている。"
1063 #: build/C/man2/epoll_create.2:25
1065 msgid "EPOLL_CREATE"
1066 msgstr "EPOLL_CREATE"
1069 #: build/C/man2/epoll_create.2:25 build/C/man2/epoll_ctl.2:21
1070 #: build/C/man2/poll.2:31
1076 #: build/C/man2/epoll_create.2:28
1077 msgid "epoll_create, epoll_create1 - open an epoll file descriptor"
1079 "epoll_create, epoll_create1 - epoll ファイルディスクリプタをオープンする"
1082 #: build/C/man2/epoll_create.2:31 build/C/man2/epoll_wait.2:29
1084 msgid "B<#include E<lt>sys/epoll.hE<gt>>\n"
1085 msgstr "B<#include E<lt>sys/epoll.hE<gt>>\n"
1088 #: build/C/man2/epoll_create.2:34
1091 "B<int epoll_create(int >I<size>B<);>\n"
1092 "B<int epoll_create1(int >I<flags>B<);>\n"
1094 "B<int epoll_create(int >I<size>B<);>\n"
1095 "B<int epoll_create1(int >I<flags>B<);>\n"
1098 #: build/C/man2/epoll_create.2:43
1100 "B<epoll_create>() creates an B<epoll>(7) instance. Since Linux 2.6.8, the "
1101 "I<size> argument is ignored, but must be greater than zero; see NOTES below."
1103 "B<epoll_create>()は B<epoll>(7) インスタンスを作成する。\n"
1104 "Linux 2.6.8 以降では、I<size> 引き数は無視されるが、 0 より大きな値で\n"
1105 "なければならない。下記の「注意」を参照。"
1108 #: build/C/man2/epoll_create.2:56
1110 "B<epoll_create>() returns a file descriptor referring to the new epoll "
1111 "instance. This file descriptor is used for all the subsequent calls to the "
1112 "B<epoll> interface. When no longer required, the file descriptor returned "
1113 "by B<epoll_create>() should be closed by using B<close>(2). When all file "
1114 "descriptors referring to an epoll instance have been closed, the kernel "
1115 "destroys the instance and releases the associated resources for reuse."
1117 "B<epoll_create>() は、新しい epoll インスタンスを参照するファイルディスクリ"
1118 "プタを返す。 このファイルディスクリプタは、その後の B<epoll> インタフェースの"
1119 "呼び出しに使われる。 もう必要でなくなった場合は、 B<epoll_create>() で返され"
1120 "たファイルディスクリプタは B<close>(2) を使ってクローズされるべきである。 あ"
1121 "る epoll インスタンスを参照する全てのファイルディスクリプタがクローズされる"
1122 "と、 カーネルはそのインスタンスを破壊して、対応するリソースを解放し、 再使用"
1126 #: build/C/man2/epoll_create.2:57
1128 msgid "epoll_create1()"
1129 msgstr "epoll_create1()"
1132 #: build/C/man2/epoll_create.2:69
1134 "If I<flags> is 0, then, other than the fact that the obsolete I<size> "
1135 "argument is dropped, B<epoll_create1>() is the same as B<epoll_create>(). "
1136 "The following value can be included in I<flags> to obtain different behavior:"
1138 "B<epoll_create1>() は、 I<flags> が 0 の場合、現在では使われていない "
1139 "I<size> 引き数がなくなっている点を除けば B<epoll_create>() と同じである。 "
1140 "I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさ"
1144 #: build/C/man2/epoll_create.2:69
1146 msgid "B<EPOLL_CLOEXEC>"
1147 msgstr "B<EPOLL_CLOEXEC>"
1150 #: build/C/man2/epoll_create.2:79
1152 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
1153 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
1156 "新しいファイルディスクリプタに対して close-on-exec (B<FD_CLOEXEC>) フラグを"
1157 "セットする。 このフラグが役に立つ理由については、 B<open>(2) の "
1158 "B<O_CLOEXEC> フラグの説明を参照のこと。"
1161 #: build/C/man2/epoll_create.2:79 build/C/man2/epoll_ctl.2:158
1162 #: build/C/man2/epoll_wait.2:136 build/C/man2/poll.2:275
1164 msgid "RETURN VALUE"
1168 #: build/C/man2/epoll_create.2:86
1170 "On success, these system calls return a nonnegative file descriptor. On "
1171 "error, -1 is returned, and I<errno> is set to indicate the error."
1173 "成功すると、これらのシステムコールは 非負のファイルディスクリプタを返す。 エ"
1174 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
1177 #: build/C/man2/epoll_create.2:86 build/C/man2/epoll_ctl.2:167
1178 #: build/C/man2/epoll_wait.2:148 build/C/man2/poll.2:285
1184 #: build/C/man2/epoll_create.2:87 build/C/man2/epoll_create.2:91
1185 #: build/C/man2/epoll_ctl.2:182 build/C/man2/epoll_wait.2:165
1186 #: build/C/man2/poll.2:294
1192 #: build/C/man2/epoll_create.2:91
1193 msgid "I<size> is not positive."
1194 msgstr "I<size> が正でない。"
1197 #: build/C/man2/epoll_create.2:96
1198 msgid "(B<epoll_create1>()) Invalid value specified in I<flags>."
1199 msgstr "(B<epoll_create1>()) I<flags> に無効な値が指定された。"
1202 #: build/C/man2/epoll_create.2:96
1208 #: build/C/man2/epoll_create.2:104
1210 "The per-user limit on the number of epoll instances imposed by I</proc/sys/"
1211 "fs/epoll/max_user_instances> was encountered. See B<epoll>(7) for further "
1214 "I</proc/sys/fs/epoll/max_user_instances> によって指定されている、epoll インス"
1215 "タンスのユーザー単位の制限に達した。 更なる詳細については B<epoll>(7) を参照"
1219 #: build/C/man2/epoll_create.2:104
1225 #: build/C/man2/epoll_create.2:107
1226 msgid "The system limit on the total number of open files has been reached."
1227 msgstr "オープンされたファイルの総数がシステム制限に達した。"
1230 #: build/C/man2/epoll_create.2:107 build/C/man2/epoll_ctl.2:205
1231 #: build/C/man2/poll.2:301
1237 #: build/C/man2/epoll_create.2:110
1238 msgid "There was insufficient memory to create the kernel object."
1239 msgstr "カーネルオブジェクトを作成するのに十分なメモリがなかった。"
1242 #: build/C/man2/epoll_create.2:114
1244 "B<epoll_create>() was added to the kernel in version 2.6. Library support "
1245 "is provided in glibc starting with version 2.3.2."
1247 "B<epoll_create>() はカーネル 2.6 で追加された。\n"
1248 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1250 #. To be precise: kernel 2.5.44.
1251 #. The interface should be finalized by Linux kernel 2.5.66.
1253 #: build/C/man2/epoll_create.2:120
1255 "B<epoll_create1>() was added to the kernel in version 2.6.27. Library "
1256 "support is provided in glibc starting with version 2.9."
1258 "B<epoll_create1>() はカーネル 2.6.27 で追加された。\n"
1259 "ライブラリによるサポートは glibc バージョン 2.9 以降で提供されている。"
1262 #: build/C/man2/epoll_create.2:123
1263 msgid "B<epoll_create>() is Linux-specific."
1264 msgstr "B<epoll_create>() は Linux 独自である。"
1267 #: build/C/man2/epoll_create.2:123 build/C/man2/epoll_ctl.2:235
1268 #: build/C/man2/epoll_wait.2:186 build/C/man2/poll.2:330
1274 #: build/C/man2/epoll_create.2:146
1276 "In the initial B<epoll_create>() implementation, the I<size> argument "
1277 "informed the kernel of the number of file descriptors that the caller "
1278 "expected to add to the B<epoll> instance. The kernel used this information "
1279 "as a hint for the amount of space to initially allocate in internal data "
1280 "structures describing events. (If necessary, the kernel would allocate more "
1281 "space if the caller's usage exceeded the hint given in I<size>.) Nowadays, "
1282 "this hint is no longer required (the kernel dynamically sizes the required "
1283 "data structures without needing the hint), but I<size> must still be greater "
1284 "than zero, in order to ensure backward compatibility when new B<epoll> "
1285 "applications are run on older kernels."
1287 "初期の B<epoll_create>() の実装では、I<size> 引き数は、呼び出し元が "
1289 "インスタンスに追加しようとするファイルディスクリプタ数をカーネルに教えるの"
1291 "使われていた。カーネルはこの情報をイベントの情報を格納する内部データ構造に"
1293 "初に割り当てる大きさを決める際のヒントとして使用していた (I<size> で渡され"
1295 "ヒントよりも使用量が大きくなった場合には、必要に応じてカーネルは追加で領域"
1299 "現在では、このヒントはもはや必要なくなっている (カーネルはヒントなしで必要"
1301 "データ構造のサイズを動的に変更する) が、今も I<size> には 0 より大きい値を\n"
1302 "指定しなければならない。これは、B<epoll> を使うアプリケーションが古いカーネ"
1304 "で実行される際の後方互換性を保証するためである。"
1307 #: build/C/man2/epoll_create.2:151
1308 msgid "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1309 msgstr "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1312 #: build/C/man2/epoll_ctl.2:21
1318 #: build/C/man2/epoll_ctl.2:24
1319 msgid "epoll_ctl - control interface for an epoll descriptor"
1320 msgstr "epoll_ctl - epoll ディスクリプタのインタフェースを操作する"
1323 #: build/C/man2/epoll_ctl.2:29
1325 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1326 "epoll_event *>I<event>B<);>"
1328 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1329 "epoll_event *>I<event>B<);>"
1332 #: build/C/man2/epoll_ctl.2:39
1334 "This system call performs control operations on the B<epoll>(7) instance "
1335 "referred to by the file descriptor I<epfd>. It requests that the operation "
1336 "I<op> be performed for the target file descriptor, I<fd>."
1338 "このシステムコールは、ファイルディスクリプタ I<epfd> が参照する B<epoll>(7)\n"
1339 "インスタンスに対する操作を行う。 対象のファイルディスクリプタ I<fd> に対し"
1341 "操作 I<op> の実行が要求される。"
1344 #: build/C/man2/epoll_ctl.2:43
1345 msgid "Valid values for the I<op> argument are :"
1346 msgstr "I<op> 引き数に指定できる有効な値は以下の通りである。"
1349 #: build/C/man2/epoll_ctl.2:43
1351 msgid "B<EPOLL_CTL_ADD>"
1352 msgstr "B<EPOLL_CTL_ADD>"
1355 #: build/C/man2/epoll_ctl.2:55
1357 "Register the target file descriptor I<fd> on the B<epoll> instance referred "
1358 "to by the file descriptor I<epfd> and associate the event I<event> with the "
1359 "internal file linked to I<fd>."
1361 "対象のファイルディスクリプタ I<fd> をファイルディスクリプタ I<epfd> が参照す"
1362 "る B<epoll> インスタンスに登録し、イベント I<event> を I<fd> に結び付けられた"
1366 #: build/C/man2/epoll_ctl.2:55
1368 msgid "B<EPOLL_CTL_MOD>"
1369 msgstr "B<EPOLL_CTL_MOD>"
1372 #: build/C/man2/epoll_ctl.2:61
1374 "Change the event I<event> associated with the target file descriptor I<fd>."
1376 "イベント I<event> を対象のファイルディスクリプタ I<fd> に関連付けるように変更"
1380 #: build/C/man2/epoll_ctl.2:61
1382 msgid "B<EPOLL_CTL_DEL>"
1383 msgstr "B<EPOLL_CTL_DEL>"
1386 #: build/C/man2/epoll_ctl.2:72
1388 "Remove (deregister) the target file descriptor I<fd> from the B<epoll> "
1389 "instance referred to by I<epfd>. The I<event> is ignored and can be NULL "
1390 "(but see BUGS below)."
1392 "対象のファイルディスクリプタ I<fd> を I<epfd> が参照する B<epoll> インスタン"
1393 "スから削除する。 I<event> 引き数は無視されるので、NULL にすることもできる (但"
1397 #: build/C/man2/epoll_ctl.2:80
1399 "The I<event> argument describes the object linked to the file descriptor "
1400 "I<fd>. The I<struct epoll_event> is defined as :"
1402 "I<event> 引き数は、ファイルディスクリプタ I<fd> にリンクされたオブジェクトを"
1403 "表す。 I<struct epoll_event> は以下のように定義される:"
1406 #: build/C/man2/epoll_ctl.2:89
1409 "typedef union epoll_data {\n"
1416 "typedef union epoll_data {\n"
1424 #: build/C/man2/epoll_ctl.2:94
1427 "struct epoll_event {\n"
1428 " uint32_t events; /* Epoll events */\n"
1429 " epoll_data_t data; /* User data variable */\n"
1432 "struct epoll_event {\n"
1433 " uint32_t events; /* epoll イベント */\n"
1434 " epoll_data_t data; /* ユーザデータ変数 */\n"
1438 #: build/C/man2/epoll_ctl.2:101
1440 "The I<events> member is a bit set composed using the following available "
1443 "I<events> メンバは、以下のような使用可能なイベントタイプを使って構成された "
1447 #: build/C/man2/epoll_ctl.2:101
1453 #: build/C/man2/epoll_ctl.2:106
1454 msgid "The associated file is available for B<read>(2) operations."
1455 msgstr "関連付けられたファイルに対して、 B<read>(2) 操作が可能である。"
1458 #: build/C/man2/epoll_ctl.2:106
1461 msgstr "B<EPOLLOUT>"
1464 #: build/C/man2/epoll_ctl.2:111
1465 msgid "The associated file is available for B<write>(2) operations."
1466 msgstr "関連付けられたファイルに対して、 B<write>(2) 操作が可能である。"
1469 #: build/C/man2/epoll_ctl.2:111
1471 msgid "B<EPOLLRDHUP> (since Linux 2.6.17)"
1472 msgstr "B<EPOLLRDHUP\">(LinuxB<2.6.17>以降)\""
1475 #: build/C/man2/epoll_ctl.2:117
1477 "Stream socket peer closed connection, or shut down writing half of "
1478 "connection. (This flag is especially useful for writing simple code to "
1479 "detect peer shutdown when using Edge Triggered monitoring.)"
1481 "ストリームソケットの他端が、コネクションの close 、 またはコネクションの書き"
1482 "込み側の shutdown を行った。 (このフラグを使うと、エッジトリガの監視を行う場"
1483 "合に、 通信のもう一端が閉じられたことを検知するコードを 非常に簡潔に書くこと"
1487 #: build/C/man2/epoll_ctl.2:117
1490 msgstr "B<EPOLLPRI>"
1493 #: build/C/man2/epoll_ctl.2:122
1494 msgid "There is urgent data available for B<read>(2) operations."
1495 msgstr "B<read>(2) 操作が可能な緊急 (urgent) データがある。"
1498 #: build/C/man2/epoll_ctl.2:122
1501 msgstr "B<EPOLLERR>"
1504 #: build/C/man2/epoll_ctl.2:128
1506 "Error condition happened on the associated file descriptor. B<epoll_wait>"
1507 "(2) will always wait for this event; it is not necessary to set it in "
1510 "関連付けられたファイルディスクリプタにエラー条件が起こった。 B<epoll_wait>"
1511 "(2) は常にこのイベントを待つので、 I<events> に設定する必要はない。"
1514 #: build/C/man2/epoll_ctl.2:128
1517 msgstr "B<EPOLLHUP>"
1520 #: build/C/man2/epoll_ctl.2:134
1522 "Hang up happened on the associated file descriptor. B<epoll_wait>(2) will "
1523 "always wait for this event; it is not necessary to set it in I<events>."
1525 "関連付けられたファイルディスクリプタにハングアップが起こった。 B<epoll_wait>"
1526 "(2) は常にこのイベントを待つので、 I<events> に設定する必要はない。"
1529 #: build/C/man2/epoll_ctl.2:134
1535 #: build/C/man2/epoll_ctl.2:144
1537 "Sets the Edge Triggered behavior for the associated file descriptor. The "
1538 "default behavior for B<epoll> is Level Triggered. See B<epoll>(7) for more "
1539 "detailed information about Edge and Level Triggered event distribution "
1542 "関連付けられたファイルディスクリプタに エッジトリガ動作 (Edge Triggered "
1543 "behavior) を設定する。 B<epoll> のデフォルトの動作は、レベルトリガ (Level "
1544 "Triggered) である。 エッジトリガとレベルトリガによるイベント分配機構 (event "
1545 "distribution architectures) についての詳細な情報は、 B<epoll>(7) を参照する"
1549 #: build/C/man2/epoll_ctl.2:144
1551 msgid "B<EPOLLONESHOT> (since Linux 2.6.2)"
1552 msgstr "B<EPOLLONESHOT> (Linux 2.6.2 以降)"
1555 #: build/C/man2/epoll_ctl.2:158
1557 "Sets the one-shot behavior for the associated file descriptor. This means "
1558 "that after an event is pulled out with B<epoll_wait>(2) the associated file "
1559 "descriptor is internally disabled and no other events will be reported by "
1560 "the B<epoll> interface. The user must call B<epoll_ctl>() with "
1561 "B<EPOLL_CTL_MOD> to rearm the file descriptor with a new event mask."
1563 "関連付けられたファイルディスクリプタに 一撃動作 (One-Shot behavior) を設定す"
1564 "る。 これはイベントが B<epoll_wait>(2) によって引き出された後、 関連付けられ"
1565 "たファイルディスクリプタが内部的に破棄され、 B<epoll> インタフェースによって"
1566 "イベントが報告されなくなることを意味する。 新しいイベントマスクでファイルディ"
1567 "スクリプタを再度有効にするためには、 B<epoll_ctl>() に B<EPOLL_CTL_MOD> を指"
1568 "定して呼び出さなければならない。 I<op> 引き数に指定できる有効な値は、以下の通"
1572 #: build/C/man2/epoll_ctl.2:167
1574 "When successful, B<epoll_ctl>() returns zero. When an error occurs, "
1575 "B<epoll_ctl>() returns -1 and I<errno> is set appropriately."
1577 "成功した場合、 B<epoll_ctl>() は 0 を返す。 エラーが起こった場合、 "
1578 "B<epoll_ctl>() は -1 を返し、 I<errno> を適切に設定する。"
1581 #: build/C/man2/epoll_ctl.2:168 build/C/man2/epoll_wait.2:149
1587 #: build/C/man2/epoll_ctl.2:174
1588 msgid "I<epfd> or I<fd> is not a valid file descriptor."
1589 msgstr "I<epfd> か I<fd> が有効なファイルディスクリプタでない。"
1592 #: build/C/man2/epoll_ctl.2:174
1598 #: build/C/man2/epoll_ctl.2:182
1600 "I<op> was B<EPOLL_CTL_ADD>, and the supplied file descriptor I<fd> is "
1601 "already registered with this epoll instance."
1603 "I<op> が B<EPOLL_CTL_ADD> であり、かつ与えられたファイルディスクリプタ I<fd> "
1604 "がこの epoll インスタンスに既に登録されている。"
1607 #: build/C/man2/epoll_ctl.2:195
1609 "I<epfd> is not an B<epoll> file descriptor, or I<fd> is the same as I<epfd>, "
1610 "or the requested operation I<op> is not supported by this interface."
1612 "I<epfd> が B<epoll> ファイルディスクリプタでない。 または I<fd> が I<epfd> と"
1613 "同一である。 または要求された操作 I<op> がこのインタフェースでサポートされて"
1617 #: build/C/man2/epoll_ctl.2:195
1623 #: build/C/man2/epoll_ctl.2:205
1625 "I<op> was B<EPOLL_CTL_MOD> or B<EPOLL_CTL_DEL>, and I<fd> is not registered "
1626 "with this epoll instance."
1628 "I<op> が B<EPOLL_CTL_MOD> または B<EPOLL_CTL_DEL> で、かつ I<fd> がこの "
1629 "epoll インスタンスに登録されていない。"
1632 #: build/C/man2/epoll_ctl.2:210
1634 "There was insufficient memory to handle the requested I<op> control "
1636 msgstr "要求された I<op> 制御操作を扱うのに十分なメモリがない。"
1639 #: build/C/man2/epoll_ctl.2:210
1645 #: build/C/man2/epoll_ctl.2:220
1647 "The limit imposed by I</proc/sys/fs/epoll/max_user_watches> was encountered "
1648 "while trying to register (B<EPOLL_CTL_ADD>) a new file descriptor on an "
1649 "epoll instance. See B<epoll>(7) for further details."
1651 "epoll インスタンスに新しいファイルディスクリプタを登録 (B<EPOLL_CTL_ADD>) し"
1652 "ようとした際に、 I</proc/sys/fs/epoll/max_user_watches> で決まる上限に達し"
1653 "た。 詳細は B<epoll>(7) を参照。"
1656 #: build/C/man2/epoll_ctl.2:220
1662 #: build/C/man2/epoll_ctl.2:226
1663 msgid "The target file I<fd> does not support B<epoll>."
1664 msgstr "対象ファイル I<fd> が B<epoll> をサポートしていない。"
1666 #. To be precise: kernel 2.5.44.
1667 #. The interface should be finalized by Linux kernel 2.5.66.
1669 #: build/C/man2/epoll_ctl.2:231
1670 msgid "B<epoll_ctl>() was added to the kernel in version 2.6."
1671 msgstr "B<epoll_ctl>() はカーネル 2.6 で追加された。"
1674 #: build/C/man2/epoll_ctl.2:235
1676 "B<epoll_ctl>() is Linux-specific. Library support is provided in glibc "
1677 "starting with version 2.3.2."
1679 "B<epoll_ctl>() は Linux 独自である。\n"
1680 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1683 #: build/C/man2/epoll_ctl.2:240
1685 "The B<epoll> interface supports all file descriptors that support B<poll>(2)."
1687 "B<epoll> インタフェースは、 B<poll>(2) に対応している全てのファイルディスク"
1691 #: build/C/man2/epoll_ctl.2:240 build/C/man2/poll.2:352
1697 #: build/C/man2/epoll_ctl.2:254
1699 "In kernel versions before 2.6.9, the B<EPOLL_CTL_DEL> operation required a "
1700 "non-NULL pointer in I<event>, even though this argument is ignored. Since "
1701 "Linux 2.6.9, I<event> can be specified as NULL when using B<EPOLL_CTL_DEL>. "
1702 "Applications that need to be portable to kernels before 2.6.9 should specify "
1703 "a non-NULL pointer in I<event>."
1705 "Linux 2.6.9 より前では、 B<EPOLL_CTL_DEL> 操作の際、引き数 I<event> に (たと"
1706 "え無視される場合であっても) NULL でないポインタを渡す必要があった。 カーネル "
1707 "2.6.9 以降では、 B<EPOLL_CTL_DEL> を使う際に I<event> に NULL を指定できるよ"
1708 "うになっている。 2.6.9 より前のカーネルへの移植性が必要なアプリケーションで"
1709 "は、 I<event> に NULL でないポインタを指定すべきである。"
1712 #: build/C/man2/epoll_ctl.2:259
1713 msgid "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1714 msgstr "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1717 #: build/C/man2/epoll_wait.2:23
1723 #: build/C/man2/epoll_wait.2:26
1725 "epoll_wait, epoll_pwait - wait for an I/O event on an epoll file descriptor"
1727 "epoll_wait, epoll_pwait - epoll ファイルディスクリプタの I/O イベントを待つ"
1730 #: build/C/man2/epoll_wait.2:35
1733 "B<int epoll_wait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1734 "B< int >I<maxevents>B<, int >I<timeout>B<);>\n"
1735 "B<int epoll_pwait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1736 "B< int >I<maxevents>B<, int >I<timeout>B<,>\n"
1737 "B< const sigset_t *>I<sigmask>B<);>\n"
1739 "B<int epoll_wait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1740 "B< int >I<maxevents>B<, int >I<timeout>B<);>\n"
1741 "B<int epoll_pwait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1742 "B< int >I<maxevents>B<, int >I<timeout>B<,>\n"
1743 "B< const sigset_t *>I<sigmask>B<);>\n"
1746 #: build/C/man2/epoll_wait.2:53
1748 "The B<epoll_wait>() system call waits for events on the B<epoll>(7) "
1749 "instance referred to by the file descriptor I<epfd>. The memory area "
1750 "pointed to by I<events> will contain the events that will be available for "
1751 "the caller. Up to I<maxevents> are returned by B<epoll_wait>(). The "
1752 "I<maxevents> argument must be greater than zero."
1754 "B<epoll_wait>() システムコールは、ファイルディスクリプタ I<epfd> で参照され"
1756 "B<epoll>(7) インスタンスに対するイベントを待つ。 I<events> が指すメモリ領域に"
1758 "呼び出し側が利用可能なイベントが格納される。最大 I<maxevents> 個のイベント"
1760 "B<epoll_wait>() によって返される。\n"
1761 "I<maxevents> 引き数は 0 より大きくなければならない。"
1764 #: build/C/man2/epoll_wait.2:66
1766 "The call blocks the calling thread for a maximum time of I<timeout> "
1767 "milliseconds. Specifying a I<timeout> of -1 causes B<epoll_wait>() to "
1768 "block indefinitely, while specifying a I<timeout> equal to zero cause "
1769 "B<epoll_wait>() to return immediately, even if no events are available."
1771 "最大で I<timeout> ミリ秒間、呼び出したスレッドを停止させる。\n"
1772 "I<timeout> を -1 に指定すると、 B<epoll_wait>() は無限に停止する。\n"
1773 "I<timeout> を 0 に指定すると、 B<epoll_wait>() は利用可能なイベントが\n"
1777 #: build/C/man2/epoll_wait.2:70
1778 msgid "The I<struct epoll_event> is defined as :"
1779 msgstr "I<struct epoll_event> は以下のように定義される:"
1782 #: build/C/man2/epoll_wait.2:79
1785 "typedef union epoll_data {\n"
1792 "typedef union epoll_data {\n"
1800 #: build/C/man2/epoll_wait.2:84
1803 "struct epoll_event {\n"
1804 " uint32_t events; /* Epoll events */\n"
1805 " epoll_data_t data; /* User data variable */\n"
1808 "struct epoll_event {\n"
1809 " uint32_t events; /* epoll イベント */\n"
1810 " epoll_data_t data; /* ユーザデータ変数 */\n"
1814 #: build/C/man2/epoll_wait.2:95
1816 "The I<data> of each returned structure will contain the same data the user "
1817 "set with an B<epoll_ctl>(2) (B<EPOLL_CTL_ADD>,B<EPOLL_CTL_MOD>) while the "
1818 "I<events> member will contain the returned event bit field."
1820 "返される構造体の I<data> メンバには、ユーザが B<epoll_ctl>(2) "
1821 "(B<EPOLL_CTL_ADD>, B<EPOLL_CTL_MOD>) で指定したデータが格納される。 一方、 "
1822 "I<events> メンバには返された利用可能なイベントのビットフィールドが格納され"
1826 #: build/C/man2/epoll_wait.2:95
1828 msgid "epoll_pwait()"
1829 msgstr "epoll_pwait()"
1832 #: build/C/man2/epoll_wait.2:109
1834 "The relationship between B<epoll_wait>() and B<epoll_pwait>() is analogous "
1835 "to the relationship between B<select>(2) and B<pselect>(2): like B<pselect>"
1836 "(2), B<epoll_pwait>() allows an application to safely wait until either a "
1837 "file descriptor becomes ready or until a signal is caught."
1839 "B<epoll_wait>() と B<epoll_pwait>() の関係は、 B<select>(2) と B<pselect>"
1840 "(2) の関係と同様である。 B<pselect>(2) 同様、 B<epoll_pwait>() を使うと、"
1841 "アプリケーションは、ファイルディスクリプタが準備できた状態になるか、 シグナル"
1842 "が捕捉されるまで、安全に待つことができる。"
1845 #: build/C/man2/epoll_wait.2:113
1846 msgid "The following B<epoll_pwait>() call:"
1847 msgstr "以下の B<epoll_pwait>() の呼び出しは、"
1850 #: build/C/man2/epoll_wait.2:116
1852 msgid " ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
1853 msgstr " ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
1856 #: build/C/man2/epoll_wait.2:121 build/C/man2/poll.2:224
1857 msgid "is equivalent to I<atomically> executing the following calls:"
1858 msgstr "次の呼び出しを I<atomic> に実行するのと等価である。"
1861 #: build/C/man2/epoll_wait.2:124
1863 msgid " sigset_t origmask;\n"
1864 msgstr " sigset_t origmask;\n"
1867 #: build/C/man2/epoll_wait.2:128
1870 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
1871 " ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
1872 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
1874 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
1875 " ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
1876 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
1879 #: build/C/man2/epoll_wait.2:136
1881 "The I<sigmask> argument may be specified as NULL, in which case "
1882 "B<epoll_pwait>() is equivalent to B<epoll_wait>()."
1884 "I<sigmask> 引き数には NULL を指定してもよい。 その場合には、 B<epoll_pwait>"
1885 "() は B<epoll_wait>() と等価となる。"
1888 #: build/C/man2/epoll_wait.2:148
1890 "When successful, B<epoll_wait>() returns the number of file descriptors "
1891 "ready for the requested I/O, or zero if no file descriptor became ready "
1892 "during the requested I<timeout> milliseconds. When an error occurs, "
1893 "B<epoll_wait>() returns -1 and I<errno> is set appropriately."
1895 "成功した場合、 B<epoll_wait>() は要求された I/O に対して準備ができているファ"
1896 "イルディスクリプタの数を返す。 また要求された I<timeout> ミリ秒の間にファイル"
1897 "ディスクリプタが準備できない場合は、0 を返す。 エラーが起こった場合、 "
1898 "B<epoll_wait>() は -1 を返し、 I<errno> を適切に設定する。"
1901 #: build/C/man2/epoll_wait.2:153
1902 msgid "I<epfd> is not a valid file descriptor."
1903 msgstr "I<epfd> が有効なファイルディスクリプタでない。"
1906 #: build/C/man2/epoll_wait.2:153 build/C/man2/poll.2:286
1912 #: build/C/man2/epoll_wait.2:158
1914 "The memory area pointed to by I<events> is not accessible with write "
1916 msgstr "I<events> で指されるメモリ領域に書き込み権限でアクセスできない。"
1919 #: build/C/man2/epoll_wait.2:158 build/C/man2/poll.2:290
1925 #: build/C/man2/epoll_wait.2:165
1927 "The call was interrupted by a signal handler before any of the requested "
1928 "events occurred or the I<timeout> expired; see B<signal>(7)."
1930 "要求されたどのイベントも発生せず、かつ I<timeout> の期限が切れる前に、システ"
1931 "ムコールがシグナルハンドラによって割り込まれた。 B<signal>(7) 参照。"
1934 #: build/C/man2/epoll_wait.2:173
1936 "I<epfd> is not an B<epoll> file descriptor, or I<maxevents> is less than or "
1939 "I<epfd> が B<epoll> ファイルディスクリプタでない。 または I<maxevents> が 0 "
1942 #. To be precise: kernel 2.5.44.
1943 #. The interface should be finalized by Linux kernel 2.5.66.
1945 #: build/C/man2/epoll_wait.2:179
1947 "B<epoll_wait>() was added to the kernel in version 2.6. Library support is "
1948 "provided in glibc starting with version 2.3.2."
1950 "B<epoll_wait>() はカーネル 2.6 で追加された。\n"
1951 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1954 #: build/C/man2/epoll_wait.2:183
1956 "B<epoll_pwait>() was added to Linux in kernel 2.6.19. Library support is "
1957 "provided in glibc starting with version 2.6."
1959 "B<epoll_pwait>() はカーネル 2.6.19 で Linux に追加された。\n"
1960 "ライブラリによるサポートは glibc バージョン 2.6 以降で提供されている。"
1963 #: build/C/man2/epoll_wait.2:186
1964 msgid "B<epoll_wait>() is Linux-specific."
1965 msgstr "B<epoll_wait>() は Linux 独自である。"
1968 #: build/C/man2/epoll_wait.2:196
1970 "While one thread is blocked in a call to B<epoll_pwait>(), it is possible "
1971 "for another thread to add a file descriptor to the waited-upon B<epoll> "
1972 "instance. If the new file descriptor becomes ready, it will cause the "
1973 "B<epoll_wait>() call to unblock."
1975 "あるスレッドが B<epoll_pwait>() を呼び出して停止されている間に、\n"
1976 "別のスレッドが wait 中の B<epoll> インストールにファイルディスクリプタを\n"
1977 "追加することがある。新しいファイルディスクリプタでイベントが発生すると、\n"
1978 "B<epoll_wait>() の呼び出しによる停止が解除されることになる。"
1981 #: build/C/man2/epoll_wait.2:200
1982 msgid "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
1983 msgstr "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
1986 #: build/C/man2/poll.2:31
1992 #: build/C/man2/poll.2:34
1993 msgid "poll, ppoll - wait for some event on a file descriptor"
1994 msgstr "poll, ppoll - ファイルディスクリプタにおけるイベントを待つ"
1997 #: build/C/man2/poll.2:37
1999 msgid "B<#include E<lt>poll.hE<gt>>\n"
2000 msgstr "B<#include E<lt>poll.hE<gt>>\n"
2003 #: build/C/man2/poll.2:39
2005 msgid "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
2006 msgstr "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
2009 #: build/C/man2/poll.2:42
2012 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
2013 "B<#include E<lt>poll.hE<gt>>\n"
2015 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
2016 "B<#include E<lt>poll.hE<gt>>\n"
2019 #: build/C/man2/poll.2:45
2022 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, >\n"
2023 "B< const struct timespec *>I<timeout_ts>B<, const sigset_t *>I<sigmask>B<);>\n"
2025 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, >\n"
2026 "B< const struct timespec *>I<timeout_ts>B<, const sigset_t *>I<sigmask>B<);>\n"
2029 #: build/C/man2/poll.2:52
2031 "B<poll>() performs a similar task to B<select>(2): it waits for one of a "
2032 "set of file descriptors to become ready to perform I/O."
2034 "B<poll>() は B<select>(2) と同様の仕事を行う、つまり、ファイルディスクリプ"
2035 "タ集合のいずれか一つが I/O を実行可能な状態になるのを待つ。"
2038 #: build/C/man2/poll.2:56
2040 "The set of file descriptors to be monitored is specified in the I<fds> "
2041 "argument, which is an array of structures of the following form:"
2043 "監視するファイルディスクリプタ集合は、 I<fds> 引き数で指定する。 I<fds> は、"
2047 #: build/C/man2/poll.2:64
2051 " int fd; /* file descriptor */\n"
2052 " short events; /* requested events */\n"
2053 " short revents; /* returned events */\n"
2057 " int fd; /* file descriptor */\n"
2058 " short events; /* requested events */\n"
2059 " short revents; /* returned events */\n"
2063 #: build/C/man2/poll.2:71
2065 "The caller should specify the number of items in the I<fds> array in I<nfds>."
2066 msgstr "I<nfds> には、 I<fds> 配列の要素数を指定する。"
2069 #: build/C/man2/poll.2:86
2071 "The field I<fd> contains a file descriptor for an open file. If this field "
2072 "is negative, then the corresponding I<events> field is ignored and the "
2073 "I<revents> field returns zero. (This provides an easy way of ignoring a "
2074 "file descriptor for a single B<poll>() call: simply negate the I<fd> field.)"
2076 "I<fd> フィールドには、オープンされたファイルのファイルディスクリプタが入"
2078 "このフィールドが負の場合、対応する I<events> フィールドは無視され、\n"
2079 "I<revents> には 0 が返される。(この機能により、一つの B<poll>() の呼び出し"
2081 "簡単にあるファイルディスクリプタを無視することができる。\n"
2082 "単に I<fd> フィールドの符号を反転するだけでよい。)"
2085 #: build/C/man2/poll.2:98
2087 "The field I<events> is an input parameter, a bit mask specifying the events "
2088 "the application is interested in for the file descriptor I<fd>. If this "
2089 "field is specified as zero, then all events are ignored for I<fd> and "
2090 "I<revents> returns zero."
2092 "構造体の I<events> 要素は入力パラメータで、\n"
2093 "ファイルディスクリプタ I<fd> に関して、\n"
2094 "アプリケーションが興味を持っているイベントのビットマスクを指定する。\n"
2095 "このフィールドに 0 が指定された場合は、I<fd> の全てのイベントが無視され、\n"
2096 "I<revents> には 0 が返される。"
2099 #: build/C/man2/poll.2:117
2101 "The field I<revents> is an output parameter, filled by the kernel with the "
2102 "events that actually occurred. The bits returned in I<revents> can include "
2103 "any of those specified in I<events>, or one of the values B<POLLERR>, "
2104 "B<POLLHUP>, or B<POLLNVAL>. (These three bits are meaningless in the "
2105 "I<events> field, and will be set in the I<revents> field whenever the "
2106 "corresponding condition is true.)"
2108 "I<revents> 要素は出力パラメータで、実際に起こったイベントがカーネルにより設定"
2109 "される。 I<revents> で返されるビット列には、 I<events> で指定したもののどれ"
2110 "か、もしくは B<POLLERR>, B<POLLHUP>, B<POLLNVAL> のうちの一つが含まれる "
2111 "(B<POLLERR>, B<POLLHUP>, B<POLLNVAL> の 3つのビットは I<events> に指定しても"
2112 "意味がなく、対応した状態が真の場合に I<revents> に設定される)。"
2115 #: build/C/man2/poll.2:122
2117 "If none of the events requested (and no error) has occurred for any of the "
2118 "file descriptors, then B<poll>() blocks until one of the events occurs."
2120 "どのファイルディスクリプタにも要求したイベントが発生しておらず、 エラーも起こ"
2121 "らない場合、 B<poll>() はイベントのうちいずれか一つが発生するまで停止 "
2125 #: build/C/man2/poll.2:131
2127 "The I<timeout> argument specifies an upper limit on the time for which "
2128 "B<poll>() will block, in milliseconds. Specifying a negative value in "
2129 "I<timeout> means an infinite timeout."
2131 "I<timeout> 引き数は B<poll>() が停止する時間の上限を設定するもので、ミリ秒単"
2132 "位で指定する。 I<timeout> に負の値を指定すると、タイムアウト時間が無限とな"
2136 #: build/C/man2/poll.2:137
2138 "The bits that may be set/returned in I<events> and I<revents> are defined in "
2139 "I<E<lt>poll.hE<gt>>:"
2141 "I<events> に指定したり、 I<revents> で返されるビットは I<E<lt>poll.hE<gt>> で"
2145 #: build/C/man2/poll.2:138
2151 #: build/C/man2/poll.2:141
2152 msgid "There is data to read."
2153 msgstr "読み出し可能なデータがある。"
2156 #: build/C/man2/poll.2:141
2162 #: build/C/man2/poll.2:145
2164 "There is urgent data to read (e.g., out-of-band data on TCP socket; "
2165 "pseudoterminal master in packet mode has seen state change in slave)."
2167 "読み出し可能な緊急データ (urgent data) がある (例えば、TCP ソケットの帯域外 "
2168 "(out-of-band data) データを受信した場合や、 パケットモードの擬似端末のマスタ"
2169 "がスレーブ側の変化を見つけたとき)。"
2172 #: build/C/man2/poll.2:145
2178 #: build/C/man2/poll.2:148
2179 msgid "Writing now will not block."
2180 msgstr "書き込みが停止 (block) しない状態である。"
2183 #: build/C/man2/poll.2:148
2185 msgid "B<POLLRDHUP> (since Linux 2.6.17)"
2186 msgstr "B<POLLRDHUP> (Linux 2.6.17 以降)"
2189 #: build/C/man2/poll.2:159
2191 "Stream socket peer closed connection, or shut down writing half of "
2192 "connection. The B<_GNU_SOURCE> feature test macro must be defined (before "
2193 "including I<any> header files) in order to obtain this definition."
2195 "ストリームソケットの他端が、コネクションを close したか、 コネクションの書き"
2196 "込み側を shutdown した。 この定義を有効にするには、 (「どの」ヘッダファイルを"
2197 "インクルードするよりも前に) B<_GNU_SOURCE> 機能検査マクロを定義しなければな"
2201 #: build/C/man2/poll.2:159
2207 #: build/C/man2/poll.2:162
2208 msgid "Error condition (output only)."
2209 msgstr "エラー状態 (出力の場合のみ)。"
2212 #: build/C/man2/poll.2:162
2218 #: build/C/man2/poll.2:165
2219 msgid "Hang up (output only)."
2220 msgstr "ハングアップした (出力の場合のみ)。"
2223 #: build/C/man2/poll.2:165
2226 msgstr "B<POLLNVAL>"
2229 #: build/C/man2/poll.2:170
2230 msgid "Invalid request: I<fd> not open (output only)."
2231 msgstr "不正な要求: I<fd> がオープンされていない (出力の場合のみ)。"
2234 #: build/C/man2/poll.2:176
2236 "When compiling with B<_XOPEN_SOURCE> defined, one also has the following, "
2237 "which convey no further information beyond the bits listed above:"
2239 "B<_XOPEN_SOURCE> を定義してコンパイルした場合には、以下の定義も行われる。 た"
2240 "だし、上記のリストにあるビット以上の情報が得られる訳ではない。"
2243 #: build/C/man2/poll.2:177
2245 msgid "B<POLLRDNORM>"
2246 msgstr "B<POLLRDNORM>"
2249 #: build/C/man2/poll.2:181
2250 msgid "Equivalent to B<POLLIN>."
2251 msgstr "B<POLLIN> と同じ。"
2254 #: build/C/man2/poll.2:181
2256 msgid "B<POLLRDBAND>"
2257 msgstr "B<POLLRDBAND>"
2259 #. POLLRDBAND is used in the DECnet protocol.
2261 #: build/C/man2/poll.2:185
2262 msgid "Priority band data can be read (generally unused on Linux)."
2264 "優先帯域データ (priority band data) が読み出し可能である (普通は Linux では使"
2268 #: build/C/man2/poll.2:185
2270 msgid "B<POLLWRNORM>"
2271 msgstr "B<POLLWRNORM>"
2274 #: build/C/man2/poll.2:189
2275 msgid "Equivalent to B<POLLOUT>."
2276 msgstr "B<POLLOUT> と同じ。"
2279 #: build/C/man2/poll.2:189
2281 msgid "B<POLLWRBAND>"
2282 msgstr "B<POLLWRBAND>"
2285 #: build/C/man2/poll.2:192
2286 msgid "Priority data may be written."
2287 msgstr "優先帯域データ (priority data) が書き込み可能である。"
2290 #: build/C/man2/poll.2:196
2291 msgid "Linux also knows about, but does not use B<POLLMSG>."
2292 msgstr "Linux では B<POLLMSG> も定義されているが、使用されていない。"
2295 #: build/C/man2/poll.2:196
2301 #: build/C/man2/poll.2:210
2303 "The relationship between B<poll>() and B<ppoll>() is analogous to the "
2304 "relationship between B<select>(2) and B<pselect>(2): like B<pselect>(2), "
2305 "B<ppoll>() allows an application to safely wait until either a file "
2306 "descriptor becomes ready or until a signal is caught."
2308 "B<poll>() と B<ppoll>() の関係は B<select>(2) と B<pselect>(2) の関係と同"
2309 "じようなものである: B<pselect>(2) と同様に、 B<ppoll>() を使うと、アプリ"
2310 "ケーションはファイルディスクリプタの状態変化 もしくはシグナルの捕捉を安全に待"
2314 #: build/C/man2/poll.2:216
2316 "Other than the difference in the precision of the I<timeout> argument, the "
2317 "following B<ppoll>() call:"
2319 "I<timeout> 引き数の精度の違いを除くと、以下の B<ppoll>() の呼び出しは、"
2322 #: build/C/man2/poll.2:219
2324 msgid " ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2325 msgstr " ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2328 #: build/C/man2/poll.2:228
2331 " sigset_t origmask;\n"
2334 " sigset_t origmask;\n"
2338 #: build/C/man2/poll.2:234
2341 " timeout = (timeout_ts == NULL) ? -1 :\n"
2342 " (timeout_ts.tv_sec * 1000 + timeout_ts.tv_nsec / 1000000);\n"
2343 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2344 " ready = poll(&fds, nfds, timeout);\n"
2345 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2347 " timeout = (timeout_ts == NULL) ? -1 :\n"
2348 " (timeout_ts.tv_sec * 1000 + timeout_ts.tv_nsec / 1000000);\n"
2349 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2350 " ready = poll(&fds, nfds, timeout);\n"
2351 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2354 #: build/C/man2/poll.2:241
2356 "See the description of B<pselect>(2) for an explanation of why B<ppoll>() "
2359 "なぜ B<ppoll>() が必要なのかについての説明は B<pselect>(2) の説明を参照のこ"
2363 #: build/C/man2/poll.2:253
2365 "If the I<sigmask> argument is specified as NULL, then no signal mask "
2366 "manipulation is performed (and thus B<ppoll>() differs from B<poll>() only "
2367 "in the precision of the I<timeout> argument)."
2369 "I<sigmask> 引き数に NULL が指定された場合、シグナルマスクの操作は行われない "
2370 "(したがって、 B<ppoll>() の B<poll>() との違いは I<timeout> 引き数の精度だ"
2374 #: build/C/man2/poll.2:260
2376 "The I<timeout_ts> argument specifies an upper limit on the amount of time "
2377 "that B<ppoll>() will block. This argument is a pointer to a structure of "
2378 "the following form:"
2380 "I<timeout> 引き数は B<ppoll>() が停止する時間の上限を指定するものである。 こ"
2381 "の引き数には以下の型の構造体へのポインタを指定する。"
2384 #: build/C/man2/poll.2:267
2387 "struct timespec {\n"
2388 " long tv_sec; /* seconds */\n"
2389 " long tv_nsec; /* nanoseconds */\n"
2392 "struct timespec {\n"
2393 " long tv_sec; /* seconds */\n"
2394 " long tv_nsec; /* nanoseconds */\n"
2398 #: build/C/man2/poll.2:275
2400 "If I<timeout_ts> is specified as NULL, then B<ppoll>() can block "
2403 "I<timeout_ts> に NULL が指定された場合、 B<ppoll> は無限に停止することがあり"
2407 #: build/C/man2/poll.2:285
2409 "On success, a positive number is returned; this is the number of structures "
2410 "which have nonzero I<revents> fields (in other words, those descriptors with "
2411 "events or errors reported). A value of 0 indicates that the call timed out "
2412 "and no file descriptors were ready. On error, -1 is returned, and I<errno> "
2413 "is set appropriately."
2415 "成功した場合は正の数を返す。この数は 0 以外の I<revents> 要素を持つ構造体の数"
2416 "である (別の言い方をすると、これらのディスクリプタ にはイベントかエラー報告が"
2417 "ある)。 値 0 は、タイムアウトとなり、どのファイルディスクリプタでもイベント"
2418 "が 発生しなかったことを示す。エラーの場合は -1 が返され、 I<errno> が適切に設"
2422 #: build/C/man2/poll.2:290
2424 "The array given as argument was not contained in the calling program's "
2427 "引き数として指定した配列が、呼び出したプロセスのアドレス空間に 含まれていな"
2431 #: build/C/man2/poll.2:294
2432 msgid "A signal occurred before any requested event; see B<signal>(7)."
2434 "要求されたイベントのどれかが起こる前にシグナルが発生した。 B<signal>(7) 参"
2438 #: build/C/man2/poll.2:301
2439 msgid "The I<nfds> value exceeds the B<RLIMIT_NOFILE> value."
2440 msgstr "I<nfds> の値が B<RLIMIT_NOFILE> を超えた。"
2443 #: build/C/man2/poll.2:304
2444 msgid "There was no space to allocate file descriptor tables."
2445 msgstr "ファイルディスクリプタ・テーブルを確保するためのメモリがない。"
2448 #: build/C/man2/poll.2:317
2450 "The B<poll>() system call was introduced in Linux 2.1.23. The B<poll>() "
2451 "library call was introduced in libc 5.4.28 (and provides emulation using "
2452 "B<select>(2) if your kernel does not have a B<poll>() system call)."
2454 "B<poll>() システムコールは Linux 2.1.23 で導入された。 B<poll>() ライブラ"
2455 "リ・コールは libc 5.4.28 から導入された (これはカーネルが B<poll>() システム"
2456 "コールをサポートしていない場合に B<select>(2) を使用してエミュレートを行"
2460 #: build/C/man2/poll.2:324
2462 "The B<ppoll>() system call was added to Linux in kernel 2.6.16. The "
2463 "B<ppoll>() library call was added in glibc 2.4."
2465 "B<ppoll>() システムコールは カーネル 2.6.16 で Linux に追加された。 B<ppoll>"
2466 "() ライブラリコールは glibc 2.4 に追加された。"
2468 #. NetBSD 3.0 has a pollts() which is like Linux ppoll().
2470 #: build/C/man2/poll.2:330
2471 msgid "B<poll>() conforms to POSIX.1-2001. B<ppoll>() is Linux-specific."
2473 "B<poll>() は POSIX.1-2001 に準拠している。 B<ppoll>() は Linux 固有である。"
2476 #: build/C/man2/poll.2:338
2478 "Some implementations define the nonstandard constant B<INFTIM> with the "
2479 "value -1 for use as a I<timeout> for B<poll>(). This constant is not "
2480 "provided in glibc."
2482 "いくつかの実装では、値 -1 を持った非標準の定数 B<INFTIM> が定義されており、 "
2483 "B<poll>() の I<timeout> の指定に使用できる。 この定数は glibc では定義されて"
2487 #: build/C/man2/poll.2:338
2493 #: build/C/man2/poll.2:352
2495 "The Linux B<ppoll>() system call modifies its I<timeout_ts> argument. "
2496 "However, the glibc wrapper function hides this behavior by using a local "
2497 "variable for the timeout argument that is passed to the system call. Thus, "
2498 "the glibc B<ppoll>() function does not modify its I<timeout_ts> argument."
2500 "Linux の B<ppoll>() システムコールは I<timeout_ts> 引き数を変更する。 しか"
2501 "し、glibc のラッパー関数は、システムコールに渡す timeout 引き数 としてローカ"
2502 "ル変数を使うことでこの動作を隠蔽している。 このため、glibc の B<ppoll>() 関"
2503 "数では I<timeout_ts> 引き数は変更されない。"
2506 #: build/C/man2/poll.2:356
2508 "See the discussion of spurious readiness notifications under the BUGS "
2509 "section of B<select>(2)."
2511 "B<select>(2) の「バグ」の節に書かれている、誤った準備完了通知 (spurious "
2512 "readiness notifications) についての議論を参照のこと。"
2515 #: build/C/man2/poll.2:360
2516 msgid "B<select>(2), B<select_tut>(2), B<time>(7)"
2517 msgstr "B<select>(2), B<select_tut>(2), B<time>(7)"
2519 #~ msgid "Finally, the actual wait is started by B<epoll_wait>(2)."
2520 #~ msgstr "最後に B<epoll_wait>(2) で実際のイベント待ちを開始する。"
2523 #~ "B<epoll_create>() creates an epoll \"instance\", requesting the kernel "
2524 #~ "to allocate an event backing store dimensioned for I<size> descriptors. "
2525 #~ "The I<size> is not the maximum size of the backing store but just a hint "
2526 #~ "to the kernel about how to dimension internal structures. (Nowadays, "
2527 #~ "I<size> is unused; see NOTES below.)"
2529 #~ "B<epoll_create>() は、 I<size> 個のディスクリプタを保持できる大きさの\n"
2530 #~ "イベントバッキングストアの割り当てをカーネルに対して要求することにより、\n"
2531 #~ "epoll 「インスタンス」を作成する。 I<size> はバッキングストアの最大サイ\n"
2532 #~ "ズではなく、内部構造の大きさをどの位にするかをカーネルに知らせるヒント\n"
2533 #~ "でしかない。 (現在は I<size> は使用されない。下記の「注意」を参照。)"
2536 #~ "Since Linux 2.6.8, the I<size> argument is unused, but must be greater "
2537 #~ "than zero. (The kernel dynamically sizes the required data structures "
2538 #~ "without needing this initial hint.)"
2540 #~ "Linux 2.6.8 以降では、 I<size> 引き数は使用されないが、 0 より大きくなけれ"
2542 #~ "(カーネルは、動的に必要なデータ構造の大きさを決定し、 最初のヒントを必要し"
2545 #~ msgid "The field I<fd> contains a file descriptor for an open file."
2547 #~ "構造体の I<fd> にはオープンしたファイルのファイルディスクリプタを入れる。"
2550 #~ "Glibc support for B<epoll_pwait>() is provided starting with version 2.6."
2552 #~ "B<epoll_pwait>() の glibc でのサポートは glibc 2.6 以降で提供されている。"