OSDN Git Service

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