OSDN Git Service

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