OSDN Git Service

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