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-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"
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) と同様の処理を行う、つまり、複数のファイルディスク\n"
90 "リプタを監視し、その中のいずれかが入出力可能な状態であるかを確認する。\n"
91 "B<epoll> API は、エッジトリガインタフェースとレベルトリガインタフェースの\n"
92 "いずれとしても使用することができ、監視するファイルディスクリプタの数が多い\n"
93 "場合にも使用できる。 B<epoll> インスタンスの作成や管理を行うために\n"
97 #: build/C/man7/epoll.7:40 build/C/man7/epoll.7:49 build/C/man7/epoll.7:57
103 #: build/C/man7/epoll.7:49
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).)"
109 "B<epoll_create>(2) は B<epoll> インスタンスを作成し、そのインスタンスを参照する\n"
110 "ファイルディスクリプタを返す。(もっと新しい B<epoll_create1>(2) では、\n"
111 "B<epoll_create>(2) の機能が拡張されている)。"
114 #: build/C/man7/epoll.7:57
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."
120 "特定のファイルディスクリプタに対する監視内容を B<epoll_ctl>(2) で登録する。 "
121 "B<epoll> インスタンスに現在登録されているファイルディスクリプタの集合は "
122 "I<epoll> 集合と呼ばれることもある。"
125 #: build/C/man7/epoll.7:61
127 "B<epoll_wait>(2) waits for I/O events, blocking the calling thread if no "
128 "events are currently available."
130 "B<epoll_wait>(2) は I/O イベントを待つ。\n"
131 "現在利用可能な状態のイベントがなければ、呼び出したスレッドを停止する。"
134 #: build/C/man7/epoll.7:61
136 msgid "Level-Triggered and Edge-Triggered"
137 msgstr "レベルトリガとエッジトリガ"
140 #: build/C/man7/epoll.7:70
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:"
146 "B<epoll> イベント配送 (distribution) インタフェースは、 エッジトリガ (ET) と"
147 "してもレベルトリガ (LT) としても動作させることができる。 二つの配送機構の違い"
148 "は、次のように説明できる。 このようなシナリオが起こったとしよう:"
151 #: build/C/man7/epoll.7:70
157 #: build/C/man7/epoll.7:76
159 "The file descriptor that represents the read side of a pipe (I<rfd>) is "
160 "registered on the B<epoll> instance."
162 "パイプの読み込み側を表すファイルディスクリプタ (I<rfd>) が B<epoll> インスタ"
166 #: build/C/man7/epoll.7:76
172 #: build/C/man7/epoll.7:78
173 msgid "A pipe writer writes 2 kB of data on the write side of the pipe."
175 "パイプへ書き込むプログラムが 2 kB のデータをパイプの書き込み側へ書き込む。"
178 #: build/C/man7/epoll.7:78
184 #: build/C/man7/epoll.7:84
186 "A call to B<epoll_wait>(2) is done that will return I<rfd> as a ready file "
189 "B<epoll_wait>(2) を呼び出すと、読み込み可能 (ready) なファイルディスクリプタ"
193 #: build/C/man7/epoll.7:84
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> から読み出す。"
204 #: build/C/man7/epoll.7:87
210 #: build/C/man7/epoll.7:91
211 msgid "A call to B<epoll_wait>(2) is done."
212 msgstr "B<epoll_wait>(2) の呼び出しが行われる。"
215 #: build/C/man7/epoll.7:126
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."
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) するかもしれない。"
244 #: build/C/man7/epoll.7:136
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:"
251 "B<EPOLLET> フラグを採用するアプリケーションでは、 インタフェースはブロックし"
252 "ない (nonblocking) ファイルディスクリプタを 使うべきである。 これは、ブロック"
253 "される読み込みや書き込みによって、 複数のファイルディスクリプタを扱うタスク"
254 "が 停止してしまうのを避けるためである。 B<epoll> をエッジトリガ "
255 "(B<EPOLLET>) インタフェースとして使うために提案される方法は以下の通りであ"
259 #: build/C/man7/epoll.7:137
265 #: build/C/man7/epoll.7:140
266 msgid "with nonblocking file descriptors; and"
267 msgstr "ブロックしないファイルディスクリプタと共に使う。"
270 #: build/C/man7/epoll.7:140
276 #: build/C/man7/epoll.7:148
278 "by waiting for an event only after B<read>(2) or B<write>(2) return "
281 "B<read>(2) または B<write>(2) が B<EAGAIN> を返した後でのみ、イベントを待"
285 #: build/C/man7/epoll.7:159
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."
291 "一方、レベルトリガインタフェースとして使う場合\n"
293 "B<EPOLLET> が指定されなかった場合)、\n"
294 "B<epoll> は単に高速な B<poll>(2) であり、使い方が同じなので、\n"
295 "B<poll>(2) が使われているところではどこでも使用することができる。"
298 #: build/C/man7/epoll.7:176
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>."
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> を指定してファイルディスクリプタを再度使用できるようにするの"
316 #: build/C/man7/epoll.7:176
318 msgid "/proc interfaces"
319 msgstr "/proc インタフェース"
321 #. Following was added in 2.6.28, but them removed in 2.6.29
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.
327 #: build/C/man7/epoll.7:184
329 "The following interfaces can be used to limit the amount of kernel memory "
332 "epoll が消費するカーネルメモリの量を制限するために、 以下のインタフェースを使"
336 #: build/C/man7/epoll.7:184
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 以降)"
341 #. 2.6.29 (in 2.6.28, the default was 1/32 of lowmem)
343 #: build/C/man7/epoll.7:198
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."
352 "このファイルは、あるユーザがシステム上の全ての epoll インスタンスに 登録でき"
353 "るファイルディスクリプタの総数の上限を規定する。 この上限は実ユーザ ID 単位で"
354 "ある。 登録されたファイルディスクリプタ 1 つが消費するメモリ量は、 32 ビット"
355 "カーネルでおよそ 90 バイト、 64 ビットカーネルでおよそ 160 バイトである。 現"
356 "在のところ、 I<max_user_watches> のデフォルト値は、利用可能なメモリ下限の "
357 "1/25 (4%) であり、 登録で消費されるメモリ量 (バイト単位) で割った値となる。"
360 #: build/C/man7/epoll.7:198
362 msgid "Example for Suggested Usage"
366 #: build/C/man7/epoll.7:227
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."
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) を継続"
390 #: build/C/man7/epoll.7:233
393 "#define MAX_EVENTS 10\n"
394 "struct epoll_event ev, events[MAX_EVENTS];\n"
395 "int listen_sock, conn_sock, nfds, epollfd;\n"
397 "#define MAX_EVENTS 10\n"
398 "struct epoll_event ev, events[MAX_EVENTS];\n"
399 "int listen_sock, conn_sock, nfds, epollfd;\n"
402 #: build/C/man7/epoll.7:236
405 "/* Set up listening socket, \\(aqlisten_sock\\(aq (socket(),\n"
406 " bind(), listen()) */\n"
408 "/* Set up listening socket, \\(aqlisten_sock\\(aq (socket(),\n"
409 " bind(), listen()) */\n"
412 #: build/C/man7/epoll.7:242
415 "epollfd = epoll_create(10);\n"
416 "if (epollfd == -1) {\n"
417 " perror(\"epoll_create\");\n"
418 " exit(EXIT_FAILURE);\n"
421 "epollfd = epoll_create(10);\n"
422 "if (epollfd == -1) {\n"
423 " perror(\"epoll_create\");\n"
424 " exit(EXIT_FAILURE);\n"
428 #: build/C/man7/epoll.7:249
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"
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"
446 #: build/C/man7/epoll.7:256
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"
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"
464 #: build/C/man7/epoll.7:278
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"
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"
480 " perror(\"epoll_ctl: conn_sock\");\n"
481 " exit(EXIT_FAILURE);\n"
484 " do_use_fd(events[n].data.fd);\n"
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"
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"
502 " perror(\"epoll_ctl: conn_sock\");\n"
503 " exit(EXIT_FAILURE);\n"
506 " do_use_fd(events[n].data.fd);\n"
512 #: build/C/man7/epoll.7:297
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>."
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> の連続的な切り替えが避けられる。"
527 #: build/C/man7/epoll.7:297
529 msgid "Questions and Answers"
533 #: build/C/man7/epoll.7:298
539 #: build/C/man7/epoll.7:303
541 "What is the key used to distinguish the file descriptors registered in an "
544 "B<epoll> 集合内の登録されたファイルディスクリプタを区別するには、 何をキーと"
548 #: build/C/man7/epoll.7:303
554 #: build/C/man7/epoll.7:309
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)."
560 "キーはファイルディスクリプタ番号とオープンファイル記述 (open file "
561 "description) の組である (オープンファイル記述は \"open file handle\" とも 呼"
562 "ばれ、オープンされたファイルのカーネルの内部表現である)。"
565 #: build/C/man7/epoll.7:309
571 #: build/C/man7/epoll.7:314
573 "What happens if you register the same file descriptor on an B<epoll> "
576 "1 つの B<epoll> インスタンスに同じファイルディスクリプタを 2 回登録するとどう"
580 #: build/C/man7/epoll.7:314
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"
599 #: build/C/man7/epoll.7:345
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."
606 "たぶん B<EEXIST> を受け取るだろう。 しかしながら、同じ B<epoll> インスタンス"
607 "に対して複製されたディスクリプタを追加することは可能である (B<dup>(2), "
608 "B<dup2>(2), B<fcntl>(2) B<F_DUPFD> など)。 複製したファイルディスクリプタを"
609 "異なる I<events> マスクで登録すれば、イベントをフィルタリングするのに この機"
613 #: build/C/man7/epoll.7:345
619 #: build/C/man7/epoll.7:353
621 "Can two B<epoll> instances wait for the same file descriptor? If so, are "
622 "events reported to both B<epoll> file descriptors?"
624 "2 つの B<epoll> インスタンスが同じファイルディスクリプタを待ち受けることは可"
625 "能か? もし可能であれば、イベントは両方の B<epoll> ファイルディスクリプタに報"
629 #: build/C/man7/epoll.7:353
635 #: build/C/man7/epoll.7:357
637 "Yes, and events would be reported to both. However, careful programming may "
638 "be needed to do this correctly."
640 "イベントは両方に報告される。 しかしながら、これを正しく扱うには注意深くプログ"
641 "ラミングする必要が あるかもしれない。"
644 #: build/C/man7/epoll.7:357
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 が可能か?"
655 #: build/C/man7/epoll.7:362
661 #: build/C/man7/epoll.7:369
663 "Yes. If an B<epoll> file descriptor has events waiting then it will "
664 "indicate as being readable."
666 "可能である。 B<epoll> ファイルディスクリプタに処理待ちのイベントがある場合"
667 "は、 読み出し可能だと通知されることだろう。"
670 #: build/C/man7/epoll.7:369
676 #: build/C/man7/epoll.7:374
678 "What happens if one attempts to put an B<epoll> file descriptor into its own "
679 "file descriptor set?"
681 "B<epoll> ファイルディスクリプタを自身のファイルディスクリプタ集合に 入れよう"
685 #: build/C/man7/epoll.7:374
691 #: build/C/man7/epoll.7:385
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."
696 "B<epoll_ctl>(2) の呼び出しは (B<EINVAL> で) 失敗するだろう。 ただし "
697 "B<epoll> ファイルディスクリプタを他の B<epoll> ファイルディスクリプタ集合の内"
701 #: build/C/man7/epoll.7:385
707 #: build/C/man7/epoll.7:390
709 "Can I send an B<epoll> file descriptor over a UNIX domain socket to another "
712 "B<epoll> ファイルディスクリプタを UNIX ドメインソケットで他のプロセスに送るこ"
716 #: build/C/man7/epoll.7:390
722 #: build/C/man7/epoll.7:396
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."
727 "可能だが、これをすることに意味はない。 なぜなら、受信側のプロセスが B<epoll> "
728 "集合内のファイルディスクリプタのコピーを持っていないからである。"
731 #: build/C/man7/epoll.7:396
737 #: build/C/man7/epoll.7:401
739 "Will closing a file descriptor cause it to be removed from all B<epoll> sets "
742 "ファイルディスクリプタをクローズすると、そのファイルディスクリプタは全ての "
743 "B<epoll> 集合から自動的に削除されるか?"
746 #: build/C/man7/epoll.7:401
752 #: build/C/man7/epoll.7:429
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 "
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 "間は、 クローズしたファイルディスクリプタ宛にイベントが報告される可能性がある"
783 #: build/C/man7/epoll.7:429
789 #: build/C/man7/epoll.7:434
791 "If more than one event occurs between B<epoll_wait>(2) calls, are they "
792 "combined or reported separately?"
794 "2 つ以上のイベントが B<epoll_wait>(2) コールの間に発生した場合、それらはまと"
795 "めて報告されるか、 それとも別々に報告されるか?"
798 #: build/C/man7/epoll.7:434
804 #: build/C/man7/epoll.7:437
805 msgid "They will be combined."
806 msgstr "まとめて報告されるだろう。"
809 #: build/C/man7/epoll.7:437
815 #: build/C/man7/epoll.7:441
817 "Does an operation on a file descriptor affect the already collected but not "
818 "yet reported events?"
820 "ファイルディスクリプタに対する操作は、 既に集められているがまだ報告されていな"
824 #: build/C/man7/epoll.7:441
830 #: build/C/man7/epoll.7:447
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."
835 "既存のファイルディスクリプタに対して 2 つの操作を行うことができる。 この場"
836 "合、削除には意味がない。 変更すると、使用可能な I/O が再び読み込まれる。"
839 #: build/C/man7/epoll.7:447
845 #: build/C/man7/epoll.7:455
847 "Do I need to continuously read/write a file descriptor until B<EAGAIN> when "
848 "using the B<EPOLLET> flag (edge-triggered behavior) ?"
850 "B<EPOLLET> フラグ (エッジトリガ動作) を使っている場合、 B<EAGAIN> を受け取る"
851 "まで、 継続してファイルディスクリプタを読み書きする必要があるか?"
854 #: build/C/man7/epoll.7:455
860 #: build/C/man7/epoll.7:465
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."
867 "B<epoll_wait>(2) からイベントを受け取ることは、 そのファイルディスクリプタが"
868 "要求された I/O 操作に対して準備済みである、 ということをユーザに示すものであ"
869 "る。 次の (ブロックしない) read/write で B<EAGAIN> を受け取るまではファイル"
870 "ディスクリプタは準備済みであると 考えなければならない。 そのファイルディスク"
871 "リプタをいつどのように使うかは、 全くユーザに任されてる。"
874 #: build/C/man7/epoll.7:471
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>."
880 "パケット指向やトークン指向のファイル (例えば、データグラムソケット、 "
881 "canonical モードの端末) では、 読み込み用 / 書き込み用の I/O 空間の末尾を検知"
882 "する唯一の方法は B<EAGAIN> になるまで read/write を行うことである。"
885 #: build/C/man7/epoll.7:487
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-"
897 "ストリーム指向のファイル (例えば、パイプ、FIFO、ストリームソケット) では、 読"
898 "み込み用 / 書き込み用の I/O 空間が使い尽くされた状態は、 対象となるファイル"
899 "ディスクリプタから読み込んだデータ量または 書き込んだデータ量をチェックするこ"
900 "とでも検知できる。 例えば、ある特定の量のデータを読み込むために B<read>(2) "
901 "を呼んだときに、 B<read>(2) が返したバイト数がそれより少なかった場合、 その"
902 "ファイルディスクリプタの読み込み用 I/O 空間が 使い尽くされたことが分かる。 "
903 "B<write>(2) を使って書き込みをするときも、同じことが言える (監視しているファ"
904 "イルディスクリプタが常にストリーム指向のファイルを 参照していることを保証でき"
905 "ない場合には、後者の手法の使用を避けること)。"
908 #: build/C/man7/epoll.7:487
910 msgid "Possible Pitfalls and Ways to Avoid Them"
911 msgstr "ありがちな落とし穴と回避方法"
914 #: build/C/man7/epoll.7:488
916 msgid "B<o Starvation (edge-triggered)>"
917 msgstr "B<o 飢餓 (starvation) (エッジトリガ)>"
920 #: build/C/man7/epoll.7:496
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>.)"
926 "大きな I/O 空間がある場合、 その I/O 空間のデータを全て処理 (drain) しようと"
927 "すると、 他のファイルが処理されず、飢餓を発生させることがある (この問題は "
928 "B<epoll> に固有のものではない)。"
931 #: build/C/man7/epoll.7:504
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."
939 "この問題の解決法は、準備済み状態のリストを管理して、 関連する data 構造体の中"
940 "でファイルディスクリプタが 利用可能であるとマークすることである。 それによっ"
941 "て、利用可能なすべてのファイルの中で どのファイルを処理する必要があるかを憶え"
942 "ることができ、 しかも順番に処理 (round robin) することができる。 既に利用可能"
943 "であるファイルディスクリプタに対して それ以後に受け取るイベントを無視すること"
947 #: build/C/man7/epoll.7:504
949 msgid "B<o If using an event cache...>"
950 msgstr "B<o イベントキャッシュを使っている場合>"
953 #: build/C/man7/epoll.7:520
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."
963 "イベントキャッシュを使っている場合、 または B<epoll_wait>(2) から返された全"
964 "てのファイルディスクリプタを格納している場合、 クローズされたことを動的にマー"
965 "クする (つまり前のイベントの処理によってマークされる) 方法を提供すべきであ"
966 "る。 B<epoll_wait>(2) から 100 個のイベントを受け取り、 イベント #47 ではあ"
967 "る条件でイベント #13 が閉じられると仮定する。 イベント #13 の構造体を削除し"
968 "ファイルディスクリプタを B<close>(2) すると、イベントキャッシュはそのファイ"
969 "ルディスクリプタを待つイベントが 存在するといって、混乱が起きる。"
972 #: build/C/man7/epoll.7:531
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."
981 "この問題を解決する 1 つの方法は、イベント 47 の処理をしている間に、 ファイル"
982 "ディスクリプタ 13 を削除して B<close>(2) するために B<epoll_ctl>"
983 "(B<EPOLL_CTL_DEL>) を呼び出し、関連付けられた data 構造体を削除済みとマーク"
984 "して、 クリーンアップリストにリンクすることである。 バッチ処理の中でファイル"
985 "ディスクリプタ 13 についての 他のイベントを見つけた場合、 そのファイルディス"
986 "クリプタが以前に削除されたものであると分かるので、 混乱は起きない。"
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
996 #. Its interface should be finalized in Linux kernel 2.5.66.
998 #: build/C/man7/epoll.7:537
1000 "The B<epoll> API was introduced in Linux kernel 2.5.44. Support was added "
1001 "to glibc in version 2.3.2."
1003 "B<epoll> API は Linux カーネル 2.5.44 に導入された。 glibc でのサポートはバー"
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
1011 msgid "CONFORMING TO"
1015 #: build/C/man7/epoll.7:546
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>."
1020 "B<epoll> API は Linux 固有である。 他のシステムでも同様の機構が提供されている"
1021 "場合がある。 例えば、FreeBSD の I<kqueue> や Solaris の I</dev/poll> などであ"
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
1033 #: build/C/man7/epoll.7:550
1035 "B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2)"
1037 "B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2)"
1040 #: build/C/man2/epoll_create.2:25
1042 msgid "EPOLL_CREATE"
1043 msgstr "EPOLL_CREATE"
1046 #: build/C/man2/epoll_create.2:25 build/C/man2/epoll_ctl.2:21
1047 #: build/C/man2/poll.2:31
1053 #: build/C/man2/epoll_create.2:28
1054 msgid "epoll_create, epoll_create1 - open an epoll file descriptor"
1056 "epoll_create, epoll_create1 - epoll ファイルディスクリプタをオープンする"
1059 #: build/C/man2/epoll_create.2:31 build/C/man2/epoll_wait.2:29
1061 msgid "B<#include E<lt>sys/epoll.hE<gt>>\n"
1062 msgstr "B<#include E<lt>sys/epoll.hE<gt>>\n"
1065 #: build/C/man2/epoll_create.2:34
1068 "B<int epoll_create(int >I<size>B<);>\n"
1069 "B<int epoll_create1(int >I<flags>B<);>\n"
1071 "B<int epoll_create(int >I<size>B<);>\n"
1072 "B<int epoll_create1(int >I<flags>B<);>\n"
1075 #: build/C/man2/epoll_create.2:43
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."
1080 "B<epoll_create>()は B<epoll>(7) インスタンスを作成する。\n"
1081 "Linux 2.6.8 以降では、I<size> 引き数は無視されるが、 0 より大きな値で\n"
1082 "なければならない。下記の「注意」を参照。"
1085 #: build/C/man2/epoll_create.2:56
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."
1094 "B<epoll_create>() は、新しい epoll インスタンスを参照するファイルディスクリ"
1095 "プタを返す。 このファイルディスクリプタは、その後の B<epoll> インタフェースの"
1096 "呼び出しに使われる。 もう必要でなくなった場合は、 B<epoll_create>() で返され"
1097 "たファイルディスクリプタは B<close>(2) を使ってクローズされるべきである。 あ"
1098 "る epoll インスタンスを参照する全てのファイルディスクリプタがクローズされる"
1099 "と、 カーネルはそのインスタンスを破壊して、対応するリソースを解放し、 再使用"
1103 #: build/C/man2/epoll_create.2:57
1105 msgid "epoll_create1()"
1106 msgstr "epoll_create1()"
1109 #: build/C/man2/epoll_create.2:69
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:"
1115 "B<epoll_create1>() は、 I<flags> が 0 の場合、現在では使われていない "
1116 "I<size> 引き数がなくなっている点を除けば B<epoll_create>() と同じである。 "
1117 "I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさ"
1121 #: build/C/man2/epoll_create.2:69
1123 msgid "B<EPOLL_CLOEXEC>"
1124 msgstr "B<EPOLL_CLOEXEC>"
1127 #: build/C/man2/epoll_create.2:79
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 "
1133 "新しいファイルディスクリプタに対して close-on-exec (B<FD_CLOEXEC>) フラグを"
1134 "セットする。 このフラグが役に立つ理由については、 B<open>(2) の "
1135 "B<O_CLOEXEC> フラグの説明を参照のこと。"
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
1141 msgid "RETURN VALUE"
1145 #: build/C/man2/epoll_create.2:86
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."
1150 "成功すると、これらのシステムコールは 非負のファイルディスクリプタを返す。 エ"
1151 "ラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
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
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
1169 #: build/C/man2/epoll_create.2:91
1170 msgid "I<size> is not positive."
1171 msgstr "I<size> が正でない。"
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> に無効な値が指定された。"
1179 #: build/C/man2/epoll_create.2:96
1185 #: build/C/man2/epoll_create.2:104
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 "
1191 "I</proc/sys/fs/epoll/max_user_instances> によって指定されている、epoll インス"
1192 "タンスのユーザー単位の制限に達した。 更なる詳細については B<epoll>(7) を参照"
1196 #: build/C/man2/epoll_create.2:104
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 "オープンされたファイルの総数がシステム制限に達した。"
1207 #: build/C/man2/epoll_create.2:107 build/C/man2/epoll_ctl.2:205
1208 #: build/C/man2/poll.2:301
1214 #: build/C/man2/epoll_create.2:110
1215 msgid "There was insufficient memory to create the kernel object."
1216 msgstr "カーネルオブジェクトを作成するのに十分なメモリがなかった。"
1219 #: build/C/man2/epoll_create.2:114
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."
1224 "B<epoll_create>() はカーネル 2.6 で追加された。\n"
1225 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1227 #. To be precise: kernel 2.5.44.
1228 #. The interface should be finalized by Linux kernel 2.5.66.
1230 #: build/C/man2/epoll_create.2:120
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."
1235 "B<epoll_create1>() はカーネル 2.6.27 で追加された。\n"
1236 "ライブラリによるサポートは glibc バージョン 2.9 以降で提供されている。"
1239 #: build/C/man2/epoll_create.2:123
1240 msgid "B<epoll_create>() is Linux-specific."
1241 msgstr "B<epoll_create>() は Linux 独自である。"
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
1251 #: build/C/man2/epoll_create.2:146
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."
1264 "初期の B<epoll_create>() の実装では、I<size> 引き数は、呼び出し元が B<epoll>\n"
1265 "インスタンスに追加しようとするファイルディスクリプタ数をカーネルに教えるのに\n"
1266 "使われていた。カーネルはこの情報をイベントの情報を格納する内部データ構造に最\n"
1267 "初に割り当てる大きさを決める際のヒントとして使用していた (I<size> で渡された\n"
1268 "ヒントよりも使用量が大きくなった場合には、必要に応じてカーネルは追加で領域を\n"
1271 "現在では、このヒントはもはや必要なくなっている (カーネルはヒントなしで必要な\n"
1272 "データ構造のサイズを動的に変更する) が、今も I<size> には 0 より大きい値を\n"
1273 "指定しなければならない。これは、B<epoll> を使うアプリケーションが古いカーネル\n"
1274 "で実行される際の後方互換性を保証するためである。"
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)"
1282 #: build/C/man2/epoll_ctl.2:21
1288 #: build/C/man2/epoll_ctl.2:24
1289 msgid "epoll_ctl - control interface for an epoll descriptor"
1290 msgstr "epoll_ctl - epoll ディスクリプタのインタフェースを操作する"
1293 #: build/C/man2/epoll_ctl.2:29
1295 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1296 "epoll_event *>I<event>B<);>"
1298 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1299 "epoll_event *>I<event>B<);>"
1302 #: build/C/man2/epoll_ctl.2:39
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>."
1308 "このシステムコールは、ファイルディスクリプタ I<epfd> が参照する B<epoll>(7)\n"
1309 "インスタンスに対する操作を行う。 対象のファイルディスクリプタ I<fd> に対して、\n"
1310 "操作 I<op> の実行が要求される。"
1313 #: build/C/man2/epoll_ctl.2:43
1314 msgid "Valid values for the I<op> argument are :"
1315 msgstr "I<op> 引き数に指定できる有効な値は以下の通りである。"
1318 #: build/C/man2/epoll_ctl.2:43
1320 msgid "B<EPOLL_CTL_ADD>"
1321 msgstr "B<EPOLL_CTL_ADD>"
1324 #: build/C/man2/epoll_ctl.2:55
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>."
1330 "対象のファイルディスクリプタ I<fd> をファイルディスクリプタ I<epfd> が参照す"
1331 "る B<epoll> インスタンスに登録し、イベント I<event> を I<fd> に結び付けられた"
1335 #: build/C/man2/epoll_ctl.2:55
1337 msgid "B<EPOLL_CTL_MOD>"
1338 msgstr "B<EPOLL_CTL_MOD>"
1341 #: build/C/man2/epoll_ctl.2:61
1343 "Change the event I<event> associated with the target file descriptor I<fd>."
1345 "イベント I<event> を対象のファイルディスクリプタ I<fd> に関連付けるように変更"
1349 #: build/C/man2/epoll_ctl.2:61
1351 msgid "B<EPOLL_CTL_DEL>"
1352 msgstr "B<EPOLL_CTL_DEL>"
1355 #: build/C/man2/epoll_ctl.2:72
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)."
1361 "対象のファイルディスクリプタ I<fd> を I<epfd> が参照する B<epoll> インスタン"
1362 "スから削除する。 I<event> 引き数は無視されるので、NULL にすることもできる (但"
1366 #: build/C/man2/epoll_ctl.2:80
1368 "The I<event> argument describes the object linked to the file descriptor "
1369 "I<fd>. The I<struct epoll_event> is defined as :"
1371 "I<event> 引き数は、ファイルディスクリプタ I<fd> にリンクされたオブジェクトを"
1372 "表す。 I<struct epoll_event> は以下のように定義される:"
1375 #: build/C/man2/epoll_ctl.2:89
1378 "typedef union epoll_data {\n"
1385 "typedef union epoll_data {\n"
1393 #: build/C/man2/epoll_ctl.2:94
1396 "struct epoll_event {\n"
1397 " uint32_t events; /* Epoll events */\n"
1398 " epoll_data_t data; /* User data variable */\n"
1401 "struct epoll_event {\n"
1402 " uint32_t events; /* epoll イベント */\n"
1403 " epoll_data_t data; /* ユーザデータ変数 */\n"
1407 #: build/C/man2/epoll_ctl.2:101
1409 "The I<events> member is a bit set composed using the following available "
1412 "I<events> メンバは、以下のような使用可能なイベントタイプを使って構成された "
1416 #: build/C/man2/epoll_ctl.2:101
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) 操作が可能である。"
1427 #: build/C/man2/epoll_ctl.2:106
1430 msgstr "B<EPOLLOUT>"
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) 操作が可能である。"
1438 #: build/C/man2/epoll_ctl.2:111
1440 msgid "B<EPOLLRDHUP> (since Linux 2.6.17)"
1441 msgstr "B<EPOLLRDHUP\">(LinuxB<2.6.17>以降)\""
1444 #: build/C/man2/epoll_ctl.2:117
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.)"
1450 "ストリームソケットの他端が、コネクションの close 、 またはコネクションの書き"
1451 "込み側の shutdown を行った。 (このフラグを使うと、エッジトリガの監視を行う場"
1452 "合に、 通信のもう一端が閉じられたことを検知するコードを 非常に簡潔に書くこと"
1456 #: build/C/man2/epoll_ctl.2:117
1459 msgstr "B<EPOLLPRI>"
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) データがある。"
1467 #: build/C/man2/epoll_ctl.2:122
1470 msgstr "B<EPOLLERR>"
1473 #: build/C/man2/epoll_ctl.2:128
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 "
1479 "関連付けられたファイルディスクリプタにエラー条件が起こった。 B<epoll_wait>"
1480 "(2) は常にこのイベントを待つので、 I<events> に設定する必要はない。"
1483 #: build/C/man2/epoll_ctl.2:128
1486 msgstr "B<EPOLLHUP>"
1489 #: build/C/man2/epoll_ctl.2:134
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>."
1494 "関連付けられたファイルディスクリプタにハングアップが起こった。 B<epoll_wait>"
1495 "(2) は常にこのイベントを待つので、 I<events> に設定する必要はない。"
1498 #: build/C/man2/epoll_ctl.2:134
1504 #: build/C/man2/epoll_ctl.2:144
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 "
1511 "関連付けられたファイルディスクリプタに エッジトリガ動作 (Edge Triggered "
1512 "behavior) を設定する。 B<epoll> のデフォルトの動作は、レベルトリガ (Level "
1513 "Triggered) である。 エッジトリガとレベルトリガによるイベント分配機構 (event "
1514 "distribution architectures) についての詳細な情報は、 B<epoll>(7) を参照する"
1518 #: build/C/man2/epoll_ctl.2:144
1520 msgid "B<EPOLLONESHOT> (since Linux 2.6.2)"
1521 msgstr "B<EPOLLONESHOT> (Linux 2.6.2 以降)"
1524 #: build/C/man2/epoll_ctl.2:158
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."
1532 "関連付けられたファイルディスクリプタに 一撃動作 (One-Shot behavior) を設定す"
1533 "る。 これはイベントが B<epoll_wait>(2) によって引き出された後、 関連付けられ"
1534 "たファイルディスクリプタが内部的に破棄され、 B<epoll> インタフェースによって"
1535 "イベントが報告されなくなることを意味する。 新しいイベントマスクでファイルディ"
1536 "スクリプタを再度有効にするためには、 B<epoll_ctl>() に B<EPOLL_CTL_MOD> を指"
1537 "定して呼び出さなければならない。 I<op> 引き数に指定できる有効な値は、以下の通"
1541 #: build/C/man2/epoll_ctl.2:167
1543 "When successful, B<epoll_ctl>() returns zero. When an error occurs, "
1544 "B<epoll_ctl>() returns -1 and I<errno> is set appropriately."
1546 "成功した場合、 B<epoll_ctl>() は 0 を返す。 エラーが起こった場合、 "
1547 "B<epoll_ctl>() は -1 を返し、 I<errno> を適切に設定する。"
1550 #: build/C/man2/epoll_ctl.2:168 build/C/man2/epoll_wait.2:149
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> が有効なファイルディスクリプタでない。"
1561 #: build/C/man2/epoll_ctl.2:174
1567 #: build/C/man2/epoll_ctl.2:182
1569 "I<op> was B<EPOLL_CTL_ADD>, and the supplied file descriptor I<fd> is "
1570 "already registered with this epoll instance."
1572 "I<op> が B<EPOLL_CTL_ADD> であり、かつ与えられたファイルディスクリプタ I<fd> "
1573 "がこの epoll インスタンスに既に登録されている。"
1576 #: build/C/man2/epoll_ctl.2:195
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."
1581 "I<epfd> が B<epoll> ファイルディスクリプタでない。 または I<fd> が I<epfd> と"
1582 "同一である。 または要求された操作 I<op> がこのインタフェースでサポートされて"
1586 #: build/C/man2/epoll_ctl.2:195
1592 #: build/C/man2/epoll_ctl.2:205
1594 "I<op> was B<EPOLL_CTL_MOD> or B<EPOLL_CTL_DEL>, and I<fd> is not registered "
1595 "with this epoll instance."
1597 "I<op> が B<EPOLL_CTL_MOD> または B<EPOLL_CTL_DEL> で、かつ I<fd> がこの "
1598 "epoll インスタンスに登録されていない。"
1601 #: build/C/man2/epoll_ctl.2:210
1603 "There was insufficient memory to handle the requested I<op> control "
1605 msgstr "要求された I<op> 制御操作を扱うのに十分なメモリがない。"
1608 #: build/C/man2/epoll_ctl.2:210
1614 #: build/C/man2/epoll_ctl.2:220
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."
1620 "epoll インスタンスに新しいファイルディスクリプタを登録 (B<EPOLL_CTL_ADD>) し"
1621 "ようとした際に、 I</proc/sys/fs/epoll/max_user_watches> で決まる上限に達し"
1622 "た。 詳細は B<epoll>(7) を参照。"
1625 #: build/C/man2/epoll_ctl.2:220
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> をサポートしていない。"
1635 #. To be precise: kernel 2.5.44.
1636 #. The interface should be finalized by Linux kernel 2.5.66.
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 で追加された。"
1643 #: build/C/man2/epoll_ctl.2:235
1645 "B<epoll_ctl>() is Linux-specific. Library support is provided in glibc "
1646 "starting with version 2.3.2."
1648 "B<epoll_ctl>() は Linux 独自である。\n"
1649 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1652 #: build/C/man2/epoll_ctl.2:240
1654 "The B<epoll> interface supports all file descriptors that support B<poll>(2)."
1656 "B<epoll> インタフェースは、 B<poll>(2) に対応している全てのファイルディスク"
1660 #: build/C/man2/epoll_ctl.2:240 build/C/man2/poll.2:352
1666 #: build/C/man2/epoll_ctl.2:254
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>."
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 でないポインタを指定すべきである。"
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)"
1686 #: build/C/man2/epoll_wait.2:23
1692 #: build/C/man2/epoll_wait.2:26
1694 "epoll_wait, epoll_pwait - wait for an I/O event on an epoll file descriptor"
1696 "epoll_wait, epoll_pwait - epoll ファイルディスクリプタの I/O イベントを待つ"
1699 #: build/C/man2/epoll_wait.2:35
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"
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"
1715 #: build/C/man2/epoll_wait.2:53
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."
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 より大きくなければならない。"
1730 #: build/C/man2/epoll_wait.2:66
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."
1737 "最大で I<timeout> ミリ秒間、呼び出したスレッドを停止させる。\n"
1738 "I<timeout> を -1 に指定すると、 B<epoll_wait>() は無限に停止する。\n"
1739 "I<timeout> を 0 に指定すると、 B<epoll_wait>() は利用可能なイベントが\n"
1743 #: build/C/man2/epoll_wait.2:70
1744 msgid "The I<struct epoll_event> is defined as :"
1745 msgstr "I<struct epoll_event> は以下のように定義される:"
1748 #: build/C/man2/epoll_wait.2:79
1751 "typedef union epoll_data {\n"
1758 "typedef union epoll_data {\n"
1766 #: build/C/man2/epoll_wait.2:84
1769 "struct epoll_event {\n"
1770 " uint32_t events; /* Epoll events */\n"
1771 " epoll_data_t data; /* User data variable */\n"
1774 "struct epoll_event {\n"
1775 " uint32_t events; /* epoll イベント */\n"
1776 " epoll_data_t data; /* ユーザデータ変数 */\n"
1780 #: build/C/man2/epoll_wait.2:95
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."
1786 "返される構造体の I<data> メンバには、ユーザが B<epoll_ctl>(2) "
1787 "(B<EPOLL_CTL_ADD>, B<EPOLL_CTL_MOD>) で指定したデータが格納される。 一方、 "
1788 "I<events> メンバには返された利用可能なイベントのビットフィールドが格納され"
1792 #: build/C/man2/epoll_wait.2:95
1794 msgid "epoll_pwait()"
1795 msgstr "epoll_pwait()"
1798 #: build/C/man2/epoll_wait.2:109
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."
1805 "B<epoll_wait>() と B<epoll_pwait>() の関係は、 B<select>(2) と B<pselect>"
1806 "(2) の関係と同様である。 B<pselect>(2) 同様、 B<epoll_pwait>() を使うと、"
1807 "アプリケーションは、ファイルディスクリプタが準備できた状態になるか、 シグナル"
1808 "が捕捉されるまで、安全に待つことができる。"
1811 #: build/C/man2/epoll_wait.2:113
1812 msgid "The following B<epoll_pwait>() call:"
1813 msgstr "以下の B<epoll_pwait>() の呼び出しは、"
1816 #: build/C/man2/epoll_wait.2:116
1818 msgid " ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
1819 msgstr " ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
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> に実行するのと等価である。"
1827 #: build/C/man2/epoll_wait.2:124
1829 msgid " sigset_t origmask;\n"
1830 msgstr " sigset_t origmask;\n"
1833 #: build/C/man2/epoll_wait.2:128
1836 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
1837 " ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
1838 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
1840 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
1841 " ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
1842 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
1845 #: build/C/man2/epoll_wait.2:136
1847 "The I<sigmask> argument may be specified as NULL, in which case "
1848 "B<epoll_pwait>() is equivalent to B<epoll_wait>()."
1850 "I<sigmask> 引き数には NULL を指定してもよい。 その場合には、 B<epoll_pwait>"
1851 "() は B<epoll_wait>() と等価となる。"
1854 #: build/C/man2/epoll_wait.2:148
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."
1861 "成功した場合、 B<epoll_wait>() は要求された I/O に対して準備ができているファ"
1862 "イルディスクリプタの数を返す。 また要求された I<timeout> ミリ秒の間にファイル"
1863 "ディスクリプタが準備できない場合は、0 を返す。 エラーが起こった場合、 "
1864 "B<epoll_wait>() は -1 を返し、 I<errno> を適切に設定する。"
1867 #: build/C/man2/epoll_wait.2:153
1868 msgid "I<epfd> is not a valid file descriptor."
1869 msgstr "I<epfd> が有効なファイルディスクリプタでない。"
1872 #: build/C/man2/epoll_wait.2:153 build/C/man2/poll.2:286
1878 #: build/C/man2/epoll_wait.2:158
1880 "The memory area pointed to by I<events> is not accessible with write "
1882 msgstr "I<events> で指されるメモリ領域に書き込み権限でアクセスできない。"
1885 #: build/C/man2/epoll_wait.2:158 build/C/man2/poll.2:290
1891 #: build/C/man2/epoll_wait.2:165
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)."
1896 "要求されたどのイベントも発生せず、かつ I<timeout> の期限が切れる前に、システ"
1897 "ムコールがシグナルハンドラによって割り込まれた。 B<signal>(7) 参照。"
1900 #: build/C/man2/epoll_wait.2:173
1902 "I<epfd> is not an B<epoll> file descriptor, or I<maxevents> is less than or "
1905 "I<epfd> が B<epoll> ファイルディスクリプタでない。 または I<maxevents> が 0 "
1908 #. To be precise: kernel 2.5.44.
1909 #. The interface should be finalized by Linux kernel 2.5.66.
1911 #: build/C/man2/epoll_wait.2:179
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."
1916 "B<epoll_wait>() はカーネル 2.6 で追加された。\n"
1917 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1920 #: build/C/man2/epoll_wait.2:183
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."
1925 "B<epoll_pwait>() はカーネル 2.6.19 で Linux に追加された。\n"
1926 "ライブラリによるサポートは glibc バージョン 2.6 以降で提供されている。"
1929 #: build/C/man2/epoll_wait.2:186
1930 msgid "B<epoll_wait>() is Linux-specific."
1931 msgstr "B<epoll_wait>() は Linux 独自である。"
1934 #: build/C/man2/epoll_wait.2:196
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."
1941 "あるスレッドが B<epoll_pwait>() を呼び出して停止されている間に、\n"
1942 "別のスレッドが wait 中の B<epoll> インストールにファイルディスクリプタを\n"
1943 "追加することがある。新しいファイルディスクリプタでイベントが発生すると、\n"
1944 "B<epoll_wait>() の呼び出しによる停止が解除されることになる。"
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)"
1952 #: build/C/man2/poll.2:31
1958 #: build/C/man2/poll.2:34
1959 msgid "poll, ppoll - wait for some event on a file descriptor"
1960 msgstr "poll, ppoll - ファイルディスクリプタにおけるイベントを待つ"
1963 #: build/C/man2/poll.2:37
1965 msgid "B<#include E<lt>poll.hE<gt>>\n"
1966 msgstr "B<#include E<lt>poll.hE<gt>>\n"
1969 #: build/C/man2/poll.2:39
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"
1975 #: build/C/man2/poll.2:42
1978 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
1979 "B<#include E<lt>poll.hE<gt>>\n"
1981 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
1982 "B<#include E<lt>poll.hE<gt>>\n"
1985 #: build/C/man2/poll.2:45
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"
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"
1995 #: build/C/man2/poll.2:52
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."
2000 "B<poll>() は B<select>(2) と同様の仕事を行う、つまり、ファイルディスクリプ"
2001 "タ集合のいずれか一つが I/O を実行可能な状態になるのを待つ。"
2004 #: build/C/man2/poll.2:56
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:"
2009 "監視するファイルディスクリプタ集合は、 I<fds> 引き数で指定する。 I<fds> は、"
2013 #: build/C/man2/poll.2:64
2017 " int fd; /* file descriptor */\n"
2018 " short events; /* requested events */\n"
2019 " short revents; /* returned events */\n"
2023 " int fd; /* file descriptor */\n"
2024 " short events; /* requested events */\n"
2025 " short revents; /* returned events */\n"
2029 #: build/C/man2/poll.2:71
2031 "The caller should specify the number of items in the I<fds> array in I<nfds>."
2032 msgstr "I<nfds> には、 I<fds> 配列の要素数を指定する。"
2035 #: build/C/man2/poll.2:86
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.)"
2042 "I<fd> フィールドには、オープンされたファイルのファイルディスクリプタが入る。\n"
2043 "このフィールドが負の場合、対応する I<events> フィールドは無視され、\n"
2044 "I<revents> には 0 が返される。(この機能により、一つの B<poll>() の呼び出しで\n"
2045 "簡単にあるファイルディスクリプタを無視することができる。\n"
2046 "単に I<fd> フィールドの符号を反転するだけでよい。)"
2049 #: build/C/man2/poll.2:98
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."
2056 "構造体の I<events> 要素は入力パラメータで、\n"
2057 "ファイルディスクリプタ I<fd> に関して、\n"
2058 "アプリケーションが興味を持っているイベントのビットマスクを指定する。\n"
2059 "このフィールドに 0 が指定された場合は、I<fd> の全てのイベントが無視され、\n"
2060 "I<revents> には 0 が返される。"
2063 #: build/C/man2/poll.2:117
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.)"
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> に設定される)。"
2079 #: build/C/man2/poll.2:122
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."
2084 "どのファイルディスクリプタにも要求したイベントが発生しておらず、 エラーも起こ"
2085 "らない場合、 B<poll>() はイベントのうちいずれか一つが発生するまで停止 "
2089 #: build/C/man2/poll.2:131
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."
2095 "I<timeout> 引き数は B<poll>() が停止する時間の上限を設定するもので、ミリ秒単"
2096 "位で指定する。 I<timeout> に負の値を指定すると、タイムアウト時間が無限とな"
2100 #: build/C/man2/poll.2:137
2102 "The bits that may be set/returned in I<events> and I<revents> are defined in "
2103 "I<E<lt>poll.hE<gt>>:"
2105 "I<events> に指定したり、 I<revents> で返されるビットは I<E<lt>poll.hE<gt>> で"
2109 #: build/C/man2/poll.2:138
2115 #: build/C/man2/poll.2:141
2116 msgid "There is data to read."
2117 msgstr "読み出し可能なデータがある。"
2120 #: build/C/man2/poll.2:141
2126 #: build/C/man2/poll.2:145
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)."
2131 "読み出し可能な緊急データ (urgent data) がある (例えば、TCP ソケットの帯域外 "
2132 "(out-of-band data) データを受信した場合や、 パケットモードの擬似端末のマスタ"
2133 "がスレーブ側の変化を見つけたとき)。"
2136 #: build/C/man2/poll.2:145
2142 #: build/C/man2/poll.2:148
2143 msgid "Writing now will not block."
2144 msgstr "書き込みが停止 (block) しない状態である。"
2147 #: build/C/man2/poll.2:148
2149 msgid "B<POLLRDHUP> (since Linux 2.6.17)"
2150 msgstr "B<POLLRDHUP> (Linux 2.6.17 以降)"
2153 #: build/C/man2/poll.2:159
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."
2159 "ストリームソケットの他端が、コネクションを close したか、 コネクションの書き"
2160 "込み側を shutdown した。 この定義を有効にするには、 (「どの」ヘッダファイルを"
2161 "インクルードするよりも前に) B<_GNU_SOURCE> 機能検査マクロを定義しなければな"
2165 #: build/C/man2/poll.2:159
2171 #: build/C/man2/poll.2:162
2172 msgid "Error condition (output only)."
2173 msgstr "エラー状態 (出力の場合のみ)。"
2176 #: build/C/man2/poll.2:162
2182 #: build/C/man2/poll.2:165
2183 msgid "Hang up (output only)."
2184 msgstr "ハングアップした (出力の場合のみ)。"
2187 #: build/C/man2/poll.2:165
2190 msgstr "B<POLLNVAL>"
2193 #: build/C/man2/poll.2:170
2194 msgid "Invalid request: I<fd> not open (output only)."
2195 msgstr "不正な要求: I<fd> がオープンされていない (出力の場合のみ)。"
2198 #: build/C/man2/poll.2:176
2200 "When compiling with B<_XOPEN_SOURCE> defined, one also has the following, "
2201 "which convey no further information beyond the bits listed above:"
2203 "B<_XOPEN_SOURCE> を定義してコンパイルした場合には、以下の定義も行われる。 た"
2204 "だし、上記のリストにあるビット以上の情報が得られる訳ではない。"
2207 #: build/C/man2/poll.2:177
2209 msgid "B<POLLRDNORM>"
2210 msgstr "B<POLLRDNORM>"
2213 #: build/C/man2/poll.2:181
2214 msgid "Equivalent to B<POLLIN>."
2215 msgstr "B<POLLIN> と同じ。"
2218 #: build/C/man2/poll.2:181
2220 msgid "B<POLLRDBAND>"
2221 msgstr "B<POLLRDBAND>"
2223 #. POLLRDBAND is used in the DECnet protocol.
2225 #: build/C/man2/poll.2:185
2226 msgid "Priority band data can be read (generally unused on Linux)."
2228 "優先帯域データ (priority band data) が読み出し可能である (普通は Linux では使"
2232 #: build/C/man2/poll.2:185
2234 msgid "B<POLLWRNORM>"
2235 msgstr "B<POLLWRNORM>"
2238 #: build/C/man2/poll.2:189
2239 msgid "Equivalent to B<POLLOUT>."
2240 msgstr "B<POLLOUT> と同じ。"
2243 #: build/C/man2/poll.2:189
2245 msgid "B<POLLWRBAND>"
2246 msgstr "B<POLLWRBAND>"
2249 #: build/C/man2/poll.2:192
2250 msgid "Priority data may be written."
2251 msgstr "優先帯域データ (priority data) が書き込み可能である。"
2254 #: build/C/man2/poll.2:196
2255 msgid "Linux also knows about, but does not use B<POLLMSG>."
2256 msgstr "Linux では B<POLLMSG> も定義されているが、使用されていない。"
2259 #: build/C/man2/poll.2:196
2265 #: build/C/man2/poll.2:210
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."
2272 "B<poll>() と B<ppoll>() の関係は B<select>(2) と B<pselect>(2) の関係と同"
2273 "じようなものである: B<pselect>(2) と同様に、 B<ppoll>() を使うと、アプリ"
2274 "ケーションはファイルディスクリプタの状態変化 もしくはシグナルの捕捉を安全に待"
2278 #: build/C/man2/poll.2:216
2280 "Other than the difference in the precision of the I<timeout> argument, the "
2281 "following B<ppoll>() call:"
2283 "I<timeout> 引き数の精度の違いを除くと、以下の B<ppoll>() の呼び出しは、"
2286 #: build/C/man2/poll.2:219
2288 msgid " ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2289 msgstr " ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2292 #: build/C/man2/poll.2:228
2295 " sigset_t origmask;\n"
2298 " sigset_t origmask;\n"
2302 #: build/C/man2/poll.2:234
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"
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"
2318 #: build/C/man2/poll.2:241
2320 "See the description of B<pselect>(2) for an explanation of why B<ppoll>() "
2323 "なぜ B<ppoll>() が必要なのかについての説明は B<pselect>(2) の説明を参照のこ"
2327 #: build/C/man2/poll.2:253
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)."
2333 "I<sigmask> 引き数に NULL が指定された場合、シグナルマスクの操作は行われない "
2334 "(したがって、 B<ppoll>() の B<poll>() との違いは I<timeout> 引き数の精度だ"
2338 #: build/C/man2/poll.2:260
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:"
2344 "I<timeout> 引き数は B<ppoll>() が停止する時間の上限を指定するものである。 こ"
2345 "の引き数には以下の型の構造体へのポインタを指定する。"
2348 #: build/C/man2/poll.2:267
2351 "struct timespec {\n"
2352 " long tv_sec; /* seconds */\n"
2353 " long tv_nsec; /* nanoseconds */\n"
2356 "struct timespec {\n"
2357 " long tv_sec; /* seconds */\n"
2358 " long tv_nsec; /* nanoseconds */\n"
2362 #: build/C/man2/poll.2:275
2364 "If I<timeout_ts> is specified as NULL, then B<ppoll>() can block "
2367 "I<timeout_ts> に NULL が指定された場合、 B<ppoll> は無限に停止することがあり"
2371 #: build/C/man2/poll.2:285
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."
2379 "成功した場合は正の数を返す。この数は 0 以外の I<revents> 要素を持つ構造体の数"
2380 "である (別の言い方をすると、これらのディスクリプタ にはイベントかエラー報告が"
2381 "ある)。 値 0 は、タイムアウトとなり、どのファイルディスクリプタでもイベント"
2382 "が 発生しなかったことを示す。エラーの場合は -1 が返され、 I<errno> が適切に設"
2386 #: build/C/man2/poll.2:290
2388 "The array given as argument was not contained in the calling program's "
2391 "引き数として指定した配列が、呼び出したプロセスのアドレス空間に 含まれていな"
2395 #: build/C/man2/poll.2:294
2396 msgid "A signal occurred before any requested event; see B<signal>(7)."
2398 "要求されたイベントのどれかが起こる前にシグナルが発生した。 B<signal>(7) 参"
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> を超えた。"
2407 #: build/C/man2/poll.2:304
2408 msgid "There was no space to allocate file descriptor tables."
2409 msgstr "ファイルディスクリプタ・テーブルを確保するためのメモリがない。"
2412 #: build/C/man2/poll.2:317
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)."
2418 "B<poll>() システムコールは Linux 2.1.23 で導入された。 B<poll>() ライブラ"
2419 "リ・コールは libc 5.4.28 から導入された (これはカーネルが B<poll>() システム"
2420 "コールをサポートしていない場合に B<select>(2) を使用してエミュレートを行"
2424 #: build/C/man2/poll.2:324
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."
2429 "B<ppoll>() システムコールは カーネル 2.6.16 で Linux に追加された。 B<ppoll>"
2430 "() ライブラリコールは glibc 2.4 に追加された。"
2432 #. NetBSD 3.0 has a pollts() which is like Linux ppoll().
2434 #: build/C/man2/poll.2:330
2435 msgid "B<poll>() conforms to POSIX.1-2001. B<ppoll>() is Linux-specific."
2437 "B<poll>() は POSIX.1-2001 に準拠している。 B<ppoll>() は Linux 固有である。"
2440 #: build/C/man2/poll.2:338
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."
2446 "いくつかの実装では、値 -1 を持った非標準の定数 B<INFTIM> が定義されており、 "
2447 "B<poll>() の I<timeout> の指定に使用できる。 この定数は glibc では定義されて"
2451 #: build/C/man2/poll.2:338
2457 #: build/C/man2/poll.2:352
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."
2464 "Linux の B<ppoll>() システムコールは I<timeout_ts> 引き数を変更する。 しか"
2465 "し、glibc のラッパー関数は、システムコールに渡す timeout 引き数 としてローカ"
2466 "ル変数を使うことでこの動作を隠蔽している。 このため、glibc の B<ppoll>() 関"
2467 "数では I<timeout_ts> 引き数は変更されない。"
2470 #: build/C/man2/poll.2:356
2472 "See the discussion of spurious readiness notifications under the BUGS "
2473 "section of B<select>(2)."
2475 "B<select>(2) の「バグ」の節に書かれている、誤った準備完了通知 (spurious "
2476 "readiness notifications) についての議論を参照のこと。"
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)"
2483 #~ msgid "Finally, the actual wait is started by B<epoll_wait>(2)."
2484 #~ msgstr "最後に B<epoll_wait>(2) で実際のイベント待ちを開始する。"
2487 #~ msgstr "この文書について"
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/."
2494 #~ "この man ページは Linux I<man-pages> プロジェクトのリリース 3.38 の一部で"
2496 #~ "プロジェクトの説明とバグ報告に関する情報は\n"
2497 #~ "http://www.kernel.org/doc/man-pages/ に書かれている。"
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.)"
2506 #~ "B<epoll_create>() は、 I<size> 個のディスクリプタを保持できる大きさの\n"
2507 #~ "イベントバッキングストアの割り当てをカーネルに対して要求することにより、\n"
2508 #~ "epoll 「インスタンス」を作成する。 I<size> はバッキングストアの最大サイ\n"
2509 #~ "ズではなく、内部構造の大きさをどの位にするかをカーネルに知らせるヒント\n"
2510 #~ "でしかない。 (現在は I<size> は使用されない。下記の「注意」を参照。)"
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.)"
2517 #~ "Linux 2.6.8 以降では、 I<size> 引き数は使用されないが、 0 より大きくなけれ"
2519 #~ "(カーネルは、動的に必要なデータ構造の大きさを決定し、 最初のヒントを必要し"
2522 #~ msgid "The field I<fd> contains a file descriptor for an open file."
2524 #~ "構造体の I<fd> にはオープンしたファイルのファイルディスクリプタを入れる。"
2527 #~ "Glibc support for B<epoll_pwait>() is provided starting with version 2.6."
2529 #~ "B<epoll_pwait>() の glibc でのサポートは glibc 2.6 以降で提供されている。"