OSDN Git Service

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