OSDN Git Service

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