OSDN Git Service

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