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: 2015-01-23 22:24+0900\n"
10 "PO-Revision-Date: 2015-01-25 07:15+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
31 #: build/C/man7/epoll.7:21 build/C/man2/epoll_create.2:24
32 #: build/C/man2/epoll_ctl.2:20 build/C/man2/epoll_wait.2:22
33 #: build/C/man2/poll.2:31
39 #: build/C/man7/epoll.7:21 build/C/man2/epoll_create.2:24
40 #: build/C/man2/epoll_ctl.2:20 build/C/man2/epoll_wait.2:22
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:25
48 #: build/C/man2/epoll_ctl.2:21 build/C/man2/epoll_wait.2:23
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:27
61 #: build/C/man2/epoll_ctl.2:23 build/C/man2/epoll_wait.2:25
62 #: build/C/man2/poll.2:34
68 #: build/C/man7/epoll.7:26 build/C/man2/epoll_ctl.2:25
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:34
74 #: build/C/man2/epoll_ctl.2:28 build/C/man2/epoll_wait.2:35
75 #: build/C/man2/poll.2:47
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 は、エッジトリガーインターフェースとレベルトリガーインターフェー"
94 "いずれとしても使用することができ、監視するファイルディスクリプターの数が多"
96 "場合にも使用できる。 B<epoll> インスタンスの作成や管理を行うために\n"
100 #: build/C/man7/epoll.7:40 build/C/man7/epoll.7:49 build/C/man7/epoll.7:57
101 #: build/C/man2/epoll_wait.2:59 build/C/man2/epoll_wait.2:61
102 #: build/C/man2/epoll_wait.2:63 build/C/man2/poll.2:134
103 #: build/C/man2/poll.2:136 build/C/man2/poll.2:138
109 #: build/C/man7/epoll.7:49
111 "B<epoll_create>(2) creates an B<epoll> instance and returns a file "
112 "descriptor referring to that instance. (The more recent "
113 "B<epoll_create1>(2) extends the functionality of B<epoll_create>(2).)"
115 "B<epoll_create>(2) は B<epoll> インスタンスを作成し、そのインスタンスを参照す"
117 "ファイルディスクリプターを返す。(もっと新しい B<epoll_create1>(2) では、\n"
118 "B<epoll_create>(2) の機能が拡張されている)。"
121 #: build/C/man7/epoll.7:57
123 "Interest in particular file descriptors is then registered via "
124 "B<epoll_ctl>(2). The set of file descriptors currently registered on an "
125 "B<epoll> instance is sometimes called an I<epoll> set."
127 "特定のファイルディスクリプターに対する監視内容を B<epoll_ctl>(2) で登録す"
128 "る。 B<epoll> インスタンスに現在登録されているファイルディスクリプターの集合"
129 "は I<epoll> 集合と呼ばれることもある。"
132 #: build/C/man7/epoll.7:61
134 "B<epoll_wait>(2) waits for I/O events, blocking the calling thread if no "
135 "events are currently available."
137 "B<epoll_wait>(2) は I/O イベントを待つ。\n"
138 "現在利用可能な状態のイベントがなければ、呼び出したスレッドを停止する。"
141 #: build/C/man7/epoll.7:61
143 msgid "Level-triggered and edge-triggered"
144 msgstr "レベルトリガーとエッジトリガー"
147 #: build/C/man7/epoll.7:70
149 "The B<epoll> event distribution interface is able to behave both as edge-"
150 "triggered (ET) and as level-triggered (LT). The difference between the two "
151 "mechanisms can be described as follows. Suppose that this scenario happens:"
153 "B<epoll> イベント配送 (distribution) インターフェースは、 エッジトリガー "
154 "(ET) としてもレベルトリガー (LT) としても動作させることができる。 二つの配送"
155 "機構の違いは、次のように説明できる。 このようなシナリオが起こったとしよう:"
158 #: build/C/man7/epoll.7:70
164 #: build/C/man7/epoll.7:76
166 "The file descriptor that represents the read side of a pipe (I<rfd>) is "
167 "registered on the B<epoll> instance."
169 "パイプの読み込み側を表すファイルディスクリプター (I<rfd>) が B<epoll> インス"
173 #: build/C/man7/epoll.7:76
179 #: build/C/man7/epoll.7:78
180 msgid "A pipe writer writes 2 kB of data on the write side of the pipe."
182 "パイプへ書き込むプログラムが 2 kB のデータをパイプの書き込み側へ書き込む。"
185 #: build/C/man7/epoll.7:78
191 #: build/C/man7/epoll.7:84
193 "A call to B<epoll_wait>(2) is done that will return I<rfd> as a ready file "
196 "B<epoll_wait>(2) を呼び出すと、読み込み可能 (ready) なファイルディスクリプ"
200 #: build/C/man7/epoll.7:84
206 #: build/C/man7/epoll.7:87
207 msgid "The pipe reader reads 1 kB of data from I<rfd>."
208 msgstr "パイプから読み出すプログラムが、1 kB のデータを I<rfd> から読み出す。"
211 #: build/C/man7/epoll.7:87
217 #: build/C/man7/epoll.7:91
218 msgid "A call to B<epoll_wait>(2) is done."
219 msgstr "B<epoll_wait>(2) の呼び出しが行われる。"
222 #: build/C/man7/epoll.7:126
224 "If the I<rfd> file descriptor has been added to the B<epoll> interface using "
225 "the B<EPOLLET> (edge-triggered) flag, the call to B<epoll_wait>(2) done in "
226 "step B<5> will probably hang despite the available data still present in the "
227 "file input buffer; meanwhile the remote peer might be expecting a response "
228 "based on the data it already sent. The reason for this is that edge-"
229 "triggered mode delivers events only when changes occur on the monitored file "
230 "descriptor. So, in step B<5> the caller might end up waiting for some data "
231 "that is already present inside the input buffer. In the above example, an "
232 "event on I<rfd> will be generated because of the write done in B<2> and the "
233 "event is consumed in B<3>. Since the read operation done in B<4> does not "
234 "consume the whole buffer data, the call to B<epoll_wait>(2) done in step "
235 "B<5> might block indefinitely."
237 "I<rfd> ファイルディスクリプターが B<EPOLLET> フラグ (エッジトリガー) を使っ"
238 "て B<epoll> に追加されていると、 利用可能なデータがファイル入力バッファーにま"
239 "だ存在するにもかかわらず ステップ B<5> の B<epoll_wait>(2) の呼び出しでハン"
240 "グする可能性がある。 その一方で、リモートの接続先 (peer) は既に送られたデータ"
241 "に 基づいて応答を期待しているかもしれない。 このようなことが起こる理由は、"
242 "エッジトリガーイベント配送では、 モニタしているファイルでイベントが起ったとき"
243 "にのみイベントが 配送されるためである。 したがって、ステップ B<5> では、呼び"
244 "出し側は結果的に 入力バッファー内にすで存在するデータを待つことになるかもしれ"
245 "ない。 上記の例では、 B<2> で行われた書き込みによって I<rfd> に関するイベント"
246 "が生成され、 B<3> でイベントが消費 (consume) される。 B<4> で行われる読み込み"
247 "操作では、全部のバッファーデータを消費しないので、 ステップ B<5> で行われる "
248 "B<epoll_wait>(2) の呼び出しが 無期限に停止 (block) するかもしれない。"
251 #: build/C/man7/epoll.7:136
253 "An application that employs the B<EPOLLET> flag should use nonblocking file "
254 "descriptors to avoid having a blocking read or write starve a task that is "
255 "handling multiple file descriptors. The suggested way to use B<epoll> as an "
256 "edge-triggered (B<EPOLLET>) interface is as follows:"
258 "B<EPOLLET> フラグを採用するアプリケーションでは、 インターフェースはブロック"
259 "しない (nonblocking) ファイルディスクリプターを 使うべきである。 これは、ブ"
260 "ロックされる読み込みや書き込みによって、 複数のファイルディスクリプターを扱う"
261 "タスクが 停止してしまうのを避けるためである。 B<epoll> をエッジトリガー "
262 "(B<EPOLLET>) インターフェースとして使うために提案される方法は以下の通りであ"
266 #: build/C/man7/epoll.7:137
272 #: build/C/man7/epoll.7:140
273 msgid "with nonblocking file descriptors; and"
274 msgstr "ブロックしないファイルディスクリプターと共に使う。"
277 #: build/C/man7/epoll.7:140
283 #: build/C/man7/epoll.7:148
285 "by waiting for an event only after B<read>(2) or B<write>(2) return "
288 "B<read>(2) または B<write>(2) が B<EAGAIN> を返した後でのみ、イベントを待"
292 #: build/C/man7/epoll.7:159
294 "By contrast, when used as a level-triggered interface (the default, when "
295 "B<EPOLLET> is not specified), B<epoll> is simply a faster B<poll>(2), and "
296 "can be used wherever the latter is used since it shares the same semantics."
298 "一方、レベルトリガーインターフェースとして使う場合\n"
300 "B<EPOLLET> が指定されなかった場合)、\n"
301 "B<epoll> は単に高速な B<poll>(2) であり、使い方が同じなので、\n"
302 "B<poll>(2) が使われているところではどこでも使用することができる。"
305 #: build/C/man7/epoll.7:176
307 "Since even with edge-triggered B<epoll>, multiple events can be generated "
308 "upon receipt of multiple chunks of data, the caller has the option to "
309 "specify the B<EPOLLONESHOT> flag, to tell B<epoll> to disable the associated "
310 "file descriptor after the receipt of an event with B<epoll_wait>(2). When "
311 "the B<EPOLLONESHOT> flag is specified, it is the caller's responsibility to "
312 "rearm the file descriptor using B<epoll_ctl>(2) with B<EPOLL_CTL_MOD>."
314 "エッジトリガーを使った場合でも、複数のデータを受信すると複数の B<epoll> イベ"
315 "ントが生成されるので、 呼び出し側には B<EPOLLONESHOT> フラグを指定するオプ"
316 "ションがある。 このフラグは B<epoll> に対して、 B<epoll_wait>(2) によるイベ"
317 "ントを受信した後で、関連するファイルディスクリプターを無効にさせる。 "
318 "B<EPOLLONESHOT> フラグが指定された場合、 B<epoll_ctl>(2) に "
319 "B<EPOLL_CTL_MOD> を指定してファイルディスクリプターを再度使用できるようにする"
323 #: build/C/man7/epoll.7:176
325 msgid "Interaction with autosleep"
326 msgstr "autosleep との関係"
329 #: build/C/man7/epoll.7:188
331 "If the system is in B<autosleep> mode via I</sys/power/autosleep> and an "
332 "event happens which wakes the device from sleep, the device driver will only "
333 "keep the device awake until that event is queued. To keep the device awake "
334 "until the event has been processed, it is necessary to use the B<epoll>(7) "
335 "B<EPOLLWAKEUP> flag."
337 "システムが I</sys/power/autosleep> 経由で B<autosleep> モードになっていて、 "
338 "デバイスをスリープ状態から起こすイベントが発生した場合、 そのイベントがキュー"
339 "に入るまでは、デバイスドライバーはデバイスを起こしたままにしておくだけであ"
340 "る。 イベントが処理されるまでデバイスを起こしたままにしておくには、 "
341 "B<epoll>(7) B<EPOLLWAKEUP> フラグを使う必要がある。"
344 #: build/C/man7/epoll.7:207
346 "When the B<EPOLLWAKEUP> flag is set in the B<events> field for a I<struct "
347 "epoll_event>, the system will be kept awake from the moment the event is "
348 "queued, through the B<epoll_wait>(2) call which returns the event until the "
349 "subsequent B<epoll_wait>(2) call. If the event should keep the system "
350 "awake beyond that time, then a separate I<wake_lock> should be taken before "
351 "the second B<epoll_wait>(2) call."
353 "B<EPOLLWAKEUP> フラグが I<struct epoll_event> の B<events> フィールドでセット"
354 "された場合、 イベントがキューに入った瞬間から、B<epoll_wait>(2) がそのイベン"
355 "トを返し次の B<epoll_wait>(2) の呼び出しが行われるまでの間、システムは起きた"
356 "ままの状態になる。 イベントが上記の時間の範囲を超えてシステムを起きたままの状"
357 "態にしておく必要がある場合は、 2 番目の B<epoll_wait>(2) の呼び出しの前に別"
358 "の I<wake_lock> を取る必要がある。"
361 #: build/C/man7/epoll.7:207
363 msgid "/proc interfaces"
364 msgstr "/proc インターフェース"
366 #. Following was added in 2.6.28, but them removed in 2.6.29
368 #. .IR /proc/sys/fs/epoll/max_user_instances " (since Linux 2.6.28)"
369 #. This specifies an upper limit on the number of epoll instances
370 #. that can be created per real user ID.
372 #: build/C/man7/epoll.7:215
374 "The following interfaces can be used to limit the amount of kernel memory "
377 "epoll が消費するカーネルメモリーの量を制限するために、 以下のインターフェース"
381 #: build/C/man7/epoll.7:215
383 msgid "I</proc/sys/fs/epoll/max_user_watches> (since Linux 2.6.28)"
384 msgstr "I</proc/sys/fs/epoll/max_user_watches> (Linux 2.6.28 以降)"
386 #. 2.6.29 (in 2.6.28, the default was 1/32 of lowmem)
388 #: build/C/man7/epoll.7:229
390 "This specifies a limit on the total number of file descriptors that a user "
391 "can register across all epoll instances on the system. The limit is per "
392 "real user ID. Each registered file descriptor costs roughly 90 bytes on a "
393 "32-bit kernel, and roughly 160 bytes on a 64-bit kernel. Currently, the "
394 "default value for I<max_user_watches> is 1/25 (4%) of the available low "
395 "memory, divided by the registration cost in bytes."
397 "このファイルは、あるユーザーがシステム上の全ての epoll インスタンスに 登録で"
398 "きるファイルディスクリプターの総数の上限を規定する。 この上限は実ユーザー ID "
399 "単位である。 登録されたファイルディスクリプター 1 つが消費するメモリー量は、 "
400 "32 ビットカーネルでおよそ 90 バイト、 64 ビットカーネルでおよそ 160 バイトで"
401 "ある。 現在のところ、 I<max_user_watches> のデフォルト値は、利用可能なメモ"
402 "リー下限の 1/25 (4%) であり、 登録で消費されるメモリー量 (バイト単位) で割っ"
406 #: build/C/man7/epoll.7:229
408 msgid "Example for suggested usage"
412 #: build/C/man7/epoll.7:258
414 "While the usage of B<epoll> when employed as a level-triggered interface "
415 "does have the same semantics as B<poll>(2), the edge-triggered usage "
416 "requires more clarification to avoid stalls in the application event loop. "
417 "In this example, listener is a nonblocking socket on which B<listen>(2) has "
418 "been called. The function I<do_use_fd()> uses the new ready file descriptor "
419 "until B<EAGAIN> is returned by either B<read>(2) or B<write>(2). An event-"
420 "driven state machine application should, after having received B<EAGAIN>, "
421 "record its current state so that at the next call to I<do_use_fd()> it will "
422 "continue to B<read>(2) or B<write>(2) from where it stopped before."
424 "レベルトリガーインターフェースとして使用するときの B<epoll> の使い方は "
425 "B<poll>(2) と同じである。 しかしエッジトリガーとして使う場合は、 アプリケー"
426 "ションのイベントループでストール (stall) しないように、 使い方をより明確にし"
427 "ておく必要がある。 この例では、リスナはブロックしないソケットであり、 "
428 "B<listen>(2) が呼ばれている。 関数 I<do_use_fd()> は、 B<read>(2) または "
429 "B<write>(2) によって B<EAGAIN> が返されるまでは、新しい準備済みのファイル"
430 "ディスクリプターを使う。 イベント駆動ステートマシンアプリケーションは、 "
431 "B<EAGAIN> を受信した後、カレントの状態を記録しておくべきである。 これにより、"
432 "次の I<do_use_fd()> 呼び出しのときに、以前に停止したところから B<read>(2) ま"
433 "たは B<write>(2) を継続することができる。"
436 #: build/C/man7/epoll.7:264
439 "#define MAX_EVENTS 10\n"
440 "struct epoll_event ev, events[MAX_EVENTS];\n"
441 "int listen_sock, conn_sock, nfds, epollfd;\n"
443 "#define MAX_EVENTS 10\n"
444 "struct epoll_event ev, events[MAX_EVENTS];\n"
445 "int listen_sock, conn_sock, nfds, epollfd;\n"
448 #: build/C/man7/epoll.7:267
451 "/* Code to set up listening socket, \\(aqlisten_sock\\(aq,\n"
452 " (socket(), bind(), listen()) omitted */\n"
454 "/* Code to set up listening socket, \\(aqlisten_sock\\(aq,\n"
455 " (socket(), bind(), listen()) omitted */\n"
458 #: build/C/man7/epoll.7:273
461 "epollfd = epoll_create1(0);\n"
462 "if (epollfd == -1) {\n"
463 " perror(\"epoll_create1\");\n"
464 " exit(EXIT_FAILURE);\n"
467 "epollfd = epoll_create1(0);\n"
468 "if (epollfd == -1) {\n"
469 " perror(\"epoll_create1\");\n"
470 " exit(EXIT_FAILURE);\n"
474 #: build/C/man7/epoll.7:280
477 "ev.events = EPOLLIN;\n"
478 "ev.data.fd = listen_sock;\n"
479 "if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n"
480 " perror(\"epoll_ctl: listen_sock\");\n"
481 " exit(EXIT_FAILURE);\n"
484 "ev.events = EPOLLIN;\n"
485 "ev.data.fd = listen_sock;\n"
486 "if (epoll_ctl(epollfd, EPOLL_CTL_ADD, listen_sock, &ev) == -1) {\n"
487 " perror(\"epoll_ctl: listen_sock\");\n"
488 " exit(EXIT_FAILURE);\n"
492 #: build/C/man7/epoll.7:287
496 " nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n"
497 " if (nfds == -1) {\n"
498 " perror(\"epoll_pwait\");\n"
499 " exit(EXIT_FAILURE);\n"
503 " nfds = epoll_wait(epollfd, events, MAX_EVENTS, -1);\n"
504 " if (nfds == -1) {\n"
505 " perror(\"epoll_pwait\");\n"
506 " exit(EXIT_FAILURE);\n"
510 #: build/C/man7/epoll.7:309
513 " for (n = 0; n E<lt> nfds; ++n) {\n"
514 " if (events[n].data.fd == listen_sock) {\n"
515 " conn_sock = accept(listen_sock,\n"
516 " (struct sockaddr *) &local, &addrlen);\n"
517 " if (conn_sock == -1) {\n"
518 " perror(\"accept\");\n"
519 " exit(EXIT_FAILURE);\n"
521 " setnonblocking(conn_sock);\n"
522 " ev.events = EPOLLIN | EPOLLET;\n"
523 " ev.data.fd = conn_sock;\n"
524 " if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n"
526 " perror(\"epoll_ctl: conn_sock\");\n"
527 " exit(EXIT_FAILURE);\n"
530 " do_use_fd(events[n].data.fd);\n"
535 " for (n = 0; n E<lt> nfds; ++n) {\n"
536 " if (events[n].data.fd == listen_sock) {\n"
537 " conn_sock = accept(listen_sock,\n"
538 " (struct sockaddr *) &local, &addrlen);\n"
539 " if (conn_sock == -1) {\n"
540 " perror(\"accept\");\n"
541 " exit(EXIT_FAILURE);\n"
543 " setnonblocking(conn_sock);\n"
544 " ev.events = EPOLLIN | EPOLLET;\n"
545 " ev.data.fd = conn_sock;\n"
546 " if (epoll_ctl(epollfd, EPOLL_CTL_ADD, conn_sock,\n"
548 " perror(\"epoll_ctl: conn_sock\");\n"
549 " exit(EXIT_FAILURE);\n"
552 " do_use_fd(events[n].data.fd);\n"
558 #: build/C/man7/epoll.7:328
560 "When used as an edge-triggered interface, for performance reasons, it is "
561 "possible to add the file descriptor inside the B<epoll> interface "
562 "(B<EPOLL_CTL_ADD>) once by specifying (B<EPOLLIN>|B<EPOLLOUT>). This "
563 "allows you to avoid continuously switching between B<EPOLLIN> and "
564 "B<EPOLLOUT> calling B<epoll_ctl>(2) with B<EPOLL_CTL_MOD>."
566 "エッジトリガーインターフェースとして使う場合、性能上の理由により、 一度 "
567 "(B<EPOLLIN>|B<EPOLLOUT>) を指定してから (B<EPOLL_CTL_ADD> で) ファイルディス"
568 "クリプターを B<epoll> インターフェースに追加することができる。 これにより、 "
569 "B<epoll_ctl>(2) に B<EPOLL_CTL_MOD> を指定して呼び出すことで B<EPOLLIN> と "
570 "B<EPOLLOUT> の連続的な切り替えが避けられる。"
573 #: build/C/man7/epoll.7:328
575 msgid "Questions and answers"
579 #: build/C/man7/epoll.7:329
585 #: build/C/man7/epoll.7:334
587 "What is the key used to distinguish the file descriptors registered in an "
590 "B<epoll> 集合内の登録されたファイルディスクリプターを区別するには、 何をキー"
594 #: build/C/man7/epoll.7:334
600 #: build/C/man7/epoll.7:340
602 "The key is the combination of the file descriptor number and the open file "
603 "description (also known as an \"open file handle\", the kernel's internal "
604 "representation of an open file)."
606 "キーはファイルディスクリプター番号とオープンファイル記述 (open file "
607 "description) の組である (オープンファイル記述は \"open file handle\" とも 呼"
608 "ばれ、オープンされたファイルのカーネルの内部表現である)。"
611 #: build/C/man7/epoll.7:340
617 #: build/C/man7/epoll.7:345
619 "What happens if you register the same file descriptor on an B<epoll> "
622 "1 つの B<epoll> インスタンスに同じファイルディスクリプターを 2 回登録するとど"
626 #: build/C/man7/epoll.7:345
631 #. But a descriptor duplicated by fork(2) can't be added to the
632 #. set, because the [file *, fd] pair is already in the epoll set.
633 #. That is a somewhat ugly inconsistency. On the one hand, a child process
634 #. cannot add the duplicate file descriptor to the epoll set. (In every
635 #. other case that I can think of, descriptors duplicated by fork have
636 #. similar semantics to descriptors duplicated by dup() and friends.) On
637 #. the other hand, the very fact that the child has a duplicate of the
638 #. descriptor means that even if the parent closes its descriptor, then
639 #. epoll_wait() in the parent will continue to receive notifications for
640 #. that descriptor because of the duplicated descriptor in the child.
641 #. See http://thread.gmane.org/gmane.linux.kernel/596462/
642 #. "epoll design problems with common fork/exec patterns"
645 #: build/C/man7/epoll.7:376
647 "You will probably get B<EEXIST>. However, it is possible to add a duplicate "
648 "(B<dup>(2), B<dup2>(2), B<fcntl>(2) B<F_DUPFD>) descriptor to the same "
649 "B<epoll> instance. This can be a useful technique for filtering events, if "
650 "the duplicate file descriptors are registered with different I<events> masks."
652 "たぶん B<EEXIST> を受け取るだろう。 しかしながら、同じ B<epoll> インスタンス"
653 "に対して複製されたディスクリプターを追加することは可能である (B<dup>(2), "
654 "B<dup2>(2), B<fcntl>(2) B<F_DUPFD> など)。 複製したファイルディスクリプター"
655 "を異なる I<events> マスクで登録すれば、イベントをフィルタリングするのに この"
659 #: build/C/man7/epoll.7:376
665 #: build/C/man7/epoll.7:384
667 "Can two B<epoll> instances wait for the same file descriptor? If so, are "
668 "events reported to both B<epoll> file descriptors?"
670 "2 つの B<epoll> インスタンスが同じファイルディスクリプターを待ち受けることは"
671 "可能か? もし可能であれば、イベントは両方の B<epoll> ファイルディスクリプター"
675 #: build/C/man7/epoll.7:384
681 #: build/C/man7/epoll.7:388
683 "Yes, and events would be reported to both. However, careful programming may "
684 "be needed to do this correctly."
686 "イベントは両方に報告される。 しかしながら、これを正しく扱うには注意深くプログ"
687 "ラミングする必要が あるかもしれない。"
690 #: build/C/man7/epoll.7:388
696 #: build/C/man7/epoll.7:393
697 msgid "Is the B<epoll> file descriptor itself poll/epoll/selectable?"
698 msgstr "B<epoll> ファイルディスクリプター自身は poll/epoll/select が可能か?"
701 #: build/C/man7/epoll.7:393
707 #: build/C/man7/epoll.7:400
709 "Yes. If an B<epoll> file descriptor has events waiting, then it will "
710 "indicate as being readable."
712 "可能である。 B<epoll> ファイルディスクリプターに処理待ちのイベントがある場合"
713 "は、 読み出し可能だと通知されることだろう。"
716 #: build/C/man7/epoll.7:400
722 #: build/C/man7/epoll.7:405
724 "What happens if one attempts to put an B<epoll> file descriptor into its own "
725 "file descriptor set?"
727 "B<epoll> ファイルディスクリプターを自身のファイルディスクリプター集合に 入れ"
731 #: build/C/man7/epoll.7:405
737 #: build/C/man7/epoll.7:416
739 "The B<epoll_ctl>(2) call will fail (B<EINVAL>). However, you can add an "
740 "B<epoll> file descriptor inside another B<epoll> file descriptor set."
742 "B<epoll_ctl>(2) の呼び出しは (B<EINVAL> で) 失敗するだろう。 ただし "
743 "B<epoll> ファイルディスクリプターを他の B<epoll> ファイルディスクリプター集合"
747 #: build/C/man7/epoll.7:416
753 #: build/C/man7/epoll.7:421
755 "Can I send an B<epoll> file descriptor over a UNIX domain socket to another "
758 "B<epoll> ファイルディスクリプターを UNIX ドメインソケットで他のプロセスに送る"
762 #: build/C/man7/epoll.7:421
768 #: build/C/man7/epoll.7:427
770 "Yes, but it does not make sense to do this, since the receiving process "
771 "would not have copies of the file descriptors in the B<epoll> set."
773 "可能だが、これをすることに意味はない。 なぜなら、受信側のプロセスが B<epoll> "
774 "集合内のファイルディスクリプターのコピーを持っていないからである。"
777 #: build/C/man7/epoll.7:427
783 #: build/C/man7/epoll.7:432
785 "Will closing a file descriptor cause it to be removed from all B<epoll> sets "
788 "ファイルディスクリプターをクローズすると、そのファイルディスクリプターは全て"
789 "の B<epoll> 集合から自動的に削除されるか?"
792 #: build/C/man7/epoll.7:432
798 #: build/C/man7/epoll.7:460
800 "Yes, but be aware of the following point. A file descriptor is a reference "
801 "to an open file description (see B<open>(2)). Whenever a descriptor is "
802 "duplicated via B<dup>(2), B<dup2>(2), B<fcntl>(2) B<F_DUPFD>, or "
803 "B<fork>(2), a new file descriptor referring to the same open file "
804 "description is created. An open file description continues to exist until "
805 "all file descriptors referring to it have been closed. A file descriptor is "
806 "removed from an B<epoll> set only after all the file descriptors referring "
807 "to the underlying open file description have been closed (or before if the "
808 "descriptor is explicitly removed using B<epoll_ctl>(2) B<EPOLL_CTL_DEL>). "
809 "This means that even after a file descriptor that is part of an B<epoll> set "
810 "has been closed, events may be reported for that file descriptor if other "
811 "file descriptors referring to the same underlying file description remain "
814 "削除されるが、以下の点に注意が必要である。 ファイルディスクリプターはオープン"
815 "ファイル記述 (B<open>(2) 参照) への参照である。 ディスクリプターの複製を "
816 "B<dup>(2), B<dup2>(2), B<fcntl>(2) の B<F_DUPFD> や B<fork>(2) 経由で行う度"
817 "に、同じオープンファイル記述を参照する新規のファイル ディスクリプターが生成さ"
818 "れる。 オープンファイル記述自体は、自身を参照する全てのファイルディスクリプ"
819 "ター がクローズされるまで存在し続ける。 ファイルディスクリプターが B<epoll> "
820 "集合から削除されるのは、対応するオープンファイル記述を参照している 全てのファ"
821 "イルディスクリプターがクローズされた後である (B<epoll_ctl>(2) "
822 "B<EPOLL_CTL_DEL> を使ってそのディスクリプターを明示的に削除した場合にも削除さ"
823 "れる)。 このことは、 B<epoll> 集合に属しているあるファイルディスクリプターを"
824 "クローズした後であっても、 同じファイル記述を参照する他のファイルディスクリプ"
825 "ターがオープンされている間は、 クローズしたファイルディスクリプター宛にイベン"
826 "トが報告される可能性があると いうことを意味する。"
829 #: build/C/man7/epoll.7:460
835 #: build/C/man7/epoll.7:465
837 "If more than one event occurs between B<epoll_wait>(2) calls, are they "
838 "combined or reported separately?"
840 "2 つ以上のイベントが B<epoll_wait>(2) コールの間に発生した場合、それらはまと"
841 "めて報告されるか、 それとも別々に報告されるか?"
844 #: build/C/man7/epoll.7:465
850 #: build/C/man7/epoll.7:468
851 msgid "They will be combined."
852 msgstr "まとめて報告されるだろう。"
855 #: build/C/man7/epoll.7:468
861 #: build/C/man7/epoll.7:472
863 "Does an operation on a file descriptor affect the already collected but not "
864 "yet reported events?"
866 "ファイルディスクリプターに対する操作は、 既に集められているがまだ報告されてい"
870 #: build/C/man7/epoll.7:472
876 #: build/C/man7/epoll.7:478
878 "You can do two operations on an existing file descriptor. Remove would be "
879 "meaningless for this case. Modify will reread available I/O."
881 "既存のファイルディスクリプターに対して 2 つの操作を行うことができる。 この場"
882 "合、削除には意味がない。 変更すると、使用可能な I/O が再び読み込まれる。"
885 #: build/C/man7/epoll.7:478
891 #: build/C/man7/epoll.7:486
893 "Do I need to continuously read/write a file descriptor until B<EAGAIN> when "
894 "using the B<EPOLLET> flag (edge-triggered behavior) ?"
896 "B<EPOLLET> フラグ (エッジトリガー動作) を使っている場合、 B<EAGAIN> を受け取"
897 "るまで、 継続してファイルディスクリプターを読み書きする必要があるか?"
900 #: build/C/man7/epoll.7:486
906 #: build/C/man7/epoll.7:496
908 "Receiving an event from B<epoll_wait>(2) should suggest to you that such "
909 "file descriptor is ready for the requested I/O operation. You must consider "
910 "it ready until the next (nonblocking) read/write yields B<EAGAIN>. When "
911 "and how you will use the file descriptor is entirely up to you."
913 "B<epoll_wait>(2) からイベントを受け取ることは、 そのファイルディスクリプター"
914 "が要求された I/O 操作に対して準備済みである、 ということをユーザーに示すもの"
915 "である。 次の (ブロックしない) read/write で B<EAGAIN> を受け取るまではファイ"
916 "ルディスクリプターは準備済みであると 考えなければならない。 そのファイルディ"
917 "スクリプターをいつどのように使うかは、 全くユーザーに任されてる。"
920 #: build/C/man7/epoll.7:502
922 "For packet/token-oriented files (e.g., datagram socket, terminal in "
923 "canonical mode), the only way to detect the end of the read/write I/O space "
924 "is to continue to read/write until B<EAGAIN>."
926 "パケット指向やトークン指向のファイル (例えば、データグラムソケット、 "
927 "canonical モードの端末) では、 読み込み用 / 書き込み用の I/O 空間の末尾を検知"
928 "する唯一の方法は B<EAGAIN> になるまで read/write を行うことである。"
931 #: build/C/man7/epoll.7:518
933 "For stream-oriented files (e.g., pipe, FIFO, stream socket), the condition "
934 "that the read/write I/O space is exhausted can also be detected by checking "
935 "the amount of data read from / written to the target file descriptor. For "
936 "example, if you call B<read>(2) by asking to read a certain amount of data "
937 "and B<read>(2) returns a lower number of bytes, you can be sure of having "
938 "exhausted the read I/O space for the file descriptor. The same is true when "
939 "writing using B<write>(2). (Avoid this latter technique if you cannot "
940 "guarantee that the monitored file descriptor always refers to a stream-"
943 "ストリーム指向のファイル (例えば、パイプ、FIFO、ストリームソケット) では、 読"
944 "み込み用 / 書き込み用の I/O 空間が使い尽くされた状態は、 対象となるファイル"
945 "ディスクリプターから読み込んだデータ量または 書き込んだデータ量をチェックする"
946 "ことでも検知できる。 例えば、ある特定の量のデータを読み込むために "
947 "B<read>(2) を呼んだときに、 B<read>(2) が返したバイト数がそれより少なかった"
948 "場合、 そのファイルディスクリプターの読み込み用 I/O 空間が 使い尽くされたこと"
949 "が分かる。 B<write>(2) を使って書き込みをするときも、同じことが言える (監視"
950 "しているファイルディスクリプターが常にストリーム指向のファイルを 参照している"
951 "ことを保証できない場合には、後者の手法の使用を避けること)。"
954 #: build/C/man7/epoll.7:518
956 msgid "Possible pitfalls and ways to avoid them"
957 msgstr "ありがちな落とし穴と回避方法"
960 #: build/C/man7/epoll.7:519
962 msgid "B<o Starvation (edge-triggered)>"
963 msgstr "B<o 飢餓 (starvation) (エッジトリガー)>"
966 #: build/C/man7/epoll.7:527
968 "If there is a large amount of I/O space, it is possible that by trying to "
969 "drain it the other files will not get processed causing starvation. (This "
970 "problem is not specific to B<epoll>.)"
972 "大きな I/O 空間がある場合、 その I/O 空間のデータを全て処理 (drain) しようと"
973 "すると、 他のファイルが処理されず、飢餓を発生させることがある (この問題は "
974 "B<epoll> に固有のものではない)。"
977 #: build/C/man7/epoll.7:535
979 "The solution is to maintain a ready list and mark the file descriptor as "
980 "ready in its associated data structure, thereby allowing the application to "
981 "remember which files need to be processed but still round robin amongst all "
982 "the ready files. This also supports ignoring subsequent events you receive "
983 "for file descriptors that are already ready."
985 "この問題の解決法は、準備済み状態のリストを管理して、 関連する data 構造体の中"
986 "でファイルディスクリプターが 利用可能であるとマークすることである。 それに"
987 "よって、利用可能なすべてのファイルの中で どのファイルを処理する必要があるかを"
988 "憶えることができ、 しかも順番に処理 (round robin) することができる。 既に利用"
989 "可能であるファイルディスクリプターに対して それ以後に受け取るイベントを無視す"
993 #: build/C/man7/epoll.7:535
995 msgid "B<o If using an event cache...>"
996 msgstr "B<o イベントキャッシュを使っている場合>"
999 #: build/C/man7/epoll.7:551
1001 "If you use an event cache or store all the file descriptors returned from "
1002 "B<epoll_wait>(2), then make sure to provide a way to mark its closure "
1003 "dynamically (i.e., caused by a previous event's processing). Suppose you "
1004 "receive 100 events from B<epoll_wait>(2), and in event #47 a condition "
1005 "causes event #13 to be closed. If you remove the structure and B<close>(2) "
1006 "the file descriptor for event #13, then your event cache might still say "
1007 "there are events waiting for that file descriptor causing confusion."
1009 "イベントキャッシュを使っている場合、 または B<epoll_wait>(2) から返された全"
1010 "てのファイルディスクリプターを格納している場合、 クローズされたことを動的に"
1011 "マークする (つまり前のイベントの処理によってマークされる) 方法を提供すべきで"
1012 "ある。 B<epoll_wait>(2) から 100 個のイベントを受け取り、 イベント #47 では"
1013 "ある条件でイベント #13 が閉じられると仮定する。 イベント #13 の構造体を削除し"
1014 "ファイルディスクリプターを B<close>(2) すると、イベントキャッシュはそのファ"
1015 "イルディスクリプターを待つイベントが 存在するといって、混乱が起きる。"
1018 #: build/C/man7/epoll.7:562
1020 "One solution for this is to call, during the processing of event 47, "
1021 "B<epoll_ctl>(B<EPOLL_CTL_DEL>) to delete file descriptor 13 and "
1022 "B<close>(2), then mark its associated data structure as removed and link it "
1023 "to a cleanup list. If you find another event for file descriptor 13 in your "
1024 "batch processing, you will discover the file descriptor had been previously "
1025 "removed and there will be no confusion."
1027 "この問題を解決する 1 つの方法は、イベント 47 の処理をしている間に、 ファイル"
1028 "ディスクリプター 13 を削除して B<close>(2) するために "
1029 "B<epoll_ctl>(B<EPOLL_CTL_DEL>) を呼び出し、関連付けられた data 構造体を削除"
1030 "済みとマークして、 クリーンアップリストにリンクすることである。 バッチ処理の"
1031 "中でファイルディスクリプター 13 についての 他のイベントを見つけた場合、 その"
1032 "ファイルディスクリプターが以前に削除されたものであると分かるので、 混乱は起き"
1036 #: build/C/man7/epoll.7:562 build/C/man2/epoll_create.2:108
1037 #: build/C/man2/epoll_ctl.2:256 build/C/man2/epoll_wait.2:187
1038 #: build/C/man2/poll.2:330
1043 #. Its interface should be finalized in Linux kernel 2.5.66.
1045 #: build/C/man7/epoll.7:568
1047 "The B<epoll> API was introduced in Linux kernel 2.5.44. Support was added "
1048 "to glibc in version 2.3.2."
1050 "B<epoll> API は Linux カーネル 2.5.44 に導入された。 glibc でのサポートはバー"
1054 #: build/C/man7/epoll.7:568 build/C/man2/epoll_create.2:118
1055 #: build/C/man2/epoll_ctl.2:261 build/C/man2/epoll_wait.2:197
1056 #: build/C/man2/poll.2:347
1058 msgid "CONFORMING TO"
1062 #: build/C/man7/epoll.7:577
1064 "The B<epoll> API is Linux-specific. Some other systems provide similar "
1065 "mechanisms, for example, FreeBSD has I<kqueue>, and Solaris has I</dev/poll>."
1067 "B<epoll> API は Linux 固有である。 他のシステムでも同様の機構が提供されている"
1068 "場合がある。 例えば、FreeBSD の I<kqueue> や Solaris の I</dev/poll> などであ"
1072 #: build/C/man7/epoll.7:577 build/C/man2/epoll_create.2:144
1073 #: build/C/man2/epoll_ctl.2:311 build/C/man2/epoll_wait.2:242
1074 #: build/C/man2/poll.2:397
1080 #: build/C/man7/epoll.7:582
1082 "B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2)"
1084 "B<epoll_create>(2), B<epoll_create1>(2), B<epoll_ctl>(2), B<epoll_wait>(2)"
1087 #: build/C/man7/epoll.7:582 build/C/man2/epoll_create.2:149
1088 #: build/C/man2/epoll_ctl.2:316 build/C/man2/epoll_wait.2:246
1089 #: build/C/man2/poll.2:402
1095 #: build/C/man7/epoll.7:590 build/C/man2/epoll_create.2:157
1096 #: build/C/man2/epoll_ctl.2:324 build/C/man2/epoll_wait.2:254
1097 #: build/C/man2/poll.2:410
1099 "This page is part of release 3.78 of the Linux I<man-pages> project. A "
1100 "description of the project, information about reporting bugs, and the latest "
1101 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
1104 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
1105 "である。プロジェクトの説明とバグ報告に関する情報は\n"
1106 "http://www.kernel.org/doc/man-pages/ に書かれている。"
1109 #: build/C/man2/epoll_create.2:24
1111 msgid "EPOLL_CREATE"
1112 msgstr "EPOLL_CREATE"
1115 #: build/C/man2/epoll_create.2:24
1121 #: build/C/man2/epoll_create.2:27
1122 msgid "epoll_create, epoll_create1 - open an epoll file descriptor"
1124 "epoll_create, epoll_create1 - epoll ファイルディスクリプターをオープンする"
1127 #: build/C/man2/epoll_create.2:30 build/C/man2/epoll_wait.2:28
1129 msgid "B<#include E<lt>sys/epoll.hE<gt>>\n"
1130 msgstr "B<#include E<lt>sys/epoll.hE<gt>>\n"
1133 #: build/C/man2/epoll_create.2:33
1136 "B<int epoll_create(int >I<size>B<);>\n"
1137 "B<int epoll_create1(int >I<flags>B<);>\n"
1139 "B<int epoll_create(int >I<size>B<);>\n"
1140 "B<int epoll_create1(int >I<flags>B<);>\n"
1143 #: build/C/man2/epoll_create.2:42
1145 "B<epoll_create>() creates an B<epoll>(7) instance. Since Linux 2.6.8, the "
1146 "I<size> argument is ignored, but must be greater than zero; see NOTES below."
1148 "B<epoll_create>()は B<epoll>(7) インスタンスを作成する。\n"
1149 "Linux 2.6.8 以降では、I<size> 引き数は無視されるが、 0 より大きな値で\n"
1150 "なければならない。下記の「注意」を参照。"
1153 #: build/C/man2/epoll_create.2:55
1155 "B<epoll_create>() returns a file descriptor referring to the new epoll "
1156 "instance. This file descriptor is used for all the subsequent calls to the "
1157 "B<epoll> interface. When no longer required, the file descriptor returned "
1158 "by B<epoll_create>() should be closed by using B<close>(2). When all file "
1159 "descriptors referring to an epoll instance have been closed, the kernel "
1160 "destroys the instance and releases the associated resources for reuse."
1162 "B<epoll_create>() は、新しい epoll インスタンスを参照するファイルディスクリ"
1163 "プターを返す。 このファイルディスクリプターは、その後の B<epoll> インター"
1164 "フェースの呼び出しに使われる。 もう必要でなくなった場合は、 "
1165 "B<epoll_create>() で返されたファイルディスクリプターは B<close>(2) を使って"
1166 "クローズされるべきである。 ある epoll インスタンスを参照する全てのファイル"
1167 "ディスクリプターがクローズされると、 カーネルはそのインスタンスを破壊して、対"
1168 "応するリソースを解放し、 再使用できるようにする。"
1171 #: build/C/man2/epoll_create.2:55
1173 msgid "epoll_create1()"
1174 msgstr "epoll_create1()"
1177 #: build/C/man2/epoll_create.2:67
1179 "If I<flags> is 0, then, other than the fact that the obsolete I<size> "
1180 "argument is dropped, B<epoll_create1>() is the same as B<epoll_create>(). "
1181 "The following value can be included in I<flags> to obtain different behavior:"
1183 "B<epoll_create1>() は、 I<flags> が 0 の場合、現在では使われていない "
1184 "I<size> 引き数がなくなっている点を除けば B<epoll_create>() と同じである。 "
1185 "I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさ"
1189 #: build/C/man2/epoll_create.2:67
1191 msgid "B<EPOLL_CLOEXEC>"
1192 msgstr "B<EPOLL_CLOEXEC>"
1195 #: build/C/man2/epoll_create.2:77
1197 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
1198 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
1201 "新しいファイルディスクリプターに対して close-on-exec (B<FD_CLOEXEC>) フラグ"
1202 "をセットする。 このフラグが役に立つ理由については、 B<open>(2) の "
1203 "B<O_CLOEXEC> フラグの説明を参照のこと。"
1206 #: build/C/man2/epoll_create.2:77 build/C/man2/epoll_ctl.2:185
1207 #: build/C/man2/epoll_wait.2:150 build/C/man2/poll.2:301
1209 msgid "RETURN VALUE"
1213 #: build/C/man2/epoll_create.2:84
1215 "On success, these system calls return a nonnegative file descriptor. On "
1216 "error, -1 is returned, and I<errno> is set to indicate the error."
1218 "成功すると、これらのシステムコールは 非負のファイルディスクリプターを返す。 "
1219 "エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
1222 #: build/C/man2/epoll_create.2:84 build/C/man2/epoll_ctl.2:194
1223 #: build/C/man2/epoll_wait.2:162 build/C/man2/poll.2:311
1229 #: build/C/man2/epoll_create.2:85 build/C/man2/epoll_create.2:89
1230 #: build/C/man2/epoll_ctl.2:209 build/C/man2/epoll_wait.2:179
1231 #: build/C/man2/poll.2:320
1237 #: build/C/man2/epoll_create.2:89
1238 msgid "I<size> is not positive."
1239 msgstr "I<size> が正でない。"
1242 #: build/C/man2/epoll_create.2:94
1243 msgid "(B<epoll_create1>()) Invalid value specified in I<flags>."
1244 msgstr "(B<epoll_create1>()) I<flags> に無効な値が指定された。"
1247 #: build/C/man2/epoll_create.2:94
1253 #: build/C/man2/epoll_create.2:102
1255 "The per-user limit on the number of epoll instances imposed by I</proc/sys/"
1256 "fs/epoll/max_user_instances> was encountered. See B<epoll>(7) for further "
1259 "I</proc/sys/fs/epoll/max_user_instances> によって指定されている、epoll インス"
1260 "タンスのユーザー単位の制限に達した。 更なる詳細については B<epoll>(7) を参照"
1264 #: build/C/man2/epoll_create.2:102
1270 #: build/C/man2/epoll_create.2:105
1271 msgid "The system limit on the total number of open files has been reached."
1272 msgstr "オープンされたファイルの総数がシステム制限に達した。"
1275 #: build/C/man2/epoll_create.2:105 build/C/man2/epoll_ctl.2:232
1276 #: build/C/man2/poll.2:327
1282 #: build/C/man2/epoll_create.2:108
1283 msgid "There was insufficient memory to create the kernel object."
1284 msgstr "カーネルオブジェクトを作成するのに十分なメモリーがなかった。"
1287 #: build/C/man2/epoll_create.2:112
1289 "B<epoll_create>() was added to the kernel in version 2.6. Library support "
1290 "is provided in glibc starting with version 2.3.2."
1292 "B<epoll_create>() はカーネル 2.6 で追加された。\n"
1293 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1295 #. To be precise: kernel 2.5.44.
1296 #. The interface should be finalized by Linux kernel 2.5.66.
1298 #: build/C/man2/epoll_create.2:118
1300 "B<epoll_create1>() was added to the kernel in version 2.6.27. Library "
1301 "support is provided in glibc starting with version 2.9."
1303 "B<epoll_create1>() はカーネル 2.6.27 で追加された。\n"
1304 "ライブラリによるサポートは glibc バージョン 2.9 以降で提供されている。"
1307 #: build/C/man2/epoll_create.2:121
1308 msgid "B<epoll_create>() is Linux-specific."
1309 msgstr "B<epoll_create>() は Linux 独自である。"
1312 #: build/C/man2/epoll_create.2:121 build/C/man2/epoll_ctl.2:265
1313 #: build/C/man2/epoll_wait.2:200 build/C/man2/poll.2:353
1319 #: build/C/man2/epoll_create.2:144
1321 "In the initial B<epoll_create>() implementation, the I<size> argument "
1322 "informed the kernel of the number of file descriptors that the caller "
1323 "expected to add to the B<epoll> instance. The kernel used this information "
1324 "as a hint for the amount of space to initially allocate in internal data "
1325 "structures describing events. (If necessary, the kernel would allocate more "
1326 "space if the caller's usage exceeded the hint given in I<size>.) Nowadays, "
1327 "this hint is no longer required (the kernel dynamically sizes the required "
1328 "data structures without needing the hint), but I<size> must still be greater "
1329 "than zero, in order to ensure backward compatibility when new B<epoll> "
1330 "applications are run on older kernels."
1332 "初期の B<epoll_create>() の実装では、I<size> 引き数は、呼び出し元が "
1334 "インスタンスに追加しようとするファイルディスクリプター数をカーネルに教えるの"
1336 "使われていた。カーネルはこの情報をイベントの情報を格納する内部データ構造に"
1338 "初に割り当てる大きさを決める際のヒントとして使用していた (I<size> で渡され"
1340 "ヒントよりも使用量が大きくなった場合には、必要に応じてカーネルは追加で領域"
1344 "現在では、このヒントはもはや必要なくなっている (カーネルはヒントなしで必要"
1346 "データ構造のサイズを動的に変更する) が、今も I<size> には 0 より大きい値を\n"
1347 "指定しなければならない。これは、B<epoll> を使うアプリケーションが古いカーネ"
1349 "で実行される際の後方互換性を保証するためである。"
1352 #: build/C/man2/epoll_create.2:149
1353 msgid "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1354 msgstr "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1357 #: build/C/man2/epoll_ctl.2:20
1363 #: build/C/man2/epoll_ctl.2:20
1369 #: build/C/man2/epoll_ctl.2:23
1370 msgid "epoll_ctl - control interface for an epoll descriptor"
1371 msgstr "epoll_ctl - epoll ディスクリプターのインターフェースを操作する"
1374 #: build/C/man2/epoll_ctl.2:28
1376 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1377 "epoll_event *>I<event>B<);>"
1379 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1380 "epoll_event *>I<event>B<);>"
1383 #: build/C/man2/epoll_ctl.2:38
1385 "This system call performs control operations on the B<epoll>(7) instance "
1386 "referred to by the file descriptor I<epfd>. It requests that the operation "
1387 "I<op> be performed for the target file descriptor, I<fd>."
1389 "このシステムコールは、ファイルディスクリプター I<epfd> が参照する "
1391 "インスタンスに対する操作を行う。 対象のファイルディスクリプター I<fd> に対し"
1393 "操作 I<op> の実行が要求される。"
1396 #: build/C/man2/epoll_ctl.2:42
1397 msgid "Valid values for the I<op> argument are:"
1398 msgstr "I<op> 引き数に指定できる有効な値は以下の通りである。"
1401 #: build/C/man2/epoll_ctl.2:42
1403 msgid "B<EPOLL_CTL_ADD>"
1404 msgstr "B<EPOLL_CTL_ADD>"
1407 #: build/C/man2/epoll_ctl.2:54
1409 "Register the target file descriptor I<fd> on the B<epoll> instance referred "
1410 "to by the file descriptor I<epfd> and associate the event I<event> with the "
1411 "internal file linked to I<fd>."
1413 "対象のファイルディスクリプター I<fd> をファイルディスクリプター I<epfd> が参"
1414 "照する B<epoll> インスタンスに登録し、イベント I<event> を I<fd> に結び付けら"
1418 #: build/C/man2/epoll_ctl.2:54
1420 msgid "B<EPOLL_CTL_MOD>"
1421 msgstr "B<EPOLL_CTL_MOD>"
1424 #: build/C/man2/epoll_ctl.2:60
1426 "Change the event I<event> associated with the target file descriptor I<fd>."
1428 "イベント I<event> を対象のファイルディスクリプター I<fd> に関連付けるように変"
1432 #: build/C/man2/epoll_ctl.2:60
1434 msgid "B<EPOLL_CTL_DEL>"
1435 msgstr "B<EPOLL_CTL_DEL>"
1438 #: build/C/man2/epoll_ctl.2:71
1440 "Remove (deregister) the target file descriptor I<fd> from the B<epoll> "
1441 "instance referred to by I<epfd>. The I<event> is ignored and can be NULL "
1442 "(but see BUGS below)."
1444 "対象のファイルディスクリプター I<fd> を I<epfd> が参照する B<epoll> インスタ"
1445 "ンスから削除する。 I<event> 引き数は無視されるので、NULL にすることもできる "
1449 #: build/C/man2/epoll_ctl.2:79
1451 "The I<event> argument describes the object linked to the file descriptor "
1452 "I<fd>. The I<struct epoll_event> is defined as:"
1454 "I<event> 引き数は、ファイルディスクリプター I<fd> にリンクされたオブジェクト"
1455 "を表す。 I<struct epoll_event> は以下のように定義される。"
1458 #: build/C/man2/epoll_ctl.2:88
1461 "typedef union epoll_data {\n"
1468 "typedef union epoll_data {\n"
1476 #: build/C/man2/epoll_ctl.2:93
1479 "struct epoll_event {\n"
1480 " uint32_t events; /* Epoll events */\n"
1481 " epoll_data_t data; /* User data variable */\n"
1484 "struct epoll_event {\n"
1485 " uint32_t events; /* epoll イベント */\n"
1486 " epoll_data_t data; /* ユーザーデータ変数 */\n"
1490 #: build/C/man2/epoll_ctl.2:100
1492 "The I<events> member is a bit set composed using the following available "
1495 "I<events> メンバは、以下のような使用可能なイベントタイプを使って構成された "
1499 #: build/C/man2/epoll_ctl.2:100
1505 #: build/C/man2/epoll_ctl.2:105
1506 msgid "The associated file is available for B<read>(2) operations."
1507 msgstr "関連付けられたファイルに対して、 B<read>(2) 操作が可能である。"
1510 #: build/C/man2/epoll_ctl.2:105
1513 msgstr "B<EPOLLOUT>"
1516 #: build/C/man2/epoll_ctl.2:110
1517 msgid "The associated file is available for B<write>(2) operations."
1518 msgstr "関連付けられたファイルに対して、 B<write>(2) 操作が可能である。"
1521 #: build/C/man2/epoll_ctl.2:110
1523 msgid "B<EPOLLRDHUP> (since Linux 2.6.17)"
1524 msgstr "B<EPOLLRDHUP\">(LinuxB<2.6.17>以降)\""
1527 #: build/C/man2/epoll_ctl.2:116
1529 "Stream socket peer closed connection, or shut down writing half of "
1530 "connection. (This flag is especially useful for writing simple code to "
1531 "detect peer shutdown when using Edge Triggered monitoring.)"
1533 "ストリームソケットの他端が、コネクションの close 、 またはコネクションの書き"
1534 "込み側の shutdown を行った。 (このフラグを使うと、エッジトリガーの監視を行う"
1535 "場合に、 通信のもう一端が閉じられたことを検知するコードを 非常に簡潔に書くこ"
1539 #: build/C/man2/epoll_ctl.2:116
1542 msgstr "B<EPOLLPRI>"
1545 #: build/C/man2/epoll_ctl.2:121
1546 msgid "There is urgent data available for B<read>(2) operations."
1547 msgstr "B<read>(2) 操作が可能な緊急 (urgent) データがある。"
1550 #: build/C/man2/epoll_ctl.2:121
1553 msgstr "B<EPOLLERR>"
1556 #: build/C/man2/epoll_ctl.2:127
1558 "Error condition happened on the associated file descriptor. "
1559 "B<epoll_wait>(2) will always wait for this event; it is not necessary to "
1560 "set it in I<events>."
1562 "関連付けられたファイルディスクリプターにエラー条件が起こった。 "
1563 "B<epoll_wait>(2) は常にこのイベントを待つので、 I<events> に設定する必要はな"
1567 #: build/C/man2/epoll_ctl.2:127
1570 msgstr "B<EPOLLHUP>"
1573 #: build/C/man2/epoll_ctl.2:133
1575 "Hang up happened on the associated file descriptor. B<epoll_wait>(2) will "
1576 "always wait for this event; it is not necessary to set it in I<events>."
1578 "関連付けられたファイルディスクリプターにハングアップが起こった。 "
1579 "B<epoll_wait>(2) は常にこのイベントを待つので、 I<events> に設定する必要はな"
1583 #: build/C/man2/epoll_ctl.2:133
1589 #: build/C/man2/epoll_ctl.2:143
1591 "Sets the Edge Triggered behavior for the associated file descriptor. The "
1592 "default behavior for B<epoll> is Level Triggered. See B<epoll>(7) for more "
1593 "detailed information about Edge and Level Triggered event distribution "
1596 "関連付けられたファイルディスクリプターに エッジトリガー動作 (Edge Triggered "
1597 "behavior) を設定する。 B<epoll> のデフォルトの動作は、レベルトリガー (Level "
1598 "Triggered) である。 エッジトリガーとレベルトリガーによるイベント分配機構 "
1599 "(event distribution architectures) についての詳細な情報は、 B<epoll>(7) を参"
1603 #: build/C/man2/epoll_ctl.2:143
1605 msgid "B<EPOLLONESHOT> (since Linux 2.6.2)"
1606 msgstr "B<EPOLLONESHOT> (Linux 2.6.2 以降)"
1609 #: build/C/man2/epoll_ctl.2:157
1611 "Sets the one-shot behavior for the associated file descriptor. This means "
1612 "that after an event is pulled out with B<epoll_wait>(2) the associated file "
1613 "descriptor is internally disabled and no other events will be reported by "
1614 "the B<epoll> interface. The user must call B<epoll_ctl>() with "
1615 "B<EPOLL_CTL_MOD> to rearm the file descriptor with a new event mask."
1617 "関連付けられたファイルディスクリプターに 一撃動作 (One-Shot behavior) を設定"
1618 "する。 これはイベントが B<epoll_wait>(2) によって引き出された後、 関連付けら"
1619 "れたファイルディスクリプターが内部的に破棄され、 B<epoll> インターフェースに"
1620 "よってイベントが報告されなくなることを意味する。 新しいイベントマスクでファイ"
1621 "ルディスクリプターを再度有効にするためには、 B<epoll_ctl>() に "
1622 "B<EPOLL_CTL_MOD> を指定して呼び出さなければならない。 I<op> 引き数に指定でき"
1626 #: build/C/man2/epoll_ctl.2:157
1628 msgid "B<EPOLLWAKEUP> (since Linux 3.5)"
1629 msgstr "B<EPOLLWAKEUP> (Linux 3.5 以降)"
1631 #. commit 4d7e30d98939a0340022ccd49325a3d70f7e0238
1633 #: build/C/man2/epoll_ctl.2:185
1635 "If B<EPOLLONESHOT> and B<EPOLLET> are clear and the process has the "
1636 "B<CAP_BLOCK_SUSPEND> capability, ensure that the system does not enter "
1637 "\"suspend\" or \"hibernate\" while this event is pending or being "
1638 "processed. The event is considered as being \"processed\" from the time "
1639 "when it is returned by a call to B<epoll_wait>(2) until the next call to "
1640 "B<epoll_wait>(2) on the same B<epoll>(7) file descriptor, the closure of "
1641 "that file descriptor, the removal of the event file descriptor with "
1642 "B<EPOLL_CTL_DEL>, or the clearing of B<EPOLLWAKEUP> for the event file "
1643 "descriptor with B<EPOLL_CTL_MOD>. See also BUGS."
1645 "B<EPOLLONESHOT> と B<EPOLLET> がクリアされており、 プロセスが "
1646 "B<CAP_BLOCK_SUSPEND> ケーパビリティを持っている場合、 イベントが処理待ちか処"
1647 "理中かにかかわらず、必ずシステムが \"suspend\" や \"hibernate\" に入らないよ"
1648 "うにすること。 B<epoll_wait>(2) の呼び出しが返った時点から、 同じ "
1649 "B<epoll>(7) ファイルディスクリプターに対して B<epoll_wait>(2) が次に呼び出さ"
1650 "れるか、 そのファイルディスクリプターが閉じられるか、 イベントファイルディス"
1651 "クリプターが B<EPOLL_CTL_DEL> で削除されるか、 B<EPOLL_CTL_MOD> でイベント"
1652 "ファイルディスクリプターの B<EPOLLWAKEUP> がクリアされるか、 のいずれかになる"
1653 "まで、イベントは「処理中」であるとみなされる。 「バグ」の節も参照のこと。"
1656 #: build/C/man2/epoll_ctl.2:194
1658 "When successful, B<epoll_ctl>() returns zero. When an error occurs, "
1659 "B<epoll_ctl>() returns -1 and I<errno> is set appropriately."
1661 "成功した場合、 B<epoll_ctl>() は 0 を返す。 エラーが起こった場合、 "
1662 "B<epoll_ctl>() は -1 を返し、 I<errno> を適切に設定する。"
1665 #: build/C/man2/epoll_ctl.2:195 build/C/man2/epoll_wait.2:163
1671 #: build/C/man2/epoll_ctl.2:201
1672 msgid "I<epfd> or I<fd> is not a valid file descriptor."
1673 msgstr "I<epfd> か I<fd> が有効なファイルディスクリプターでない。"
1676 #: build/C/man2/epoll_ctl.2:201
1682 #: build/C/man2/epoll_ctl.2:209
1684 "I<op> was B<EPOLL_CTL_ADD>, and the supplied file descriptor I<fd> is "
1685 "already registered with this epoll instance."
1687 "I<op> が B<EPOLL_CTL_ADD> であり、かつ与えられたファイルディスクリプター "
1688 "I<fd> がこの epoll インスタンスに既に登録されている。"
1691 #: build/C/man2/epoll_ctl.2:222
1693 "I<epfd> is not an B<epoll> file descriptor, or I<fd> is the same as I<epfd>, "
1694 "or the requested operation I<op> is not supported by this interface."
1696 "I<epfd> が B<epoll> ファイルディスクリプターでない。 または I<fd> が I<epfd> "
1697 "と同一である。 または要求された操作 I<op> がこのインターフェースでサポートさ"
1701 #: build/C/man2/epoll_ctl.2:222
1707 #: build/C/man2/epoll_ctl.2:232
1709 "I<op> was B<EPOLL_CTL_MOD> or B<EPOLL_CTL_DEL>, and I<fd> is not registered "
1710 "with this epoll instance."
1712 "I<op> が B<EPOLL_CTL_MOD> または B<EPOLL_CTL_DEL> で、かつ I<fd> がこの "
1713 "epoll インスタンスに登録されていない。"
1716 #: build/C/man2/epoll_ctl.2:237
1718 "There was insufficient memory to handle the requested I<op> control "
1720 msgstr "要求された I<op> 制御操作を扱うのに十分なメモリーがない。"
1723 #: build/C/man2/epoll_ctl.2:237
1729 #: build/C/man2/epoll_ctl.2:247
1731 "The limit imposed by I</proc/sys/fs/epoll/max_user_watches> was encountered "
1732 "while trying to register (B<EPOLL_CTL_ADD>) a new file descriptor on an "
1733 "epoll instance. See B<epoll>(7) for further details."
1735 "epoll インスタンスに新しいファイルディスクリプターを登録 (B<EPOLL_CTL_ADD>) "
1736 "しようとした際に、 I</proc/sys/fs/epoll/max_user_watches> で決まる上限に達し"
1737 "た。 詳細は B<epoll>(7) を参照。"
1740 #: build/C/man2/epoll_ctl.2:247
1746 #: build/C/man2/epoll_ctl.2:256
1748 "The target file I<fd> does not support B<epoll>. This error can occur if "
1749 "I<fd> refers to, for example, a regular file or a directory."
1751 "対象ファイル I<fd> が B<epoll> に対応していない。 このエラーは I<fd> が例えば"
1752 "通常ファイルやディレクトリを参照している場合にも起こり得る。"
1754 #. To be precise: kernel 2.5.44.
1755 #. The interface should be finalized by Linux kernel 2.5.66.
1757 #: build/C/man2/epoll_ctl.2:261
1758 msgid "B<epoll_ctl>() was added to the kernel in version 2.6."
1759 msgstr "B<epoll_ctl>() はカーネル 2.6 で追加された。"
1762 #: build/C/man2/epoll_ctl.2:265
1764 "B<epoll_ctl>() is Linux-specific. Library support is provided in glibc "
1765 "starting with version 2.3.2."
1767 "B<epoll_ctl>() は Linux 独自である。\n"
1768 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1771 #: build/C/man2/epoll_ctl.2:270
1773 "The B<epoll> interface supports all file descriptors that support B<poll>(2)."
1775 "B<epoll> インターフェースは、 B<poll>(2) に対応している全てのファイルディス"
1779 #: build/C/man2/epoll_ctl.2:270 build/C/man2/epoll_wait.2:217
1780 #: build/C/man2/poll.2:393
1786 #: build/C/man2/epoll_ctl.2:284
1788 "In kernel versions before 2.6.9, the B<EPOLL_CTL_DEL> operation required a "
1789 "non-null pointer in I<event>, even though this argument is ignored. Since "
1790 "Linux 2.6.9, I<event> can be specified as NULL when using B<EPOLL_CTL_DEL>. "
1791 "Applications that need to be portable to kernels before 2.6.9 should specify "
1792 "a non-null pointer in I<event>."
1794 "Linux 2.6.9 より前では、 B<EPOLL_CTL_DEL> 操作の際、引き数 I<event> に (たと"
1795 "え無視される場合であっても) NULL でないポインターを渡す必要があった。 カーネ"
1796 "ル 2.6.9 以降では、 B<EPOLL_CTL_DEL> を使う際に I<event> に NULL を指定できる"
1797 "ようになっている。 2.6.9 より前のカーネルへの移植性が必要なアプリケーションで"
1798 "は、 I<event> に NULL でないポインターを指定すべきである。"
1800 #. commit a8159414d7e3af7233e7a5a82d1c5d85379bd75c (behavior change)
1801 #. https://lwn.net/Articles/520198/
1803 #: build/C/man2/epoll_ctl.2:311
1805 "If B<EPOLLWAKEUP> is specified in I<flags>, but the caller does not have the "
1806 "B<CAP_BLOCK_SUSPEND> capability, then the B<EPOLLWAKEUP> flag is I<silently "
1807 "ignored>. This unfortunate behavior is necessary because no validity checks "
1808 "were performed on the I<flags> argument in the original implementation, and "
1809 "the addition of the B<EPOLLWAKEUP> with a check that caused the call to fail "
1810 "if the caller did not have the B<CAP_BLOCK_SUSPEND> capability caused a "
1811 "breakage in at least one existing user-space application that happened to "
1812 "randomly (and uselessly) specify this bit. A robust application should "
1813 "therefore double check that it has the B<CAP_BLOCK_SUSPEND> capability if "
1814 "attempting to use the B<EPOLLWAKEUP> flag."
1816 "I<flags> に B<EPOLLWAKEUP> が指定されたが、呼び出し元が B<CAP_BLOCK_SUSPEND> "
1817 "ケーパビリティを持っていない場合、 B<EPOLLWAKEUP> フラグは I<黙って無視される"
1818 ">。 元の実装では I<flags> 引き数に対する正当性チェックが実行されていないた"
1819 "め、 この残念な動作は必要である。 また、 呼び出し元が B<CAP_BLOCK_SUSPEND> "
1820 "ケーパビリティを持っていなかった場合に呼び出しを失敗させるようにチェックを "
1821 "B<EPOLLWAKEUP> に追加すると、 少なくともひとつは動かなくなる既存のユーザー空"
1822 "間アプリケーションがあった。 そのアプリケーションはたまたま (しかも意味もな"
1823 "く) このビットを指定していた。 したがって、信頼性が求められるアプリケーション"
1824 "では、 B<EPOLLWAKEUP> フラグを使おうする場合には B<CAP_BLOCK_SUSPEND> ケーパ"
1825 "ビリティを持っているかも確認するようにすべきである。"
1828 #: build/C/man2/epoll_ctl.2:316
1829 msgid "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1830 msgstr "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1833 #: build/C/man2/epoll_wait.2:22
1839 #: build/C/man2/epoll_wait.2:22
1845 #: build/C/man2/epoll_wait.2:25
1847 "epoll_wait, epoll_pwait - wait for an I/O event on an epoll file descriptor"
1849 "epoll_wait, epoll_pwait - epoll ファイルディスクリプターの I/O イベントを待つ"
1852 #: build/C/man2/epoll_wait.2:34
1855 "B<int epoll_wait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1856 "B< int >I<maxevents>B<, int >I<timeout>B<);>\n"
1857 "B<int epoll_pwait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1858 "B< int >I<maxevents>B<, int >I<timeout>B<,>\n"
1859 "B< const sigset_t *>I<sigmask>B<);>\n"
1861 "B<int epoll_wait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1862 "B< int >I<maxevents>B<, int >I<timeout>B<);>\n"
1863 "B<int epoll_pwait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1864 "B< int >I<maxevents>B<, int >I<timeout>B<,>\n"
1865 "B< const sigset_t *>I<sigmask>B<);>\n"
1868 #: build/C/man2/epoll_wait.2:52
1870 "The B<epoll_wait>() system call waits for events on the B<epoll>(7) "
1871 "instance referred to by the file descriptor I<epfd>. The memory area "
1872 "pointed to by I<events> will contain the events that will be available for "
1873 "the caller. Up to I<maxevents> are returned by B<epoll_wait>(). The "
1874 "I<maxevents> argument must be greater than zero."
1876 "B<epoll_wait>() システムコールは、ファイルディスクリプター I<epfd> で参照され"
1878 "B<epoll>(7) インスタンスに対するイベントを待つ。 I<events> が指すメモリー領域"
1880 "呼び出し側が利用可能なイベントが格納される。最大 I<maxevents> 個のイベント"
1882 "B<epoll_wait>() によって返される。\n"
1883 "I<maxevents> 引き数は 0 より大きくなければならない。"
1886 #: build/C/man2/epoll_wait.2:59
1888 "The I<timeout> argument specifies the number of milliseconds that "
1889 "B<epoll_wait>() will block. The call will block until either:"
1891 "I<timeout> 引き数は B<epoll_wait>() が停止する時間をミリ秒で指定する。 "
1892 "B<epoll_wait>() の呼び出しは以下のいずれかになるまで停止する。"
1895 #: build/C/man2/epoll_wait.2:61
1896 msgid "a file descriptor delivers an event;"
1897 msgstr "ファイルディスクリプターがイベントを配送した"
1900 #: build/C/man2/epoll_wait.2:63 build/C/man2/poll.2:138
1901 msgid "the call is interrupted by a signal handler; or"
1902 msgstr "呼び出しがシグナルハンドラーにより割り込まれた"
1905 #: build/C/man2/epoll_wait.2:65 build/C/man2/poll.2:140
1906 msgid "the timeout expires."
1907 msgstr "タイムアウトが満了する"
1910 #: build/C/man2/epoll_wait.2:80
1912 "Note that the I<timeout> interval will be rounded up to the system clock "
1913 "granularity, and kernel scheduling delays mean that the blocking interval "
1914 "may overrun by a small amount. Specifying a I<timeout> of -1 causes "
1915 "B<epoll_wait>() to block indefinitely, while specifying a I<timeout> equal "
1916 "to zero cause B<epoll_wait>() to return immediately, even if no events are "
1919 "I<timeout> 時間はシステムクロックの粒度に切り上げられ、カーネルのスケジューリ"
1920 "ング遅延により少しだけ長くなる可能性がある点に注意すること。 I<timeout> を "
1921 "-1 に指定すると、 B<epoll_wait>() は無限に停止する。 I<timeout> を 0 に指定す"
1922 "ると、 B<epoll_wait>() は利用可能なイベントがなくても、すぐに返る。"
1925 #: build/C/man2/epoll_wait.2:84
1926 msgid "The I<struct epoll_event> is defined as:"
1927 msgstr "I<struct epoll_event> は以下のように定義される。"
1930 #: build/C/man2/epoll_wait.2:93
1933 "typedef union epoll_data {\n"
1940 "typedef union epoll_data {\n"
1948 #: build/C/man2/epoll_wait.2:98
1951 "struct epoll_event {\n"
1952 " uint32_t events; /* Epoll events */\n"
1953 " epoll_data_t data; /* User data variable */\n"
1956 "struct epoll_event {\n"
1957 " uint32_t events; /* epoll イベント */\n"
1958 " epoll_data_t data; /* ユーザーデータ変数 */\n"
1962 #: build/C/man2/epoll_wait.2:109
1964 "The I<data> of each returned structure will contain the same data the user "
1965 "set with an B<epoll_ctl>(2) (B<EPOLL_CTL_ADD>, B<EPOLL_CTL_MOD>) while the "
1966 "I<events> member will contain the returned event bit field."
1968 "返される構造体の I<data> メンバには、ユーザーが B<epoll_ctl>(2) "
1969 "(B<EPOLL_CTL_ADD>, B<EPOLL_CTL_MOD>) で指定したデータが格納される。 一方、 "
1970 "I<events> メンバには返された利用可能なイベントのビットフィールドが格納され"
1974 #: build/C/man2/epoll_wait.2:109
1976 msgid "epoll_pwait()"
1977 msgstr "epoll_pwait()"
1980 #: build/C/man2/epoll_wait.2:123
1982 "The relationship between B<epoll_wait>() and B<epoll_pwait>() is analogous "
1983 "to the relationship between B<select>(2) and B<pselect>(2): like "
1984 "B<pselect>(2), B<epoll_pwait>() allows an application to safely wait until "
1985 "either a file descriptor becomes ready or until a signal is caught."
1987 "B<epoll_wait>() と B<epoll_pwait>() の関係は、 B<select>(2) と "
1988 "B<pselect>(2) の関係と同様である。 B<pselect>(2) 同様、 B<epoll_pwait>() "
1989 "を使うと、アプリケーションは、ファイルディスクリプターが準備できた状態になる"
1990 "か、 シグナルが捕捉されるまで、安全に待つことができる。"
1993 #: build/C/man2/epoll_wait.2:127
1994 msgid "The following B<epoll_pwait>() call:"
1995 msgstr "以下の B<epoll_pwait>() の呼び出しは、"
1998 #: build/C/man2/epoll_wait.2:130
2000 msgid " ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
2001 msgstr " ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
2004 #: build/C/man2/epoll_wait.2:135 build/C/man2/poll.2:250
2005 msgid "is equivalent to I<atomically> executing the following calls:"
2006 msgstr "次の呼び出しを I<atomic> に実行するのと等価である。"
2009 #: build/C/man2/epoll_wait.2:138
2011 msgid " sigset_t origmask;\n"
2012 msgstr " sigset_t origmask;\n"
2015 #: build/C/man2/epoll_wait.2:142
2018 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2019 " ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
2020 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2022 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2023 " ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
2024 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2027 #: build/C/man2/epoll_wait.2:150
2029 "The I<sigmask> argument may be specified as NULL, in which case "
2030 "B<epoll_pwait>() is equivalent to B<epoll_wait>()."
2032 "I<sigmask> 引き数には NULL を指定してもよい。 その場合には、 "
2033 "B<epoll_pwait>() は B<epoll_wait>() と等価となる。"
2036 #: build/C/man2/epoll_wait.2:162
2038 "When successful, B<epoll_wait>() returns the number of file descriptors "
2039 "ready for the requested I/O, or zero if no file descriptor became ready "
2040 "during the requested I<timeout> milliseconds. When an error occurs, "
2041 "B<epoll_wait>() returns -1 and I<errno> is set appropriately."
2043 "成功した場合、 B<epoll_wait>() は要求された I/O に対して準備ができているファ"
2044 "イルディスクリプターの数を返す。 また要求された I<timeout> ミリ秒の間にファイ"
2045 "ルディスクリプターが準備できない場合は、0 を返す。 エラーが起こった場合、 "
2046 "B<epoll_wait>() は -1 を返し、 I<errno> を適切に設定する。"
2049 #: build/C/man2/epoll_wait.2:167
2050 msgid "I<epfd> is not a valid file descriptor."
2051 msgstr "I<epfd> が有効なファイルディスクリプターでない。"
2054 #: build/C/man2/epoll_wait.2:167 build/C/man2/poll.2:312
2060 #: build/C/man2/epoll_wait.2:172
2062 "The memory area pointed to by I<events> is not accessible with write "
2064 msgstr "I<events> で指されるメモリー領域に書き込み権限でアクセスできない。"
2067 #: build/C/man2/epoll_wait.2:172 build/C/man2/poll.2:316
2073 #: build/C/man2/epoll_wait.2:179
2075 "The call was interrupted by a signal handler before either (1) any of the "
2076 "requested events occurred or (2) the I<timeout> expired; see B<signal>(7)."
2078 "(1) 要求されたどのイベントも発生せず、かつ (2) I<timeout> の期限が切れる前"
2079 "に、システムコールがシグナルハンドラーによって割り込まれた。 B<signal>(7) 参"
2083 #: build/C/man2/epoll_wait.2:187
2085 "I<epfd> is not an B<epoll> file descriptor, or I<maxevents> is less than or "
2088 "I<epfd> が B<epoll> ファイルディスクリプターでない。 または I<maxevents> が "
2091 #. To be precise: kernel 2.5.44.
2092 #. The interface should be finalized by Linux kernel 2.5.66.
2094 #: build/C/man2/epoll_wait.2:193
2096 "B<epoll_wait>() was added to the kernel in version 2.6. Library support is "
2097 "provided in glibc starting with version 2.3.2."
2099 "B<epoll_wait>() はカーネル 2.6 で追加された。\n"
2100 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
2103 #: build/C/man2/epoll_wait.2:197
2105 "B<epoll_pwait>() was added to Linux in kernel 2.6.19. Library support is "
2106 "provided in glibc starting with version 2.6."
2108 "B<epoll_pwait>() はカーネル 2.6.19 で Linux に追加された。\n"
2109 "ライブラリによるサポートは glibc バージョン 2.6 以降で提供されている。"
2112 #: build/C/man2/epoll_wait.2:200
2113 msgid "B<epoll_wait>() is Linux-specific."
2114 msgstr "B<epoll_wait>() は Linux 独自である。"
2117 #: build/C/man2/epoll_wait.2:210
2119 "While one thread is blocked in a call to B<epoll_pwait>(), it is possible "
2120 "for another thread to add a file descriptor to the waited-upon B<epoll> "
2121 "instance. If the new file descriptor becomes ready, it will cause the "
2122 "B<epoll_wait>() call to unblock."
2124 "あるスレッドが B<epoll_pwait>() を呼び出して停止されている間に、\n"
2125 "別のスレッドが wait 中の B<epoll> インストールにファイルディスクリプターを\n"
2126 "追加することがある。新しいファイルディスクリプターでイベントが発生すると、\n"
2127 "B<epoll_wait>() の呼び出しによる停止が解除されることになる。"
2130 #: build/C/man2/epoll_wait.2:217
2132 "For a discussion of what may happen if a file descriptor in an B<epoll> "
2133 "instance being monitored by B<epoll_wait>() is closed in another thread, "
2136 "B<epoll_wait>() で監視中の B<epoll> インスタンス内のファイルディスクリプター"
2137 "が別のスレッドによってクローズされた場合に何が起こるかの議論については、 "
2138 "B<select>(2) を参照してほしい。"
2141 #: build/C/man2/epoll_wait.2:229
2143 "In kernels before 2.6.37, a I<timeout> value larger than approximately "
2144 "I<LONG_MAX / HZ> milliseconds is treated as -1 (i.e., infinity). Thus, for "
2145 "example, on a system where the I<sizeof(long)> is 4 and the kernel I<HZ> "
2146 "value is 1000, this means that timeouts greater than 35.79 minutes are "
2147 "treated as infinity."
2149 "バージョン 2.6.37 より前のカーネルでは、おおよそ I<LONG_MAX / HZ> ミリ秒より"
2150 "大きい I<timeout> 値は -1 (つまり無限大) として扱われる。したがって、例えば、"
2151 "I<sizeof(long)> が 4 で、カーネルの I<HZ> の値が 1000 のシステムでは、 35.79 "
2152 "分よりも大きなタイムアウトは無限大として扱われるということである。"
2155 #: build/C/man2/epoll_wait.2:229 build/C/man2/poll.2:366
2157 msgid "C library/kernel ABI differences"
2158 msgstr "C ライブラリとカーネル ABI の違い"
2161 #: build/C/man2/epoll_wait.2:242
2163 "The raw B<epoll_pwait>() system call has a sixth argument, I<size_t "
2164 "sigsetsize>, which specifies the size in bytes of the I<sigmask> argument. "
2165 "The glibc B<epoll_pwait>() wrapper function specifies this argument as a "
2166 "fixed value (equal to I<sizeof(sigset_t)>)."
2168 "素の B<epoll_pwait>() システムコールは 6 番目の引き数 I<size_t sigsetsize> を"
2169 "取る。 この引き数は I<sigmask> 引き数のバイト単位のサイズを指定する。 glibc "
2170 "の B<epoll_pwait>() ラッパー関数は、この引き数に固定値 (I<sizeof(sigset_t)> "
2174 #: build/C/man2/epoll_wait.2:246
2175 msgid "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
2176 msgstr "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
2179 #: build/C/man2/poll.2:31
2185 #: build/C/man2/poll.2:31
2191 #: build/C/man2/poll.2:34
2192 msgid "poll, ppoll - wait for some event on a file descriptor"
2193 msgstr "poll, ppoll - ファイルディスクリプターにおけるイベントを待つ"
2196 #: build/C/man2/poll.2:37
2198 msgid "B<#include E<lt>poll.hE<gt>>\n"
2199 msgstr "B<#include E<lt>poll.hE<gt>>\n"
2202 #: build/C/man2/poll.2:39
2204 msgid "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
2205 msgstr "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
2208 #: build/C/man2/poll.2:43
2211 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
2212 "B<#include E<lt>signal.hE<gt>>\n"
2213 "B<#include E<lt>poll.hE<gt>>\n"
2215 "B<#define _GNU_SOURCE> /* feature_test_macros(7) 参照 */\n"
2216 "B<#include E<lt>signal.hE<gt>>\n"
2217 "B<#include E<lt>poll.hE<gt>>\n"
2220 #: build/C/man2/poll.2:46
2223 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, >\n"
2224 "B< const struct timespec *>I<timeout_ts>B<, const sigset_t *>I<sigmask>B<);>\n"
2226 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, >\n"
2227 "B< const struct timespec *>I<timeout_ts>B<, const sigset_t *>I<sigmask>B<);>\n"
2230 #: build/C/man2/poll.2:53
2232 "B<poll>() performs a similar task to B<select>(2): it waits for one of a "
2233 "set of file descriptors to become ready to perform I/O."
2235 "B<poll>() は B<select>(2) と同様の仕事を行う、つまり、ファイルディスクリプ"
2236 "ター集合のいずれか一つが I/O を実行可能な状態になるのを待つ。"
2239 #: build/C/man2/poll.2:57
2241 "The set of file descriptors to be monitored is specified in the I<fds> "
2242 "argument, which is an array of structures of the following form:"
2244 "監視するファイルディスクリプター集合は、 I<fds> 引き数で指定する。 I<fds> "
2248 #: build/C/man2/poll.2:65
2252 " int fd; /* file descriptor */\n"
2253 " short events; /* requested events */\n"
2254 " short revents; /* returned events */\n"
2258 " int fd; /* file descriptor */\n"
2259 " short events; /* requested events */\n"
2260 " short revents; /* returned events */\n"
2264 #: build/C/man2/poll.2:72
2266 "The caller should specify the number of items in the I<fds> array in I<nfds>."
2267 msgstr "I<nfds> には、 I<fds> 配列の要素数を指定する。"
2270 #: build/C/man2/poll.2:88
2272 "The field I<fd> contains a file descriptor for an open file. If this field "
2273 "is negative, then the corresponding I<events> field is ignored and the "
2274 "I<revents> field returns zero. (This provides an easy way of ignoring a "
2275 "file descriptor for a single B<poll>() call: simply negate the I<fd> "
2276 "field. Note, however, that this technique can't be used to ignore file "
2279 "I<fd> フィールドには、オープンされたファイルのファイルディスクリプターが入"
2280 "る。 このフィールドが負の場合、対応する I<events> フィールドは無視され、 "
2281 "I<revents> には 0 が返される。(この機能により、一つの B<poll>() の呼び出しで"
2282 "簡単にあるファイルディスクリプターを無視することができる。 単に I<fd> フィー"
2283 "ルドの符号を反転するだけでよい。 ただし、この方法はファイルディスクリプター "
2284 "0 を無視するのには使用できない点に注意すること。)"
2287 #: build/C/man2/poll.2:103
2289 "The field I<events> is an input parameter, a bit mask specifying the events "
2290 "the application is interested in for the file descriptor I<fd>. This field "
2291 "may be specified as zero, in which case the only events that can be returned "
2292 "in I<revents> are B<POLLHUP>, B<POLLERR>, and B<POLLNVAL> (see below)."
2294 "構造体の I<events> 要素は入力パラメーターで、 ファイルディスクリプター I<fd> "
2295 "に関して、 アプリケーションが興味を持っているイベントのビットマスクを指定す"
2296 "る。 このフィールドには 0 を指定することもでき、 その場合 I<revents> で返され"
2297 "るイベントは B<POLLHUP>, B<POLLERR>, B<POLLNVAL> だけである (下記参照)。"
2300 #: build/C/man2/poll.2:122
2302 "The field I<revents> is an output parameter, filled by the kernel with the "
2303 "events that actually occurred. The bits returned in I<revents> can include "
2304 "any of those specified in I<events>, or one of the values B<POLLERR>, "
2305 "B<POLLHUP>, or B<POLLNVAL>. (These three bits are meaningless in the "
2306 "I<events> field, and will be set in the I<revents> field whenever the "
2307 "corresponding condition is true.)"
2309 "I<revents> 要素は出力パラメーターで、実際に起こったイベントがカーネルにより設"
2310 "定される。 I<revents> で返されるビット列には、 I<events> で指定したもののどれ"
2311 "か、もしくは B<POLLERR>, B<POLLHUP>, B<POLLNVAL> のうちの一つが含まれる "
2312 "(B<POLLERR>, B<POLLHUP>, B<POLLNVAL> の 3つのビットは I<events> に指定しても"
2313 "意味がなく、対応した状態が真の場合に I<revents> に設定される)。"
2316 #: build/C/man2/poll.2:127
2318 "If none of the events requested (and no error) has occurred for any of the "
2319 "file descriptors, then B<poll>() blocks until one of the events occurs."
2321 "どのファイルディスクリプターにも要求したイベントが発生しておらず、 エラーも起"
2322 "こらない場合、 B<poll>() はイベントのうちいずれか一つが発生するまで停止 "
2326 #: build/C/man2/poll.2:134
2328 "The I<timeout> argument specifies the number of milliseconds that B<poll>() "
2329 "should block waiting for a file descriptor to become ready. The call will "
2330 "block until either:"
2332 "I<timeout> 引き数は、 ファイルディスクリプターが利用可能になるまで B<poll>() "
2333 "が停止する時間をミリ秒で指定する。 B<poll>() の呼び出しは以下のいずれかになる"
2337 #: build/C/man2/poll.2:136
2338 msgid "a file descriptor becomes ready;"
2339 msgstr "ファイルディスクリプターが利用可能になる"
2342 #: build/C/man2/poll.2:154
2344 "Note that the I<timeout> interval will be rounded up to the system clock "
2345 "granularity, and kernel scheduling delays mean that the blocking interval "
2346 "may overrun by a small amount. Specifying a negative value in I<timeout> "
2347 "means an infinite timeout. Specifying a I<timeout> of zero causes "
2348 "B<poll>() to return immediately, even if no file descriptors are ready."
2350 "I<timeout> 時間はシステムクロックの粒度に切り上げられ、 カーネルのスケジュー"
2351 "リング遅延により少しだけ長くなる可能性がある点に注意すること。 I<timeout> に"
2352 "負の値を指定した場合、タイムアウト時間が無限大を意味する。 I<timeout> を 0 に"
2353 "指定した場合、I/O 可能なファイルディスクリプターがない場合であっても、 "
2357 #: build/C/man2/poll.2:160
2359 "The bits that may be set/returned in I<events> and I<revents> are defined in "
2360 "I<E<lt>poll.hE<gt>>:"
2362 "I<events> に指定したり、 I<revents> で返されるビットは I<E<lt>poll.hE<gt>> で"
2366 #: build/C/man2/poll.2:161
2372 #: build/C/man2/poll.2:164
2373 msgid "There is data to read."
2374 msgstr "読み出し可能なデータがある。"
2377 #: build/C/man2/poll.2:164
2383 #: build/C/man2/poll.2:168
2385 "There is urgent data to read (e.g., out-of-band data on TCP socket; "
2386 "pseudoterminal master in packet mode has seen state change in slave)."
2388 "読み出し可能な緊急データ (urgent data) がある (例えば、TCP ソケットの帯域外 "
2389 "(out-of-band data) データを受信した場合や、 パケットモードの擬似端末のマスタ"
2390 "がスレーブ側の変化を見つけたとき)。"
2393 #: build/C/man2/poll.2:168
2399 #: build/C/man2/poll.2:174
2401 "Writing is now possible, though a write larger that the available space in a "
2402 "socket or pipe will still block (unless B<O_NONBLOCK> is set)."
2404 "書き込みが可能になった。ただし、ソケットやパイプで利用可能な空間よりも大きな"
2405 "データを書き込んだ場合には (B<O_NONBLOCK> がセットされている場合以外は) やは"
2409 #: build/C/man2/poll.2:174
2411 msgid "B<POLLRDHUP> (since Linux 2.6.17)"
2412 msgstr "B<POLLRDHUP> (Linux 2.6.17 以降)"
2415 #: build/C/man2/poll.2:185
2417 "Stream socket peer closed connection, or shut down writing half of "
2418 "connection. The B<_GNU_SOURCE> feature test macro must be defined (before "
2419 "including I<any> header files) in order to obtain this definition."
2421 "ストリームソケットの他端が、コネクションを close したか、 コネクションの書き"
2422 "込み側を shutdown した。 この定義を有効にするには、 (「どの」ヘッダーファイル"
2423 "をインクルードするよりも前に) B<_GNU_SOURCE> 機能検査マクロを定義しなければ"
2427 #: build/C/man2/poll.2:185
2433 #: build/C/man2/poll.2:188
2434 msgid "Error condition (output only)."
2435 msgstr "エラー状態 (出力の場合のみ)。"
2438 #: build/C/man2/poll.2:188
2444 #: build/C/man2/poll.2:191
2445 msgid "Hang up (output only)."
2446 msgstr "ハングアップした (出力の場合のみ)。"
2449 #: build/C/man2/poll.2:191
2452 msgstr "B<POLLNVAL>"
2455 #: build/C/man2/poll.2:196
2456 msgid "Invalid request: I<fd> not open (output only)."
2457 msgstr "不正な要求: I<fd> がオープンされていない (出力の場合のみ)。"
2460 #: build/C/man2/poll.2:202
2462 "When compiling with B<_XOPEN_SOURCE> defined, one also has the following, "
2463 "which convey no further information beyond the bits listed above:"
2465 "B<_XOPEN_SOURCE> を定義してコンパイルした場合には、以下の定義も行われる。 た"
2466 "だし、上記のリストにあるビット以上の情報が得られる訳ではない。"
2469 #: build/C/man2/poll.2:203
2471 msgid "B<POLLRDNORM>"
2472 msgstr "B<POLLRDNORM>"
2475 #: build/C/man2/poll.2:207
2476 msgid "Equivalent to B<POLLIN>."
2477 msgstr "B<POLLIN> と同じ。"
2480 #: build/C/man2/poll.2:207
2482 msgid "B<POLLRDBAND>"
2483 msgstr "B<POLLRDBAND>"
2485 #. POLLRDBAND is used in the DECnet protocol.
2487 #: build/C/man2/poll.2:211
2488 msgid "Priority band data can be read (generally unused on Linux)."
2490 "優先帯域データ (priority band data) が読み出し可能である (普通は Linux では使"
2494 #: build/C/man2/poll.2:211
2496 msgid "B<POLLWRNORM>"
2497 msgstr "B<POLLWRNORM>"
2500 #: build/C/man2/poll.2:215
2501 msgid "Equivalent to B<POLLOUT>."
2502 msgstr "B<POLLOUT> と同じ。"
2505 #: build/C/man2/poll.2:215
2507 msgid "B<POLLWRBAND>"
2508 msgstr "B<POLLWRBAND>"
2511 #: build/C/man2/poll.2:218
2512 msgid "Priority data may be written."
2513 msgstr "優先帯域データ (priority data) が書き込み可能である。"
2516 #: build/C/man2/poll.2:222
2517 msgid "Linux also knows about, but does not use B<POLLMSG>."
2518 msgstr "Linux では B<POLLMSG> も定義されているが、使用されていない。"
2521 #: build/C/man2/poll.2:222
2527 #: build/C/man2/poll.2:236
2529 "The relationship between B<poll>() and B<ppoll>() is analogous to the "
2530 "relationship between B<select>(2) and B<pselect>(2): like B<pselect>(2), "
2531 "B<ppoll>() allows an application to safely wait until either a file "
2532 "descriptor becomes ready or until a signal is caught."
2534 "B<poll>() と B<ppoll>() の関係は B<select>(2) と B<pselect>(2) の関係と同"
2535 "じようなものである: B<pselect>(2) と同様に、 B<ppoll>() を使うと、アプリ"
2536 "ケーションはファイルディスクリプターの状態変化 もしくはシグナルの捕捉を安全に"
2540 #: build/C/man2/poll.2:242
2542 "Other than the difference in the precision of the I<timeout> argument, the "
2543 "following B<ppoll>() call:"
2545 "I<timeout> 引き数の精度の違いを除くと、以下の B<ppoll>() の呼び出しは、"
2548 #: build/C/man2/poll.2:245
2550 msgid " ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2551 msgstr " ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2554 #: build/C/man2/poll.2:254
2557 " sigset_t origmask;\n"
2560 " sigset_t origmask;\n"
2564 #: build/C/man2/poll.2:260
2567 " timeout = (timeout_ts == NULL) ? -1 :\n"
2568 " (timeout_ts.tv_sec * 1000 + timeout_ts.tv_nsec / 1000000);\n"
2569 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2570 " ready = poll(&fds, nfds, timeout);\n"
2571 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2573 " timeout = (timeout_ts == NULL) ? -1 :\n"
2574 " (timeout_ts.tv_sec * 1000 + timeout_ts.tv_nsec / 1000000);\n"
2575 " sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2576 " ready = poll(&fds, nfds, timeout);\n"
2577 " sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2580 #: build/C/man2/poll.2:267
2582 "See the description of B<pselect>(2) for an explanation of why B<ppoll>() "
2585 "なぜ B<ppoll>() が必要なのかについての説明は B<pselect>(2) の説明を参照のこ"
2589 #: build/C/man2/poll.2:279
2591 "If the I<sigmask> argument is specified as NULL, then no signal mask "
2592 "manipulation is performed (and thus B<ppoll>() differs from B<poll>() only "
2593 "in the precision of the I<timeout> argument)."
2595 "I<sigmask> 引き数に NULL が指定された場合、シグナルマスクの操作は行われない "
2596 "(したがって、 B<ppoll>() の B<poll>() との違いは I<timeout> 引き数の精度だ"
2600 #: build/C/man2/poll.2:286
2602 "The I<timeout_ts> argument specifies an upper limit on the amount of time "
2603 "that B<ppoll>() will block. This argument is a pointer to a structure of "
2604 "the following form:"
2606 "I<timeout> 引き数は B<ppoll>() が停止する時間の上限を指定するものである。 こ"
2607 "の引き数には以下の型の構造体へのポインターを指定する。"
2610 #: build/C/man2/poll.2:293
2613 "struct timespec {\n"
2614 " long tv_sec; /* seconds */\n"
2615 " long tv_nsec; /* nanoseconds */\n"
2618 "struct timespec {\n"
2619 " long tv_sec; /* seconds */\n"
2620 " long tv_nsec; /* nanoseconds */\n"
2624 #: build/C/man2/poll.2:301
2626 "If I<timeout_ts> is specified as NULL, then B<ppoll>() can block "
2629 "I<timeout_ts> に NULL が指定された場合、 B<ppoll> は無限に停止することがあり"
2633 #: build/C/man2/poll.2:311
2635 "On success, a positive number is returned; this is the number of structures "
2636 "which have nonzero I<revents> fields (in other words, those descriptors with "
2637 "events or errors reported). A value of 0 indicates that the call timed out "
2638 "and no file descriptors were ready. On error, -1 is returned, and I<errno> "
2639 "is set appropriately."
2641 "成功した場合は正の数を返す。この数は 0 以外の I<revents> 要素を持つ構造体の数"
2642 "である (別の言い方をすると、これらのディスクリプター にはイベントかエラー報告"
2643 "がある)。 値 0 は、タイムアウトとなり、どのファイルディスクリプターでもイベン"
2644 "トが 発生しなかったことを示す。エラーの場合は -1 が返され、 I<errno> が適切に"
2648 #: build/C/man2/poll.2:316
2650 "The array given as argument was not contained in the calling program's "
2653 "引き数として指定した配列が、呼び出したプロセスのアドレス空間に 含まれていな"
2657 #: build/C/man2/poll.2:320
2658 msgid "A signal occurred before any requested event; see B<signal>(7)."
2660 "要求されたイベントのどれかが起こる前にシグナルが発生した。 B<signal>(7) 参"
2664 #: build/C/man2/poll.2:327
2665 msgid "The I<nfds> value exceeds the B<RLIMIT_NOFILE> value."
2666 msgstr "I<nfds> の値が B<RLIMIT_NOFILE> を超えた。"
2669 #: build/C/man2/poll.2:330
2670 msgid "There was no space to allocate file descriptor tables."
2671 msgstr "ファイルディスクリプターテーブルを確保するためのメモリーがない。"
2673 #. library call was introduced in libc 5.4.28
2675 #: build/C/man2/poll.2:340
2677 "The B<poll>() system call was introduced in Linux 2.1.23. On older kernels "
2678 "that lack this system call, the glibc (and the old Linux libc) B<poll>() "
2679 "wrapper function provides emulation using B<select>(2)."
2681 "B<poll>() システムコールは Linux 2.1.23 で導入された。\n"
2682 "このシステムコールが存在しない古いカーネルでは、\n"
2683 "glibc (や古い Linux libc) は B<select>(2) を使用して B<poll>() \n"
2684 "ラッパー関数のエミュレーションを行う。"
2687 #: build/C/man2/poll.2:347
2689 "The B<ppoll>() system call was added to Linux in kernel 2.6.16. The "
2690 "B<ppoll>() library call was added in glibc 2.4."
2692 "B<ppoll>() システムコールは カーネル 2.6.16 で Linux に追加された。 "
2693 "B<ppoll>() ライブラリコールは glibc 2.4 に追加された。"
2695 #. NetBSD 3.0 has a pollts() which is like Linux ppoll().
2697 #: build/C/man2/poll.2:353
2698 msgid "B<poll>() conforms to POSIX.1-2001. B<ppoll>() is Linux-specific."
2700 "B<poll>() は POSIX.1-2001 に準拠している。 B<ppoll>() は Linux 固有である。"
2703 #: build/C/man2/poll.2:361
2705 "Some implementations define the nonstandard constant B<INFTIM> with the "
2706 "value -1 for use as a I<timeout> for B<poll>(). This constant is not "
2707 "provided in glibc."
2709 "いくつかの実装では、値 -1 を持った非標準の定数 B<INFTIM> が定義されており、 "
2710 "B<poll>() の I<timeout> の指定に使用できる。 この定数は glibc では定義されて"
2714 #: build/C/man2/poll.2:366
2716 "For a discussion of what may happen if a file descriptor being monitored by "
2717 "B<poll>() is closed in another thread, see B<select>(2)."
2719 "B<poll>() で監視中のファイルディスクリプターが別のスレッドによってクローズさ"
2720 "れた場合に何が起こるかの議論については、 B<select>(2) を参照してほしい。"
2723 #: build/C/man2/poll.2:380
2725 "The Linux B<ppoll>() system call modifies its I<timeout_ts> argument. "
2726 "However, the glibc wrapper function hides this behavior by using a local "
2727 "variable for the timeout argument that is passed to the system call. Thus, "
2728 "the glibc B<ppoll>() function does not modify its I<timeout_ts> argument."
2730 "Linux の B<ppoll>() システムコールは I<timeout_ts> 引き数を変更する。 しか"
2731 "し、glibc のラッパー関数は、システムコールに渡す timeout 引き数 としてローカ"
2732 "ル変数を使うことでこの動作を隠蔽している。 このため、glibc の B<ppoll>() 関"
2733 "数では I<timeout_ts> 引き数は変更されない。"
2736 #: build/C/man2/poll.2:393
2738 "The raw B<ppoll>() system call has a fifth argument, I<size_t sigsetsize>, "
2739 "which specifies the size in bytes of the I<sigmask> argument. The glibc "
2740 "B<ppoll>() wrapper function specifies this argument as a fixed value (equal "
2741 "to I<sizeof(sigset_t)>)."
2743 "素の B<ppoll>() システムコールは 5 番目の引き数 I<size_t sigsetsize> をと"
2744 "る。 この引き数は I<sigmask> 引き数のバイト単位のサイズを指定する。 glibc の "
2745 "B<ppoll>() ラッパー関数は、この引き数に固定値 (I<sizeof(sigset_t)> と同じ) を"
2749 #: build/C/man2/poll.2:397
2751 "See the discussion of spurious readiness notifications under the BUGS "
2752 "section of B<select>(2)."
2754 "B<select>(2) の「バグ」の節に書かれている、誤った準備完了通知 (spurious "
2755 "readiness notifications) についての議論を参照のこと。"
2758 #: build/C/man2/poll.2:402
2759 msgid "B<restart_syscall>(2), B<select>(2), B<select_tut>(2), B<time>(7)"
2760 msgstr "B<restart_syscall>(2), B<select>(2), B<select_tut>(2), B<time>(7)"