OSDN Git Service

LDP: Update POT and ja.po to LDP v3.79
[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-01-25 07:15+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 #, fuzzy
1106 #| msgid ""
1107 #| "This page is part of release 3.78 of the Linux I<man-pages> project.  A "
1108 #| "description of the project, information about reporting bugs, and the "
1109 #| "latest version of this page, can be found at \\%http://www.kernel.org/doc/"
1110 #| "man-pages/."
1111 msgid ""
1112 "This page is part of release 3.79 of the Linux I<man-pages> project.  A "
1113 "description of the project, information about reporting bugs, and the latest "
1114 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
1115 "pages/."
1116 msgstr ""
1117 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
1118 "である。プロジェクトの説明とバグ報告に関する情報は\n"
1119 "http://www.kernel.org/doc/man-pages/ に書かれている。"
1120
1121 #. type: TH
1122 #: build/C/man2/epoll_create.2:24
1123 #, no-wrap
1124 msgid "EPOLL_CREATE"
1125 msgstr "EPOLL_CREATE"
1126
1127 #. type: TH
1128 #: build/C/man2/epoll_create.2:24
1129 #, no-wrap
1130 msgid "2012-04-15"
1131 msgstr "2012-04-15"
1132
1133 #. type: Plain text
1134 #: build/C/man2/epoll_create.2:27
1135 msgid "epoll_create, epoll_create1 - open an epoll file descriptor"
1136 msgstr ""
1137 "epoll_create, epoll_create1 - epoll ファイルディスクリプターをオープンする"
1138
1139 #. type: Plain text
1140 #: build/C/man2/epoll_create.2:30 build/C/man2/epoll_wait.2:28
1141 #, no-wrap
1142 msgid "B<#include E<lt>sys/epoll.hE<gt>>\n"
1143 msgstr "B<#include E<lt>sys/epoll.hE<gt>>\n"
1144
1145 #. type: Plain text
1146 #: build/C/man2/epoll_create.2:33
1147 #, no-wrap
1148 msgid ""
1149 "B<int epoll_create(int >I<size>B<);>\n"
1150 "B<int epoll_create1(int >I<flags>B<);>\n"
1151 msgstr ""
1152 "B<int epoll_create(int >I<size>B<);>\n"
1153 "B<int epoll_create1(int >I<flags>B<);>\n"
1154
1155 #. type: Plain text
1156 #: build/C/man2/epoll_create.2:42
1157 msgid ""
1158 "B<epoll_create>()  creates an B<epoll>(7)  instance.  Since Linux 2.6.8, the "
1159 "I<size> argument is ignored, but must be greater than zero; see NOTES below."
1160 msgstr ""
1161 "B<epoll_create>()は B<epoll>(7) インスタンスを作成する。\n"
1162 "Linux 2.6.8 以降では、I<size> 引き数は無視されるが、 0 より大きな値で\n"
1163 "なければならない。下記の「注意」を参照。"
1164
1165 #. type: Plain text
1166 #: build/C/man2/epoll_create.2:55
1167 msgid ""
1168 "B<epoll_create>()  returns a file descriptor referring to the new epoll "
1169 "instance.  This file descriptor is used for all the subsequent calls to the "
1170 "B<epoll> interface.  When no longer required, the file descriptor returned "
1171 "by B<epoll_create>()  should be closed by using B<close>(2).  When all file "
1172 "descriptors referring to an epoll instance have been closed, the kernel "
1173 "destroys the instance and releases the associated resources for reuse."
1174 msgstr ""
1175 "B<epoll_create>()  は、新しい epoll インスタンスを参照するファイルディスクリ"
1176 "プターを返す。 このファイルディスクリプターは、その後の B<epoll> インター"
1177 "フェースの呼び出しに使われる。 もう必要でなくなった場合は、 "
1178 "B<epoll_create>()  で返されたファイルディスクリプターは B<close>(2)  を使って"
1179 "クローズされるべきである。 ある epoll インスタンスを参照する全てのファイル"
1180 "ディスクリプターがクローズされると、 カーネルはそのインスタンスを破壊して、対"
1181 "応するリソースを解放し、 再使用できるようにする。"
1182
1183 #. type: SS
1184 #: build/C/man2/epoll_create.2:55
1185 #, no-wrap
1186 msgid "epoll_create1()"
1187 msgstr "epoll_create1()"
1188
1189 #. type: Plain text
1190 #: build/C/man2/epoll_create.2:67
1191 msgid ""
1192 "If I<flags> is 0, then, other than the fact that the obsolete I<size> "
1193 "argument is dropped, B<epoll_create1>()  is the same as B<epoll_create>().  "
1194 "The following value can be included in I<flags> to obtain different behavior:"
1195 msgstr ""
1196 "B<epoll_create1>()  は、 I<flags> が 0 の場合、現在では使われていない "
1197 "I<size> 引き数がなくなっている点を除けば B<epoll_create>()  と同じである。 "
1198 "I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさ"
1199 "せることができる。"
1200
1201 #. type: TP
1202 #: build/C/man2/epoll_create.2:67
1203 #, no-wrap
1204 msgid "B<EPOLL_CLOEXEC>"
1205 msgstr "B<EPOLL_CLOEXEC>"
1206
1207 #. type: Plain text
1208 #: build/C/man2/epoll_create.2:77
1209 msgid ""
1210 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
1211 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
1212 "may be useful."
1213 msgstr ""
1214 "新しいファイルディスクリプターに対して close-on-exec (B<FD_CLOEXEC>)  フラグ"
1215 "をセットする。 このフラグが役に立つ理由については、 B<open>(2)  の "
1216 "B<O_CLOEXEC> フラグの説明を参照のこと。"
1217
1218 #. type: SH
1219 #: build/C/man2/epoll_create.2:77 build/C/man2/epoll_ctl.2:185
1220 #: build/C/man2/epoll_wait.2:150 build/C/man2/poll.2:301
1221 #, no-wrap
1222 msgid "RETURN VALUE"
1223 msgstr "返り値"
1224
1225 #. type: Plain text
1226 #: build/C/man2/epoll_create.2:84
1227 msgid ""
1228 "On success, these system calls return a nonnegative file descriptor.  On "
1229 "error, -1 is returned, and I<errno> is set to indicate the error."
1230 msgstr ""
1231 "成功すると、これらのシステムコールは 非負のファイルディスクリプターを返す。 "
1232 "エラーの場合、-1 を返し、 I<errno> にエラーを示す値を設定する。"
1233
1234 #. type: SH
1235 #: build/C/man2/epoll_create.2:84 build/C/man2/epoll_ctl.2:194
1236 #: build/C/man2/epoll_wait.2:162 build/C/man2/poll.2:311
1237 #, no-wrap
1238 msgid "ERRORS"
1239 msgstr "エラー"
1240
1241 #. type: TP
1242 #: build/C/man2/epoll_create.2:85 build/C/man2/epoll_create.2:89
1243 #: build/C/man2/epoll_ctl.2:209 build/C/man2/epoll_wait.2:179
1244 #: build/C/man2/poll.2:320
1245 #, no-wrap
1246 msgid "B<EINVAL>"
1247 msgstr "B<EINVAL>"
1248
1249 #. type: Plain text
1250 #: build/C/man2/epoll_create.2:89
1251 msgid "I<size> is not positive."
1252 msgstr "I<size> が正でない。"
1253
1254 #. type: Plain text
1255 #: build/C/man2/epoll_create.2:94
1256 msgid "(B<epoll_create1>())  Invalid value specified in I<flags>."
1257 msgstr "(B<epoll_create1>())  I<flags> に無効な値が指定された。"
1258
1259 #. type: TP
1260 #: build/C/man2/epoll_create.2:94
1261 #, no-wrap
1262 msgid "B<EMFILE>"
1263 msgstr "B<EMFILE>"
1264
1265 #. type: Plain text
1266 #: build/C/man2/epoll_create.2:102
1267 msgid ""
1268 "The per-user limit on the number of epoll instances imposed by I</proc/sys/"
1269 "fs/epoll/max_user_instances> was encountered.  See B<epoll>(7)  for further "
1270 "details."
1271 msgstr ""
1272 "I</proc/sys/fs/epoll/max_user_instances> によって指定されている、epoll インス"
1273 "タンスのユーザー単位の制限に達した。 更なる詳細については B<epoll>(7)  を参照"
1274 "のこと。"
1275
1276 #. type: TP
1277 #: build/C/man2/epoll_create.2:102
1278 #, no-wrap
1279 msgid "B<ENFILE>"
1280 msgstr "B<ENFILE>"
1281
1282 #. type: Plain text
1283 #: build/C/man2/epoll_create.2:105
1284 msgid "The system limit on the total number of open files has been reached."
1285 msgstr "オープンされたファイルの総数がシステム制限に達した。"
1286
1287 #. type: TP
1288 #: build/C/man2/epoll_create.2:105 build/C/man2/epoll_ctl.2:232
1289 #: build/C/man2/poll.2:327
1290 #, no-wrap
1291 msgid "B<ENOMEM>"
1292 msgstr "B<ENOMEM>"
1293
1294 #. type: Plain text
1295 #: build/C/man2/epoll_create.2:108
1296 msgid "There was insufficient memory to create the kernel object."
1297 msgstr "カーネルオブジェクトを作成するのに十分なメモリーがなかった。"
1298
1299 #. type: Plain text
1300 #: build/C/man2/epoll_create.2:112
1301 msgid ""
1302 "B<epoll_create>()  was added to the kernel in version 2.6.  Library support "
1303 "is provided in glibc starting with version 2.3.2."
1304 msgstr ""
1305 "B<epoll_create>() はカーネル 2.6 で追加された。\n"
1306 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1307
1308 #.  To be precise: kernel 2.5.44.
1309 #.  The interface should be finalized by Linux kernel 2.5.66.
1310 #. type: Plain text
1311 #: build/C/man2/epoll_create.2:118
1312 msgid ""
1313 "B<epoll_create1>()  was added to the kernel in version 2.6.27.  Library "
1314 "support is provided in glibc starting with version 2.9."
1315 msgstr ""
1316 "B<epoll_create1>() はカーネル 2.6.27 で追加された。\n"
1317 "ライブラリによるサポートは glibc バージョン 2.9 以降で提供されている。"
1318
1319 #. type: Plain text
1320 #: build/C/man2/epoll_create.2:121
1321 msgid "B<epoll_create>()  is Linux-specific."
1322 msgstr "B<epoll_create>() は Linux 独自である。"
1323
1324 #. type: SH
1325 #: build/C/man2/epoll_create.2:121 build/C/man2/epoll_ctl.2:265
1326 #: build/C/man2/epoll_wait.2:200 build/C/man2/poll.2:353
1327 #, no-wrap
1328 msgid "NOTES"
1329 msgstr "注意"
1330
1331 #. type: Plain text
1332 #: build/C/man2/epoll_create.2:144
1333 msgid ""
1334 "In the initial B<epoll_create>()  implementation, the I<size> argument "
1335 "informed the kernel of the number of file descriptors that the caller "
1336 "expected to add to the B<epoll> instance.  The kernel used this information "
1337 "as a hint for the amount of space to initially allocate in internal data "
1338 "structures describing events.  (If necessary, the kernel would allocate more "
1339 "space if the caller's usage exceeded the hint given in I<size>.)  Nowadays, "
1340 "this hint is no longer required (the kernel dynamically sizes the required "
1341 "data structures without needing the hint), but I<size> must still be greater "
1342 "than zero, in order to ensure backward compatibility when new B<epoll> "
1343 "applications are run on older kernels."
1344 msgstr ""
1345 "初期の B<epoll_create>() の実装では、I<size> 引き数は、呼び出し元が "
1346 "B<epoll>\n"
1347 "インスタンスに追加しようとするファイルディスクリプター数をカーネルに教えるの"
1348 "に\n"
1349 "使われていた。カーネルはこの情報をイベントの情報を格納する内部データ構造に"
1350 "最\n"
1351 "初に割り当てる大きさを決める際のヒントとして使用していた (I<size> で渡され"
1352 "た\n"
1353 "ヒントよりも使用量が大きくなった場合には、必要に応じてカーネルは追加で領域"
1354 "を\n"
1355 "割り当てる)。\n"
1356 "\n"
1357 "現在では、このヒントはもはや必要なくなっている (カーネルはヒントなしで必要"
1358 "な\n"
1359 "データ構造のサイズを動的に変更する) が、今も I<size> には 0 より大きい値を\n"
1360 "指定しなければならない。これは、B<epoll> を使うアプリケーションが古いカーネ"
1361 "ル\n"
1362 "で実行される際の後方互換性を保証するためである。"
1363
1364 #. type: Plain text
1365 #: build/C/man2/epoll_create.2:149
1366 msgid "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1367 msgstr "B<close>(2), B<epoll_ctl>(2), B<epoll_wait>(2), B<epoll>(7)"
1368
1369 #. type: TH
1370 #: build/C/man2/epoll_ctl.2:20
1371 #, no-wrap
1372 msgid "EPOLL_CTL"
1373 msgstr "EPOLL_CTL"
1374
1375 #. type: TH
1376 #: build/C/man2/epoll_ctl.2:20
1377 #, no-wrap
1378 msgid "2014-12-31"
1379 msgstr "2014-12-31"
1380
1381 #. type: Plain text
1382 #: build/C/man2/epoll_ctl.2:23
1383 msgid "epoll_ctl - control interface for an epoll descriptor"
1384 msgstr "epoll_ctl - epoll ディスクリプターのインターフェースを操作する"
1385
1386 #. type: Plain text
1387 #: build/C/man2/epoll_ctl.2:28
1388 msgid ""
1389 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1390 "epoll_event *>I<event>B<);>"
1391 msgstr ""
1392 "B<int epoll_ctl(int >I<epfd>B<, int >I<op>B<, int >I<fd>B<, struct "
1393 "epoll_event *>I<event>B<);>"
1394
1395 #. type: Plain text
1396 #: build/C/man2/epoll_ctl.2:38
1397 msgid ""
1398 "This system call performs control operations on the B<epoll>(7)  instance "
1399 "referred to by the file descriptor I<epfd>.  It requests that the operation "
1400 "I<op> be performed for the target file descriptor, I<fd>."
1401 msgstr ""
1402 "このシステムコールは、ファイルディスクリプター I<epfd> が参照する "
1403 "B<epoll>(7)\n"
1404 "インスタンスに対する操作を行う。 対象のファイルディスクリプター I<fd> に対し"
1405 "て、\n"
1406 "操作 I<op> の実行が要求される。"
1407
1408 #. type: Plain text
1409 #: build/C/man2/epoll_ctl.2:42
1410 msgid "Valid values for the I<op> argument are:"
1411 msgstr "I<op> 引き数に指定できる有効な値は以下の通りである。"
1412
1413 #. type: TP
1414 #: build/C/man2/epoll_ctl.2:42
1415 #, no-wrap
1416 msgid "B<EPOLL_CTL_ADD>"
1417 msgstr "B<EPOLL_CTL_ADD>"
1418
1419 #. type: Plain text
1420 #: build/C/man2/epoll_ctl.2:54
1421 msgid ""
1422 "Register the target file descriptor I<fd> on the B<epoll> instance referred "
1423 "to by the file descriptor I<epfd> and associate the event I<event> with the "
1424 "internal file linked to I<fd>."
1425 msgstr ""
1426 "対象のファイルディスクリプター I<fd> をファイルディスクリプター I<epfd> が参"
1427 "照する B<epoll> インスタンスに登録し、イベント I<event> を I<fd> に結び付けら"
1428 "れた内部ファイルに関連付ける。"
1429
1430 #. type: TP
1431 #: build/C/man2/epoll_ctl.2:54
1432 #, no-wrap
1433 msgid "B<EPOLL_CTL_MOD>"
1434 msgstr "B<EPOLL_CTL_MOD>"
1435
1436 #. type: Plain text
1437 #: build/C/man2/epoll_ctl.2:60
1438 msgid ""
1439 "Change the event I<event> associated with the target file descriptor I<fd>."
1440 msgstr ""
1441 "イベント I<event> を対象のファイルディスクリプター I<fd> に関連付けるように変"
1442 "更する。"
1443
1444 #. type: TP
1445 #: build/C/man2/epoll_ctl.2:60
1446 #, no-wrap
1447 msgid "B<EPOLL_CTL_DEL>"
1448 msgstr "B<EPOLL_CTL_DEL>"
1449
1450 #. type: Plain text
1451 #: build/C/man2/epoll_ctl.2:71
1452 msgid ""
1453 "Remove (deregister) the target file descriptor I<fd> from the B<epoll> "
1454 "instance referred to by I<epfd>.  The I<event> is ignored and can be NULL "
1455 "(but see BUGS below)."
1456 msgstr ""
1457 "対象のファイルディスクリプター I<fd> を I<epfd> が参照する B<epoll> インスタ"
1458 "ンスから削除する。 I<event> 引き数は無視されるので、NULL にすることもできる "
1459 "(但し、下記の「バグ」を参照)。"
1460
1461 #. type: Plain text
1462 #: build/C/man2/epoll_ctl.2:79
1463 msgid ""
1464 "The I<event> argument describes the object linked to the file descriptor "
1465 "I<fd>.  The I<struct epoll_event> is defined as:"
1466 msgstr ""
1467 "I<event> 引き数は、ファイルディスクリプター I<fd> にリンクされたオブジェクト"
1468 "を表す。 I<struct epoll_event> は以下のように定義される。"
1469
1470 #. type: Plain text
1471 #: build/C/man2/epoll_ctl.2:88
1472 #, no-wrap
1473 msgid ""
1474 "typedef union epoll_data {\n"
1475 "    void        *ptr;\n"
1476 "    int          fd;\n"
1477 "    uint32_t     u32;\n"
1478 "    uint64_t     u64;\n"
1479 "} epoll_data_t;\n"
1480 msgstr ""
1481 "typedef union epoll_data {\n"
1482 "    void        *ptr;\n"
1483 "    int          fd;\n"
1484 "    uint32_t     u32;\n"
1485 "    uint64_t     u64;\n"
1486 "} epoll_data_t;\n"
1487
1488 #. type: Plain text
1489 #: build/C/man2/epoll_ctl.2:93
1490 #, no-wrap
1491 msgid ""
1492 "struct epoll_event {\n"
1493 "    uint32_t     events;      /* Epoll events */\n"
1494 "    epoll_data_t data;        /* User data variable */\n"
1495 "};\n"
1496 msgstr ""
1497 "struct epoll_event {\n"
1498 "    uint32_t     events;      /* epoll イベント */\n"
1499 "    epoll_data_t data;        /* ユーザーデータ変数 */\n"
1500 "};\n"
1501
1502 #. type: Plain text
1503 #: build/C/man2/epoll_ctl.2:100
1504 msgid ""
1505 "The I<events> member is a bit set composed using the following available "
1506 "event types:"
1507 msgstr ""
1508 "I<events> メンバは、以下のような使用可能なイベントタイプを使って構成された "
1509 "ビットセットである。"
1510
1511 #. type: TP
1512 #: build/C/man2/epoll_ctl.2:100
1513 #, no-wrap
1514 msgid "B<EPOLLIN>"
1515 msgstr "B<EPOLLIN>"
1516
1517 #. type: Plain text
1518 #: build/C/man2/epoll_ctl.2:105
1519 msgid "The associated file is available for B<read>(2)  operations."
1520 msgstr "関連付けられたファイルに対して、 B<read>(2)  操作が可能である。"
1521
1522 #. type: TP
1523 #: build/C/man2/epoll_ctl.2:105
1524 #, no-wrap
1525 msgid "B<EPOLLOUT>"
1526 msgstr "B<EPOLLOUT>"
1527
1528 #. type: Plain text
1529 #: build/C/man2/epoll_ctl.2:110
1530 msgid "The associated file is available for B<write>(2)  operations."
1531 msgstr "関連付けられたファイルに対して、 B<write>(2)  操作が可能である。"
1532
1533 #. type: TP
1534 #: build/C/man2/epoll_ctl.2:110
1535 #, no-wrap
1536 msgid "B<EPOLLRDHUP> (since Linux 2.6.17)"
1537 msgstr "B<EPOLLRDHUP\">(LinuxB<2.6.17>以降)\""
1538
1539 #. type: Plain text
1540 #: build/C/man2/epoll_ctl.2:116
1541 msgid ""
1542 "Stream socket peer closed connection, or shut down writing half of "
1543 "connection.  (This flag is especially useful for writing simple code to "
1544 "detect peer shutdown when using Edge Triggered monitoring.)"
1545 msgstr ""
1546 "ストリームソケットの他端が、コネクションの close 、 またはコネクションの書き"
1547 "込み側の shutdown を行った。 (このフラグを使うと、エッジトリガーの監視を行う"
1548 "場合に、 通信のもう一端が閉じられたことを検知するコードを 非常に簡潔に書くこ"
1549 "とができる。)"
1550
1551 #. type: TP
1552 #: build/C/man2/epoll_ctl.2:116
1553 #, no-wrap
1554 msgid "B<EPOLLPRI>"
1555 msgstr "B<EPOLLPRI>"
1556
1557 #. type: Plain text
1558 #: build/C/man2/epoll_ctl.2:121
1559 msgid "There is urgent data available for B<read>(2)  operations."
1560 msgstr "B<read>(2)  操作が可能な緊急 (urgent) データがある。"
1561
1562 #. type: TP
1563 #: build/C/man2/epoll_ctl.2:121
1564 #, no-wrap
1565 msgid "B<EPOLLERR>"
1566 msgstr "B<EPOLLERR>"
1567
1568 #. type: Plain text
1569 #: build/C/man2/epoll_ctl.2:127
1570 msgid ""
1571 "Error condition happened on the associated file descriptor.  "
1572 "B<epoll_wait>(2)  will always wait for this event; it is not necessary to "
1573 "set it in I<events>."
1574 msgstr ""
1575 "関連付けられたファイルディスクリプターにエラー条件が起こった。 "
1576 "B<epoll_wait>(2)  は常にこのイベントを待つので、 I<events> に設定する必要はな"
1577 "い。"
1578
1579 #. type: TP
1580 #: build/C/man2/epoll_ctl.2:127
1581 #, no-wrap
1582 msgid "B<EPOLLHUP>"
1583 msgstr "B<EPOLLHUP>"
1584
1585 #. type: Plain text
1586 #: build/C/man2/epoll_ctl.2:133
1587 msgid ""
1588 "Hang up happened on the associated file descriptor.  B<epoll_wait>(2)  will "
1589 "always wait for this event; it is not necessary to set it in I<events>."
1590 msgstr ""
1591 "関連付けられたファイルディスクリプターにハングアップが起こった。 "
1592 "B<epoll_wait>(2)  は常にこのイベントを待つので、 I<events> に設定する必要はな"
1593 "い。"
1594
1595 #. type: TP
1596 #: build/C/man2/epoll_ctl.2:133
1597 #, no-wrap
1598 msgid "B<EPOLLET>"
1599 msgstr "B<EPOLLET>"
1600
1601 #. type: Plain text
1602 #: build/C/man2/epoll_ctl.2:143
1603 msgid ""
1604 "Sets the Edge Triggered behavior for the associated file descriptor.  The "
1605 "default behavior for B<epoll> is Level Triggered.  See B<epoll>(7)  for more "
1606 "detailed information about Edge and Level Triggered event distribution "
1607 "architectures."
1608 msgstr ""
1609 "関連付けられたファイルディスクリプターに エッジトリガー動作 (Edge Triggered "
1610 "behavior) を設定する。 B<epoll> のデフォルトの動作は、レベルトリガー (Level "
1611 "Triggered) である。 エッジトリガーとレベルトリガーによるイベント分配機構 "
1612 "(event distribution architectures) についての詳細な情報は、 B<epoll>(7)  を参"
1613 "照すること。"
1614
1615 #. type: TP
1616 #: build/C/man2/epoll_ctl.2:143
1617 #, no-wrap
1618 msgid "B<EPOLLONESHOT> (since Linux 2.6.2)"
1619 msgstr "B<EPOLLONESHOT> (Linux 2.6.2 以降)"
1620
1621 #. type: Plain text
1622 #: build/C/man2/epoll_ctl.2:157
1623 msgid ""
1624 "Sets the one-shot behavior for the associated file descriptor.  This means "
1625 "that after an event is pulled out with B<epoll_wait>(2)  the associated file "
1626 "descriptor is internally disabled and no other events will be reported by "
1627 "the B<epoll> interface.  The user must call B<epoll_ctl>()  with "
1628 "B<EPOLL_CTL_MOD> to rearm the file descriptor with a new event mask."
1629 msgstr ""
1630 "関連付けられたファイルディスクリプターに 一撃動作 (One-Shot behavior) を設定"
1631 "する。 これはイベントが B<epoll_wait>(2)  によって引き出された後、 関連付けら"
1632 "れたファイルディスクリプターが内部的に破棄され、 B<epoll> インターフェースに"
1633 "よってイベントが報告されなくなることを意味する。 新しいイベントマスクでファイ"
1634 "ルディスクリプターを再度有効にするためには、 B<epoll_ctl>()  に "
1635 "B<EPOLL_CTL_MOD> を指定して呼び出さなければならない。 I<op> 引き数に指定でき"
1636 "る有効な値は、以下の通り:"
1637
1638 #. type: TP
1639 #: build/C/man2/epoll_ctl.2:157
1640 #, no-wrap
1641 msgid "B<EPOLLWAKEUP> (since Linux 3.5)"
1642 msgstr "B<EPOLLWAKEUP> (Linux 3.5 以降)"
1643
1644 #.  commit 4d7e30d98939a0340022ccd49325a3d70f7e0238
1645 #. type: Plain text
1646 #: build/C/man2/epoll_ctl.2:185
1647 msgid ""
1648 "If B<EPOLLONESHOT> and B<EPOLLET> are clear and the process has the "
1649 "B<CAP_BLOCK_SUSPEND> capability, ensure that the system does not enter "
1650 "\"suspend\" or \"hibernate\" while this event is pending or being "
1651 "processed.  The event is considered as being \"processed\" from the time "
1652 "when it is returned by a call to B<epoll_wait>(2)  until the next call to "
1653 "B<epoll_wait>(2)  on the same B<epoll>(7)  file descriptor, the closure of "
1654 "that file descriptor, the removal of the event file descriptor with "
1655 "B<EPOLL_CTL_DEL>, or the clearing of B<EPOLLWAKEUP> for the event file "
1656 "descriptor with B<EPOLL_CTL_MOD>.  See also BUGS."
1657 msgstr ""
1658 "B<EPOLLONESHOT> と B<EPOLLET> がクリアされており、 プロセスが "
1659 "B<CAP_BLOCK_SUSPEND> ケーパビリティを持っている場合、 イベントが処理待ちか処"
1660 "理中かにかかわらず、必ずシステムが \"suspend\" や \"hibernate\" に入らないよ"
1661 "うにすること。 B<epoll_wait>(2) の呼び出しが返った時点から、 同じ "
1662 "B<epoll>(7) ファイルディスクリプターに対して B<epoll_wait>(2) が次に呼び出さ"
1663 "れるか、 そのファイルディスクリプターが閉じられるか、 イベントファイルディス"
1664 "クリプターが B<EPOLL_CTL_DEL> で削除されるか、 B<EPOLL_CTL_MOD> でイベント"
1665 "ファイルディスクリプターの B<EPOLLWAKEUP> がクリアされるか、 のいずれかになる"
1666 "まで、イベントは「処理中」であるとみなされる。 「バグ」の節も参照のこと。"
1667
1668 #. type: Plain text
1669 #: build/C/man2/epoll_ctl.2:194
1670 msgid ""
1671 "When successful, B<epoll_ctl>()  returns zero.  When an error occurs, "
1672 "B<epoll_ctl>()  returns -1 and I<errno> is set appropriately."
1673 msgstr ""
1674 "成功した場合、 B<epoll_ctl>()  は 0 を返す。 エラーが起こった場合、 "
1675 "B<epoll_ctl>()  は -1 を返し、 I<errno> を適切に設定する。"
1676
1677 #. type: TP
1678 #: build/C/man2/epoll_ctl.2:195 build/C/man2/epoll_wait.2:163
1679 #, no-wrap
1680 msgid "B<EBADF>"
1681 msgstr "B<EBADF>"
1682
1683 #. type: Plain text
1684 #: build/C/man2/epoll_ctl.2:201
1685 msgid "I<epfd> or I<fd> is not a valid file descriptor."
1686 msgstr "I<epfd> か I<fd> が有効なファイルディスクリプターでない。"
1687
1688 #. type: TP
1689 #: build/C/man2/epoll_ctl.2:201
1690 #, no-wrap
1691 msgid "B<EEXIST>"
1692 msgstr "B<EEXIST>"
1693
1694 #. type: Plain text
1695 #: build/C/man2/epoll_ctl.2:209
1696 msgid ""
1697 "I<op> was B<EPOLL_CTL_ADD>, and the supplied file descriptor I<fd> is "
1698 "already registered with this epoll instance."
1699 msgstr ""
1700 "I<op> が B<EPOLL_CTL_ADD> であり、かつ与えられたファイルディスクリプター "
1701 "I<fd> がこの epoll インスタンスに既に登録されている。"
1702
1703 #. type: Plain text
1704 #: build/C/man2/epoll_ctl.2:222
1705 msgid ""
1706 "I<epfd> is not an B<epoll> file descriptor, or I<fd> is the same as I<epfd>, "
1707 "or the requested operation I<op> is not supported by this interface."
1708 msgstr ""
1709 "I<epfd> が B<epoll> ファイルディスクリプターでない。 または I<fd> が I<epfd> "
1710 "と同一である。 または要求された操作 I<op> がこのインターフェースでサポートさ"
1711 "れていない。"
1712
1713 #. type: TP
1714 #: build/C/man2/epoll_ctl.2:222
1715 #, no-wrap
1716 msgid "B<ENOENT>"
1717 msgstr "B<ENOENT>"
1718
1719 #. type: Plain text
1720 #: build/C/man2/epoll_ctl.2:232
1721 msgid ""
1722 "I<op> was B<EPOLL_CTL_MOD> or B<EPOLL_CTL_DEL>, and I<fd> is not registered "
1723 "with this epoll instance."
1724 msgstr ""
1725 "I<op> が B<EPOLL_CTL_MOD> または B<EPOLL_CTL_DEL> で、かつ I<fd> がこの "
1726 "epoll インスタンスに登録されていない。"
1727
1728 #. type: Plain text
1729 #: build/C/man2/epoll_ctl.2:237
1730 msgid ""
1731 "There was insufficient memory to handle the requested I<op> control "
1732 "operation."
1733 msgstr "要求された I<op> 制御操作を扱うのに十分なメモリーがない。"
1734
1735 #. type: TP
1736 #: build/C/man2/epoll_ctl.2:237
1737 #, no-wrap
1738 msgid "B<ENOSPC>"
1739 msgstr "B<ENOSPC>"
1740
1741 #. type: Plain text
1742 #: build/C/man2/epoll_ctl.2:247
1743 msgid ""
1744 "The limit imposed by I</proc/sys/fs/epoll/max_user_watches> was encountered "
1745 "while trying to register (B<EPOLL_CTL_ADD>)  a new file descriptor on an "
1746 "epoll instance.  See B<epoll>(7)  for further details."
1747 msgstr ""
1748 "epoll インスタンスに新しいファイルディスクリプターを登録 (B<EPOLL_CTL_ADD>)  "
1749 "しようとした際に、 I</proc/sys/fs/epoll/max_user_watches> で決まる上限に達し"
1750 "た。 詳細は B<epoll>(7)  を参照。"
1751
1752 #. type: TP
1753 #: build/C/man2/epoll_ctl.2:247
1754 #, no-wrap
1755 msgid "B<EPERM>"
1756 msgstr "B<EPERM>"
1757
1758 #. type: Plain text
1759 #: build/C/man2/epoll_ctl.2:256
1760 msgid ""
1761 "The target file I<fd> does not support B<epoll>.  This error can occur if "
1762 "I<fd> refers to, for example, a regular file or a directory."
1763 msgstr ""
1764 "対象ファイル I<fd> が B<epoll> に対応していない。 このエラーは I<fd> が例えば"
1765 "通常ファイルやディレクトリを参照している場合にも起こり得る。"
1766
1767 #.  To be precise: kernel 2.5.44.
1768 #.  The interface should be finalized by Linux kernel 2.5.66.
1769 #. type: Plain text
1770 #: build/C/man2/epoll_ctl.2:261
1771 msgid "B<epoll_ctl>()  was added to the kernel in version 2.6."
1772 msgstr "B<epoll_ctl>()  はカーネル 2.6 で追加された。"
1773
1774 #. type: Plain text
1775 #: build/C/man2/epoll_ctl.2:265
1776 msgid ""
1777 "B<epoll_ctl>()  is Linux-specific.  Library support is provided in glibc "
1778 "starting with version 2.3.2."
1779 msgstr ""
1780 "B<epoll_ctl>()  は Linux 独自である。\n"
1781 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
1782
1783 #. type: Plain text
1784 #: build/C/man2/epoll_ctl.2:270
1785 msgid ""
1786 "The B<epoll> interface supports all file descriptors that support B<poll>(2)."
1787 msgstr ""
1788 "B<epoll> インターフェースは、 B<poll>(2)  に対応している全てのファイルディス"
1789 "クリプターに対応している。"
1790
1791 #. type: SH
1792 #: build/C/man2/epoll_ctl.2:270 build/C/man2/epoll_wait.2:217
1793 #: build/C/man2/poll.2:393
1794 #, no-wrap
1795 msgid "BUGS"
1796 msgstr "バグ"
1797
1798 #. type: Plain text
1799 #: build/C/man2/epoll_ctl.2:284
1800 msgid ""
1801 "In kernel versions before 2.6.9, the B<EPOLL_CTL_DEL> operation required a "
1802 "non-null pointer in I<event>, even though this argument is ignored.  Since "
1803 "Linux 2.6.9, I<event> can be specified as NULL when using B<EPOLL_CTL_DEL>.  "
1804 "Applications that need to be portable to kernels before 2.6.9 should specify "
1805 "a non-null pointer in I<event>."
1806 msgstr ""
1807 "Linux 2.6.9 より前では、 B<EPOLL_CTL_DEL> 操作の際、引き数 I<event> に (たと"
1808 "え無視される場合であっても) NULL でないポインターを渡す必要があった。 カーネ"
1809 "ル 2.6.9 以降では、 B<EPOLL_CTL_DEL> を使う際に I<event> に NULL を指定できる"
1810 "ようになっている。 2.6.9 より前のカーネルへの移植性が必要なアプリケーションで"
1811 "は、 I<event> に NULL でないポインターを指定すべきである。"
1812
1813 #.  commit a8159414d7e3af7233e7a5a82d1c5d85379bd75c (behavior change)
1814 #.  https://lwn.net/Articles/520198/
1815 #. type: Plain text
1816 #: build/C/man2/epoll_ctl.2:311
1817 msgid ""
1818 "If B<EPOLLWAKEUP> is specified in I<flags>, but the caller does not have the "
1819 "B<CAP_BLOCK_SUSPEND> capability, then the B<EPOLLWAKEUP> flag is I<silently "
1820 "ignored>.  This unfortunate behavior is necessary because no validity checks "
1821 "were performed on the I<flags> argument in the original implementation, and "
1822 "the addition of the B<EPOLLWAKEUP> with a check that caused the call to fail "
1823 "if the caller did not have the B<CAP_BLOCK_SUSPEND> capability caused a "
1824 "breakage in at least one existing user-space application that happened to "
1825 "randomly (and uselessly) specify this bit.  A robust application should "
1826 "therefore double check that it has the B<CAP_BLOCK_SUSPEND> capability if "
1827 "attempting to use the B<EPOLLWAKEUP> flag."
1828 msgstr ""
1829 "I<flags> に B<EPOLLWAKEUP> が指定されたが、呼び出し元が B<CAP_BLOCK_SUSPEND> "
1830 "ケーパビリティを持っていない場合、 B<EPOLLWAKEUP> フラグは I<黙って無視される"
1831 ">。 元の実装では I<flags> 引き数に対する正当性チェックが実行されていないた"
1832 "め、 この残念な動作は必要である。 また、 呼び出し元が B<CAP_BLOCK_SUSPEND> "
1833 "ケーパビリティを持っていなかった場合に呼び出しを失敗させるようにチェックを "
1834 "B<EPOLLWAKEUP> に追加すると、 少なくともひとつは動かなくなる既存のユーザー空"
1835 "間アプリケーションがあった。 そのアプリケーションはたまたま (しかも意味もな"
1836 "く) このビットを指定していた。 したがって、信頼性が求められるアプリケーション"
1837 "では、 B<EPOLLWAKEUP> フラグを使おうする場合には B<CAP_BLOCK_SUSPEND> ケーパ"
1838 "ビリティを持っているかも確認するようにすべきである。"
1839
1840 #. type: Plain text
1841 #: build/C/man2/epoll_ctl.2:316
1842 msgid "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1843 msgstr "B<epoll_create>(2), B<epoll_wait>(2), B<poll>(2), B<epoll>(7)"
1844
1845 #. type: TH
1846 #: build/C/man2/epoll_wait.2:22
1847 #, no-wrap
1848 msgid "EPOLL_WAIT"
1849 msgstr "EPOLL_WAIT"
1850
1851 #. type: TH
1852 #: build/C/man2/epoll_wait.2:22
1853 #, no-wrap
1854 msgid "2014-08-19"
1855 msgstr "2014-08-19"
1856
1857 #. type: Plain text
1858 #: build/C/man2/epoll_wait.2:25
1859 msgid ""
1860 "epoll_wait, epoll_pwait - wait for an I/O event on an epoll file descriptor"
1861 msgstr ""
1862 "epoll_wait, epoll_pwait - epoll ファイルディスクリプターの I/O イベントを待つ"
1863
1864 #. type: Plain text
1865 #: build/C/man2/epoll_wait.2:34
1866 #, no-wrap
1867 msgid ""
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 msgstr ""
1874 "B<int epoll_wait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1875 "B<               int >I<maxevents>B<, int >I<timeout>B<);>\n"
1876 "B<int epoll_pwait(int >I<epfd>B<, struct epoll_event *>I<events>B<,>\n"
1877 "B<               int >I<maxevents>B<, int >I<timeout>B<,>\n"
1878 "B<               const sigset_t *>I<sigmask>B<);>\n"
1879
1880 #. type: Plain text
1881 #: build/C/man2/epoll_wait.2:52
1882 msgid ""
1883 "The B<epoll_wait>()  system call waits for events on the B<epoll>(7)  "
1884 "instance referred to by the file descriptor I<epfd>.  The memory area "
1885 "pointed to by I<events> will contain the events that will be available for "
1886 "the caller.  Up to I<maxevents> are returned by B<epoll_wait>().  The "
1887 "I<maxevents> argument must be greater than zero."
1888 msgstr ""
1889 "B<epoll_wait>() システムコールは、ファイルディスクリプター I<epfd> で参照され"
1890 "る\n"
1891 "B<epoll>(7) インスタンスに対するイベントを待つ。 I<events> が指すメモリー領域"
1892 "には、\n"
1893 "呼び出し側が利用可能なイベントが格納される。最大 I<maxevents> 個のイベント"
1894 "が\n"
1895 "B<epoll_wait>() によって返される。\n"
1896 "I<maxevents> 引き数は 0 より大きくなければならない。"
1897
1898 #. type: Plain text
1899 #: build/C/man2/epoll_wait.2:59
1900 msgid ""
1901 "The I<timeout> argument specifies the number of milliseconds that "
1902 "B<epoll_wait>()  will block.  The call will block until either:"
1903 msgstr ""
1904 "I<timeout> 引き数は B<epoll_wait>() が停止する時間をミリ秒で指定する。 "
1905 "B<epoll_wait>() の呼び出しは以下のいずれかになるまで停止する。"
1906
1907 #. type: Plain text
1908 #: build/C/man2/epoll_wait.2:61
1909 msgid "a file descriptor delivers an event;"
1910 msgstr "ファイルディスクリプターがイベントを配送した"
1911
1912 #. type: Plain text
1913 #: build/C/man2/epoll_wait.2:63 build/C/man2/poll.2:138
1914 msgid "the call is interrupted by a signal handler; or"
1915 msgstr "呼び出しがシグナルハンドラーにより割り込まれた"
1916
1917 #. type: Plain text
1918 #: build/C/man2/epoll_wait.2:65 build/C/man2/poll.2:140
1919 msgid "the timeout expires."
1920 msgstr "タイムアウトが満了する"
1921
1922 #. type: Plain text
1923 #: build/C/man2/epoll_wait.2:80
1924 msgid ""
1925 "Note that the I<timeout> interval will be rounded up to the system clock "
1926 "granularity, and kernel scheduling delays mean that the blocking interval "
1927 "may overrun by a small amount.  Specifying a I<timeout> of -1 causes "
1928 "B<epoll_wait>()  to block indefinitely, while specifying a I<timeout> equal "
1929 "to zero cause B<epoll_wait>()  to return immediately, even if no events are "
1930 "available."
1931 msgstr ""
1932 "I<timeout> 時間はシステムクロックの粒度に切り上げられ、カーネルのスケジューリ"
1933 "ング遅延により少しだけ長くなる可能性がある点に注意すること。 I<timeout> を "
1934 "-1 に指定すると、 B<epoll_wait>() は無限に停止する。 I<timeout> を 0 に指定す"
1935 "ると、 B<epoll_wait>() は利用可能なイベントがなくても、すぐに返る。"
1936
1937 #. type: Plain text
1938 #: build/C/man2/epoll_wait.2:84
1939 msgid "The I<struct epoll_event> is defined as:"
1940 msgstr "I<struct epoll_event> は以下のように定義される。"
1941
1942 #. type: Plain text
1943 #: build/C/man2/epoll_wait.2:93
1944 #, no-wrap
1945 msgid ""
1946 "typedef union epoll_data {\n"
1947 "    void    *ptr;\n"
1948 "    int      fd;\n"
1949 "    uint32_t u32;\n"
1950 "    uint64_t u64;\n"
1951 "} epoll_data_t;\n"
1952 msgstr ""
1953 "typedef union epoll_data {\n"
1954 "    void    *ptr;\n"
1955 "    int      fd;\n"
1956 "    uint32_t u32;\n"
1957 "    uint64_t u64;\n"
1958 "} epoll_data_t;\n"
1959
1960 #. type: Plain text
1961 #: build/C/man2/epoll_wait.2:98
1962 #, no-wrap
1963 msgid ""
1964 "struct epoll_event {\n"
1965 "    uint32_t     events;    /* Epoll events */\n"
1966 "    epoll_data_t data;      /* User data variable */\n"
1967 "};\n"
1968 msgstr ""
1969 "struct epoll_event {\n"
1970 "    uint32_t     events;    /* epoll イベント */\n"
1971 "    epoll_data_t data;      /* ユーザーデータ変数 */\n"
1972 "};\n"
1973
1974 #. type: Plain text
1975 #: build/C/man2/epoll_wait.2:109
1976 msgid ""
1977 "The I<data> of each returned structure will contain the same data the user "
1978 "set with an B<epoll_ctl>(2)  (B<EPOLL_CTL_ADD>, B<EPOLL_CTL_MOD>)  while the "
1979 "I<events> member will contain the returned event bit field."
1980 msgstr ""
1981 "返される構造体の I<data> メンバには、ユーザーが B<epoll_ctl>(2)  "
1982 "(B<EPOLL_CTL_ADD>, B<EPOLL_CTL_MOD>)  で指定したデータが格納される。 一方、 "
1983 "I<events> メンバには返された利用可能なイベントのビットフィールドが格納され"
1984 "る。"
1985
1986 #. type: SS
1987 #: build/C/man2/epoll_wait.2:109
1988 #, no-wrap
1989 msgid "epoll_pwait()"
1990 msgstr "epoll_pwait()"
1991
1992 #. type: Plain text
1993 #: build/C/man2/epoll_wait.2:123
1994 msgid ""
1995 "The relationship between B<epoll_wait>()  and B<epoll_pwait>()  is analogous "
1996 "to the relationship between B<select>(2)  and B<pselect>(2): like "
1997 "B<pselect>(2), B<epoll_pwait>()  allows an application to safely wait until "
1998 "either a file descriptor becomes ready or until a signal is caught."
1999 msgstr ""
2000 "B<epoll_wait>()  と B<epoll_pwait>()  の関係は、 B<select>(2)  と "
2001 "B<pselect>(2)  の関係と同様である。 B<pselect>(2)  同様、 B<epoll_pwait>()  "
2002 "を使うと、アプリケーションは、ファイルディスクリプターが準備できた状態になる"
2003 "か、 シグナルが捕捉されるまで、安全に待つことができる。"
2004
2005 #. type: Plain text
2006 #: build/C/man2/epoll_wait.2:127
2007 msgid "The following B<epoll_pwait>()  call:"
2008 msgstr "以下の B<epoll_pwait>()  の呼び出しは、"
2009
2010 #. type: Plain text
2011 #: build/C/man2/epoll_wait.2:130
2012 #, no-wrap
2013 msgid "    ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
2014 msgstr "    ready = epoll_pwait(epfd, &events, maxevents, timeout, &sigmask);\n"
2015
2016 #. type: Plain text
2017 #: build/C/man2/epoll_wait.2:135 build/C/man2/poll.2:250
2018 msgid "is equivalent to I<atomically> executing the following calls:"
2019 msgstr "次の呼び出しを I<atomic> に実行するのと等価である。"
2020
2021 #. type: Plain text
2022 #: build/C/man2/epoll_wait.2:138
2023 #, no-wrap
2024 msgid "    sigset_t origmask;\n"
2025 msgstr "    sigset_t origmask;\n"
2026
2027 #. type: Plain text
2028 #: build/C/man2/epoll_wait.2:142
2029 #, no-wrap
2030 msgid ""
2031 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2032 "    ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
2033 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2034 msgstr ""
2035 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2036 "    ready = epoll_wait(epfd, &events, maxevents, timeout);\n"
2037 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2038
2039 #. type: Plain text
2040 #: build/C/man2/epoll_wait.2:150
2041 msgid ""
2042 "The I<sigmask> argument may be specified as NULL, in which case "
2043 "B<epoll_pwait>()  is equivalent to B<epoll_wait>()."
2044 msgstr ""
2045 "I<sigmask> 引き数には NULL を指定してもよい。 その場合には、 "
2046 "B<epoll_pwait>()  は B<epoll_wait>()  と等価となる。"
2047
2048 #. type: Plain text
2049 #: build/C/man2/epoll_wait.2:162
2050 msgid ""
2051 "When successful, B<epoll_wait>()  returns the number of file descriptors "
2052 "ready for the requested I/O, or zero if no file descriptor became ready "
2053 "during the requested I<timeout> milliseconds.  When an error occurs, "
2054 "B<epoll_wait>()  returns -1 and I<errno> is set appropriately."
2055 msgstr ""
2056 "成功した場合、 B<epoll_wait>()  は要求された I/O に対して準備ができているファ"
2057 "イルディスクリプターの数を返す。 また要求された I<timeout> ミリ秒の間にファイ"
2058 "ルディスクリプターが準備できない場合は、0 を返す。 エラーが起こった場合、 "
2059 "B<epoll_wait>()  は -1 を返し、 I<errno> を適切に設定する。"
2060
2061 #. type: Plain text
2062 #: build/C/man2/epoll_wait.2:167
2063 msgid "I<epfd> is not a valid file descriptor."
2064 msgstr "I<epfd> が有効なファイルディスクリプターでない。"
2065
2066 #. type: TP
2067 #: build/C/man2/epoll_wait.2:167 build/C/man2/poll.2:312
2068 #, no-wrap
2069 msgid "B<EFAULT>"
2070 msgstr "B<EFAULT>"
2071
2072 #. type: Plain text
2073 #: build/C/man2/epoll_wait.2:172
2074 msgid ""
2075 "The memory area pointed to by I<events> is not accessible with write "
2076 "permissions."
2077 msgstr "I<events> で指されるメモリー領域に書き込み権限でアクセスできない。"
2078
2079 #. type: TP
2080 #: build/C/man2/epoll_wait.2:172 build/C/man2/poll.2:316
2081 #, no-wrap
2082 msgid "B<EINTR>"
2083 msgstr "B<EINTR>"
2084
2085 #. type: Plain text
2086 #: build/C/man2/epoll_wait.2:179
2087 msgid ""
2088 "The call was interrupted by a signal handler before either (1) any of the "
2089 "requested events occurred or (2) the I<timeout> expired; see B<signal>(7)."
2090 msgstr ""
2091 "(1) 要求されたどのイベントも発生せず、かつ (2) I<timeout> の期限が切れる前"
2092 "に、システムコールがシグナルハンドラーによって割り込まれた。 B<signal>(7) 参"
2093 "照。"
2094
2095 #. type: Plain text
2096 #: build/C/man2/epoll_wait.2:187
2097 msgid ""
2098 "I<epfd> is not an B<epoll> file descriptor, or I<maxevents> is less than or "
2099 "equal to zero."
2100 msgstr ""
2101 "I<epfd> が B<epoll> ファイルディスクリプターでない。 または I<maxevents> が "
2102 "0 以下である。"
2103
2104 #.  To be precise: kernel 2.5.44.
2105 #.  The interface should be finalized by Linux kernel 2.5.66.
2106 #. type: Plain text
2107 #: build/C/man2/epoll_wait.2:193
2108 msgid ""
2109 "B<epoll_wait>()  was added to the kernel in version 2.6.  Library support is "
2110 "provided in glibc starting with version 2.3.2."
2111 msgstr ""
2112 "B<epoll_wait>() はカーネル 2.6 で追加された。\n"
2113 "ライブラリによるサポートは glibc バージョン 2.3.2 以降で提供されている。"
2114
2115 #. type: Plain text
2116 #: build/C/man2/epoll_wait.2:197
2117 msgid ""
2118 "B<epoll_pwait>()  was added to Linux in kernel 2.6.19.  Library support is "
2119 "provided in glibc starting with version 2.6."
2120 msgstr ""
2121 "B<epoll_pwait>() はカーネル 2.6.19 で Linux に追加された。\n"
2122 "ライブラリによるサポートは glibc バージョン 2.6 以降で提供されている。"
2123
2124 #. type: Plain text
2125 #: build/C/man2/epoll_wait.2:200
2126 msgid "B<epoll_wait>()  is Linux-specific."
2127 msgstr "B<epoll_wait>() は Linux 独自である。"
2128
2129 #. type: Plain text
2130 #: build/C/man2/epoll_wait.2:210
2131 msgid ""
2132 "While one thread is blocked in a call to B<epoll_pwait>(), it is possible "
2133 "for another thread to add a file descriptor to the waited-upon B<epoll> "
2134 "instance.  If the new file descriptor becomes ready, it will cause the "
2135 "B<epoll_wait>()  call to unblock."
2136 msgstr ""
2137 "あるスレッドが B<epoll_pwait>() を呼び出して停止されている間に、\n"
2138 "別のスレッドが wait 中の B<epoll> インストールにファイルディスクリプターを\n"
2139 "追加することがある。新しいファイルディスクリプターでイベントが発生すると、\n"
2140 "B<epoll_wait>() の呼び出しによる停止が解除されることになる。"
2141
2142 #. type: Plain text
2143 #: build/C/man2/epoll_wait.2:217
2144 msgid ""
2145 "For a discussion of what may happen if a file descriptor in an B<epoll> "
2146 "instance being monitored by B<epoll_wait>()  is closed in another thread, "
2147 "see B<select>(2)."
2148 msgstr ""
2149 "B<epoll_wait>() で監視中の B<epoll> インスタンス内のファイルディスクリプター"
2150 "が別のスレッドによってクローズされた場合に何が起こるかの議論については、 "
2151 "B<select>(2) を参照してほしい。"
2152
2153 #. type: Plain text
2154 #: build/C/man2/epoll_wait.2:229
2155 msgid ""
2156 "In kernels before 2.6.37, a I<timeout> value larger than approximately "
2157 "I<LONG_MAX / HZ> milliseconds is treated as -1 (i.e., infinity).  Thus, for "
2158 "example, on a system where the I<sizeof(long)> is 4 and the kernel I<HZ> "
2159 "value is 1000, this means that timeouts greater than 35.79 minutes are "
2160 "treated as infinity."
2161 msgstr ""
2162 "バージョン 2.6.37 より前のカーネルでは、おおよそ I<LONG_MAX / HZ> ミリ秒より"
2163 "大きい I<timeout> 値は -1 (つまり無限大) として扱われる。したがって、例えば、"
2164 "I<sizeof(long)> が 4 で、カーネルの I<HZ> の値が 1000 のシステムでは、 35.79 "
2165 "分よりも大きなタイムアウトは無限大として扱われるということである。"
2166
2167 #. type: SS
2168 #: build/C/man2/epoll_wait.2:229 build/C/man2/poll.2:366
2169 #, no-wrap
2170 msgid "C library/kernel ABI differences"
2171 msgstr "C ライブラリとカーネル ABI の違い"
2172
2173 #. type: Plain text
2174 #: build/C/man2/epoll_wait.2:242
2175 msgid ""
2176 "The raw B<epoll_pwait>()  system call has a sixth argument, I<size_t "
2177 "sigsetsize>, which specifies the size in bytes of the I<sigmask> argument.  "
2178 "The glibc B<epoll_pwait>()  wrapper function specifies this argument as a "
2179 "fixed value (equal to I<sizeof(sigset_t)>)."
2180 msgstr ""
2181 "素の B<epoll_pwait>() システムコールは 6 番目の引き数 I<size_t sigsetsize> を"
2182 "取る。 この引き数は I<sigmask> 引き数のバイト単位のサイズを指定する。 glibc "
2183 "の B<epoll_pwait>() ラッパー関数は、この引き数に固定値 (I<sizeof(sigset_t)> "
2184 "と同じ) を指定する。"
2185
2186 #. type: Plain text
2187 #: build/C/man2/epoll_wait.2:246
2188 msgid "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
2189 msgstr "B<epoll_create>(2), B<epoll_ctl>(2), B<epoll>(7)"
2190
2191 #. type: TH
2192 #: build/C/man2/poll.2:31
2193 #, no-wrap
2194 msgid "POLL"
2195 msgstr "POLL"
2196
2197 #. type: TH
2198 #: build/C/man2/poll.2:31
2199 #, no-wrap
2200 msgid "2014-09-06"
2201 msgstr "2014-09-06"
2202
2203 #. type: Plain text
2204 #: build/C/man2/poll.2:34
2205 msgid "poll, ppoll - wait for some event on a file descriptor"
2206 msgstr "poll, ppoll - ファイルディスクリプターにおけるイベントを待つ"
2207
2208 #. type: Plain text
2209 #: build/C/man2/poll.2:37
2210 #, no-wrap
2211 msgid "B<#include E<lt>poll.hE<gt>>\n"
2212 msgstr "B<#include E<lt>poll.hE<gt>>\n"
2213
2214 #. type: Plain text
2215 #: build/C/man2/poll.2:39
2216 #, no-wrap
2217 msgid "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
2218 msgstr "B<int poll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, int >I<timeout>B<);>\n"
2219
2220 #. type: Plain text
2221 #: build/C/man2/poll.2:43
2222 #, no-wrap
2223 msgid ""
2224 "B<#define _GNU_SOURCE>         /* See feature_test_macros(7) */\n"
2225 "B<#include E<lt>signal.hE<gt>>\n"
2226 "B<#include E<lt>poll.hE<gt>>\n"
2227 msgstr ""
2228 "B<#define _GNU_SOURCE>         /* feature_test_macros(7) 参照 */\n"
2229 "B<#include E<lt>signal.hE<gt>>\n"
2230 "B<#include E<lt>poll.hE<gt>>\n"
2231
2232 #. type: Plain text
2233 #: build/C/man2/poll.2:46
2234 #, no-wrap
2235 msgid ""
2236 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, >\n"
2237 "B<        const struct timespec *>I<timeout_ts>B<, const sigset_t *>I<sigmask>B<);>\n"
2238 msgstr ""
2239 "B<int ppoll(struct pollfd *>I<fds>B<, nfds_t >I<nfds>B<, >\n"
2240 "B<        const struct timespec *>I<timeout_ts>B<, const sigset_t *>I<sigmask>B<);>\n"
2241
2242 #. type: Plain text
2243 #: build/C/man2/poll.2:53
2244 msgid ""
2245 "B<poll>()  performs a similar task to B<select>(2): it waits for one of a "
2246 "set of file descriptors to become ready to perform I/O."
2247 msgstr ""
2248 "B<poll>()  は B<select>(2)  と同様の仕事を行う、つまり、ファイルディスクリプ"
2249 "ター集合のいずれか一つが I/O を実行可能な状態になるのを待つ。"
2250
2251 #. type: Plain text
2252 #: build/C/man2/poll.2:57
2253 msgid ""
2254 "The set of file descriptors to be monitored is specified in the I<fds> "
2255 "argument, which is an array of structures of the following form:"
2256 msgstr ""
2257 "監視するファイルディスクリプター集合は、 I<fds> 引き数で指定する。 I<fds> "
2258 "は、以下の型の構造体の配列である。"
2259
2260 #. type: Plain text
2261 #: build/C/man2/poll.2:65
2262 #, no-wrap
2263 msgid ""
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 msgstr ""
2270 "struct pollfd {\n"
2271 "    int   fd;         /* file descriptor */\n"
2272 "    short events;     /* requested events */\n"
2273 "    short revents;    /* returned events */\n"
2274 "};\n"
2275
2276 #. type: Plain text
2277 #: build/C/man2/poll.2:72
2278 msgid ""
2279 "The caller should specify the number of items in the I<fds> array in I<nfds>."
2280 msgstr "I<nfds> には、 I<fds> 配列の要素数を指定する。"
2281
2282 #. type: Plain text
2283 #: build/C/man2/poll.2:88
2284 msgid ""
2285 "The field I<fd> contains a file descriptor for an open file.  If this field "
2286 "is negative, then the corresponding I<events> field is ignored and the "
2287 "I<revents> field returns zero.  (This provides an easy way of ignoring a "
2288 "file descriptor for a single B<poll>()  call: simply negate the I<fd> "
2289 "field.  Note, however, that this technique can't be used to ignore file "
2290 "descriptor 0.)"
2291 msgstr ""
2292 "I<fd> フィールドには、オープンされたファイルのファイルディスクリプターが入"
2293 "る。 このフィールドが負の場合、対応する I<events> フィールドは無視され、 "
2294 "I<revents> には 0 が返される。(この機能により、一つの B<poll>() の呼び出しで"
2295 "簡単にあるファイルディスクリプターを無視することができる。 単に I<fd> フィー"
2296 "ルドの符号を反転するだけでよい。 ただし、この方法はファイルディスクリプター "
2297 "0 を無視するのには使用できない点に注意すること。)"
2298
2299 #. type: Plain text
2300 #: build/C/man2/poll.2:103
2301 msgid ""
2302 "The field I<events> is an input parameter, a bit mask specifying the events "
2303 "the application is interested in for the file descriptor I<fd>.  This field "
2304 "may be specified as zero, in which case the only events that can be returned "
2305 "in I<revents> are B<POLLHUP>, B<POLLERR>, and B<POLLNVAL> (see below)."
2306 msgstr ""
2307 "構造体の I<events> 要素は入力パラメーターで、 ファイルディスクリプター I<fd> "
2308 "に関して、 アプリケーションが興味を持っているイベントのビットマスクを指定す"
2309 "る。 このフィールドには 0 を指定することもでき、 その場合 I<revents> で返され"
2310 "るイベントは B<POLLHUP>, B<POLLERR>, B<POLLNVAL> だけである (下記参照)。"
2311
2312 #. type: Plain text
2313 #: build/C/man2/poll.2:122
2314 msgid ""
2315 "The field I<revents> is an output parameter, filled by the kernel with the "
2316 "events that actually occurred.  The bits returned in I<revents> can include "
2317 "any of those specified in I<events>, or one of the values B<POLLERR>, "
2318 "B<POLLHUP>, or B<POLLNVAL>.  (These three bits are meaningless in the "
2319 "I<events> field, and will be set in the I<revents> field whenever the "
2320 "corresponding condition is true.)"
2321 msgstr ""
2322 "I<revents> 要素は出力パラメーターで、実際に起こったイベントがカーネルにより設"
2323 "定される。 I<revents> で返されるビット列には、 I<events> で指定したもののどれ"
2324 "か、もしくは B<POLLERR>, B<POLLHUP>, B<POLLNVAL> のうちの一つが含まれる "
2325 "(B<POLLERR>, B<POLLHUP>, B<POLLNVAL> の 3つのビットは I<events> に指定しても"
2326 "意味がなく、対応した状態が真の場合に I<revents> に設定される)。"
2327
2328 #. type: Plain text
2329 #: build/C/man2/poll.2:127
2330 msgid ""
2331 "If none of the events requested (and no error) has occurred for any of the "
2332 "file descriptors, then B<poll>()  blocks until one of the events occurs."
2333 msgstr ""
2334 "どのファイルディスクリプターにも要求したイベントが発生しておらず、 エラーも起"
2335 "こらない場合、 B<poll>()  はイベントのうちいずれか一つが発生するまで停止 "
2336 "(block) する。"
2337
2338 #. type: Plain text
2339 #: build/C/man2/poll.2:134
2340 msgid ""
2341 "The I<timeout> argument specifies the number of milliseconds that B<poll>()  "
2342 "should block waiting for a file descriptor to become ready.  The call will "
2343 "block until either:"
2344 msgstr ""
2345 "I<timeout> 引き数は、 ファイルディスクリプターが利用可能になるまで B<poll>() "
2346 "が停止する時間をミリ秒で指定する。 B<poll>() の呼び出しは以下のいずれかになる"
2347 "まで停止する。"
2348
2349 #. type: Plain text
2350 #: build/C/man2/poll.2:136
2351 msgid "a file descriptor becomes ready;"
2352 msgstr "ファイルディスクリプターが利用可能になる"
2353
2354 #. type: Plain text
2355 #: build/C/man2/poll.2:154
2356 msgid ""
2357 "Note that the I<timeout> interval will be rounded up to the system clock "
2358 "granularity, and kernel scheduling delays mean that the blocking interval "
2359 "may overrun by a small amount.  Specifying a negative value in I<timeout> "
2360 "means an infinite timeout.  Specifying a I<timeout> of zero causes "
2361 "B<poll>()  to return immediately, even if no file descriptors are ready."
2362 msgstr ""
2363 "I<timeout> 時間はシステムクロックの粒度に切り上げられ、 カーネルのスケジュー"
2364 "リング遅延により少しだけ長くなる可能性がある点に注意すること。 I<timeout> に"
2365 "負の値を指定した場合、タイムアウト時間が無限大を意味する。 I<timeout> を 0 に"
2366 "指定した場合、I/O 可能なファイルディスクリプターがない場合であっても、 "
2367 "B<poll>() はすぐに返る。"
2368
2369 #. type: Plain text
2370 #: build/C/man2/poll.2:160
2371 msgid ""
2372 "The bits that may be set/returned in I<events> and I<revents> are defined in "
2373 "I<E<lt>poll.hE<gt>>:"
2374 msgstr ""
2375 "I<events> に指定したり、 I<revents> で返されるビットは I<E<lt>poll.hE<gt>> で"
2376 "定義されている:"
2377
2378 #. type: TP
2379 #: build/C/man2/poll.2:161
2380 #, no-wrap
2381 msgid "B<POLLIN>"
2382 msgstr "B<POLLIN>"
2383
2384 #. type: Plain text
2385 #: build/C/man2/poll.2:164
2386 msgid "There is data to read."
2387 msgstr "読み出し可能なデータがある。"
2388
2389 #. type: TP
2390 #: build/C/man2/poll.2:164
2391 #, no-wrap
2392 msgid "B<POLLPRI>"
2393 msgstr "B<POLLPRI>"
2394
2395 #. type: Plain text
2396 #: build/C/man2/poll.2:168
2397 msgid ""
2398 "There is urgent data to read (e.g., out-of-band data on TCP socket; "
2399 "pseudoterminal master in packet mode has seen state change in slave)."
2400 msgstr ""
2401 "読み出し可能な緊急データ (urgent data) がある (例えば、TCP ソケットの帯域外 "
2402 "(out-of-band data) データを受信した場合や、 パケットモードの擬似端末のマスタ"
2403 "がスレーブ側の変化を見つけたとき)。"
2404
2405 #. type: TP
2406 #: build/C/man2/poll.2:168
2407 #, no-wrap
2408 msgid "B<POLLOUT>"
2409 msgstr "B<POLLOUT>"
2410
2411 #. type: Plain text
2412 #: build/C/man2/poll.2:174
2413 msgid ""
2414 "Writing is now possible, though a write larger that the available space in a "
2415 "socket or pipe will still block (unless B<O_NONBLOCK> is set)."
2416 msgstr ""
2417 "書き込みが可能になった。ただし、ソケットやパイプで利用可能な空間よりも大きな"
2418 "データを書き込んだ場合には (B<O_NONBLOCK> がセットされている場合以外は) やは"
2419 "り停止することになる。"
2420
2421 #. type: TP
2422 #: build/C/man2/poll.2:174
2423 #, no-wrap
2424 msgid "B<POLLRDHUP> (since Linux 2.6.17)"
2425 msgstr "B<POLLRDHUP> (Linux 2.6.17 以降)"
2426
2427 #. type: Plain text
2428 #: build/C/man2/poll.2:185
2429 msgid ""
2430 "Stream socket peer closed connection, or shut down writing half of "
2431 "connection.  The B<_GNU_SOURCE> feature test macro must be defined (before "
2432 "including I<any> header files)  in order to obtain this definition."
2433 msgstr ""
2434 "ストリームソケットの他端が、コネクションを close したか、 コネクションの書き"
2435 "込み側を shutdown した。 この定義を有効にするには、 (「どの」ヘッダーファイル"
2436 "をインクルードするよりも前に)  B<_GNU_SOURCE> 機能検査マクロを定義しなければ"
2437 "ならない。"
2438
2439 #. type: TP
2440 #: build/C/man2/poll.2:185
2441 #, no-wrap
2442 msgid "B<POLLERR>"
2443 msgstr "B<POLLERR>"
2444
2445 #. type: Plain text
2446 #: build/C/man2/poll.2:188
2447 msgid "Error condition (output only)."
2448 msgstr "エラー状態 (出力の場合のみ)。"
2449
2450 #. type: TP
2451 #: build/C/man2/poll.2:188
2452 #, no-wrap
2453 msgid "B<POLLHUP>"
2454 msgstr "B<POLLHUP>"
2455
2456 #. type: Plain text
2457 #: build/C/man2/poll.2:191
2458 msgid "Hang up (output only)."
2459 msgstr "ハングアップした (出力の場合のみ)。"
2460
2461 #. type: TP
2462 #: build/C/man2/poll.2:191
2463 #, no-wrap
2464 msgid "B<POLLNVAL>"
2465 msgstr "B<POLLNVAL>"
2466
2467 #. type: Plain text
2468 #: build/C/man2/poll.2:196
2469 msgid "Invalid request: I<fd> not open (output only)."
2470 msgstr "不正な要求: I<fd> がオープンされていない (出力の場合のみ)。"
2471
2472 #. type: Plain text
2473 #: build/C/man2/poll.2:202
2474 msgid ""
2475 "When compiling with B<_XOPEN_SOURCE> defined, one also has the following, "
2476 "which convey no further information beyond the bits listed above:"
2477 msgstr ""
2478 "B<_XOPEN_SOURCE> を定義してコンパイルした場合には、以下の定義も行われる。 た"
2479 "だし、上記のリストにあるビット以上の情報が得られる訳ではない。"
2480
2481 #. type: TP
2482 #: build/C/man2/poll.2:203
2483 #, no-wrap
2484 msgid "B<POLLRDNORM>"
2485 msgstr "B<POLLRDNORM>"
2486
2487 #. type: Plain text
2488 #: build/C/man2/poll.2:207
2489 msgid "Equivalent to B<POLLIN>."
2490 msgstr "B<POLLIN> と同じ。"
2491
2492 #. type: TP
2493 #: build/C/man2/poll.2:207
2494 #, no-wrap
2495 msgid "B<POLLRDBAND>"
2496 msgstr "B<POLLRDBAND>"
2497
2498 #.  POLLRDBAND is used in the DECnet protocol.
2499 #. type: Plain text
2500 #: build/C/man2/poll.2:211
2501 msgid "Priority band data can be read (generally unused on Linux)."
2502 msgstr ""
2503 "優先帯域データ (priority band data) が読み出し可能である (普通は Linux では使"
2504 "用されない)。"
2505
2506 #. type: TP
2507 #: build/C/man2/poll.2:211
2508 #, no-wrap
2509 msgid "B<POLLWRNORM>"
2510 msgstr "B<POLLWRNORM>"
2511
2512 #. type: Plain text
2513 #: build/C/man2/poll.2:215
2514 msgid "Equivalent to B<POLLOUT>."
2515 msgstr "B<POLLOUT> と同じ。"
2516
2517 #. type: TP
2518 #: build/C/man2/poll.2:215
2519 #, no-wrap
2520 msgid "B<POLLWRBAND>"
2521 msgstr "B<POLLWRBAND>"
2522
2523 #. type: Plain text
2524 #: build/C/man2/poll.2:218
2525 msgid "Priority data may be written."
2526 msgstr "優先帯域データ (priority data) が書き込み可能である。"
2527
2528 #. type: Plain text
2529 #: build/C/man2/poll.2:222
2530 msgid "Linux also knows about, but does not use B<POLLMSG>."
2531 msgstr "Linux では B<POLLMSG> も定義されているが、使用されていない。"
2532
2533 #. type: SS
2534 #: build/C/man2/poll.2:222
2535 #, no-wrap
2536 msgid "ppoll()"
2537 msgstr "ppoll()"
2538
2539 #. type: Plain text
2540 #: build/C/man2/poll.2:236
2541 msgid ""
2542 "The relationship between B<poll>()  and B<ppoll>()  is analogous to the "
2543 "relationship between B<select>(2)  and B<pselect>(2): like B<pselect>(2), "
2544 "B<ppoll>()  allows an application to safely wait until either a file "
2545 "descriptor becomes ready or until a signal is caught."
2546 msgstr ""
2547 "B<poll>()  と B<ppoll>()  の関係は B<select>(2)  と B<pselect>(2)  の関係と同"
2548 "じようなものである: B<pselect>(2)  と同様に、 B<ppoll>()  を使うと、アプリ"
2549 "ケーションはファイルディスクリプターの状態変化 もしくはシグナルの捕捉を安全に"
2550 "待つことができる。"
2551
2552 #. type: Plain text
2553 #: build/C/man2/poll.2:242
2554 msgid ""
2555 "Other than the difference in the precision of the I<timeout> argument, the "
2556 "following B<ppoll>()  call:"
2557 msgstr ""
2558 "I<timeout> 引き数の精度の違いを除くと、以下の B<ppoll>()  の呼び出しは、"
2559
2560 #. type: Plain text
2561 #: build/C/man2/poll.2:245
2562 #, no-wrap
2563 msgid "    ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2564 msgstr "    ready = ppoll(&fds, nfds, timeout_ts, &sigmask);\n"
2565
2566 #. type: Plain text
2567 #: build/C/man2/poll.2:254
2568 #, no-wrap
2569 msgid ""
2570 "    sigset_t origmask;\n"
2571 "    int timeout;\n"
2572 msgstr ""
2573 "    sigset_t origmask;\n"
2574 "    int timeout;\n"
2575
2576 #. type: Plain text
2577 #: build/C/man2/poll.2:260
2578 #, no-wrap
2579 msgid ""
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 msgstr ""
2586 "    timeout = (timeout_ts == NULL) ? -1 :\n"
2587 "              (timeout_ts.tv_sec * 1000 + timeout_ts.tv_nsec / 1000000);\n"
2588 "    sigprocmask(SIG_SETMASK, &sigmask, &origmask);\n"
2589 "    ready = poll(&fds, nfds, timeout);\n"
2590 "    sigprocmask(SIG_SETMASK, &origmask, NULL);\n"
2591
2592 #. type: Plain text
2593 #: build/C/man2/poll.2:267
2594 msgid ""
2595 "See the description of B<pselect>(2)  for an explanation of why B<ppoll>()  "
2596 "is necessary."
2597 msgstr ""
2598 "なぜ B<ppoll>()  が必要なのかについての説明は B<pselect>(2)  の説明を参照のこ"
2599 "と。"
2600
2601 #. type: Plain text
2602 #: build/C/man2/poll.2:279
2603 msgid ""
2604 "If the I<sigmask> argument is specified as NULL, then no signal mask "
2605 "manipulation is performed (and thus B<ppoll>()  differs from B<poll>()  only "
2606 "in the precision of the I<timeout> argument)."
2607 msgstr ""
2608 "I<sigmask> 引き数に NULL が指定された場合、シグナルマスクの操作は行われない "
2609 "(したがって、 B<ppoll>()  の B<poll>()  との違いは I<timeout> 引き数の精度だ"
2610 "けとなる)。"
2611
2612 #. type: Plain text
2613 #: build/C/man2/poll.2:286
2614 msgid ""
2615 "The I<timeout_ts> argument specifies an upper limit on the amount of time "
2616 "that B<ppoll>()  will block.  This argument is a pointer to a structure of "
2617 "the following form:"
2618 msgstr ""
2619 "I<timeout> 引き数は B<ppoll>()  が停止する時間の上限を指定するものである。 こ"
2620 "の引き数には以下の型の構造体へのポインターを指定する。"
2621
2622 #. type: Plain text
2623 #: build/C/man2/poll.2:293
2624 #, no-wrap
2625 msgid ""
2626 "struct timespec {\n"
2627 "    long    tv_sec;         /* seconds */\n"
2628 "    long    tv_nsec;        /* nanoseconds */\n"
2629 "};\n"
2630 msgstr ""
2631 "struct timespec {\n"
2632 "    long    tv_sec;         /* seconds */\n"
2633 "    long    tv_nsec;        /* nanoseconds */\n"
2634 "};\n"
2635
2636 #. type: Plain text
2637 #: build/C/man2/poll.2:301
2638 msgid ""
2639 "If I<timeout_ts> is specified as NULL, then B<ppoll>()  can block "
2640 "indefinitely."
2641 msgstr ""
2642 "I<timeout_ts> に NULL が指定された場合、 B<ppoll> は無限に停止することがあり"
2643 "得る。"
2644
2645 #. type: Plain text
2646 #: build/C/man2/poll.2:311
2647 msgid ""
2648 "On success, a positive number is returned; this is the number of structures "
2649 "which have nonzero I<revents> fields (in other words, those descriptors with "
2650 "events or errors reported).  A value of 0 indicates that the call timed out "
2651 "and no file descriptors were ready.  On error, -1 is returned, and I<errno> "
2652 "is set appropriately."
2653 msgstr ""
2654 "成功した場合は正の数を返す。この数は 0 以外の I<revents> 要素を持つ構造体の数"
2655 "である (別の言い方をすると、これらのディスクリプター にはイベントかエラー報告"
2656 "がある)。 値 0 は、タイムアウトとなり、どのファイルディスクリプターでもイベン"
2657 "トが 発生しなかったことを示す。エラーの場合は -1 が返され、 I<errno> が適切に"
2658 "設定される。"
2659
2660 #. type: Plain text
2661 #: build/C/man2/poll.2:316
2662 msgid ""
2663 "The array given as argument was not contained in the calling program's "
2664 "address space."
2665 msgstr ""
2666 "引き数として指定した配列が、呼び出したプロセスのアドレス空間に 含まれていな"
2667 "い。"
2668
2669 #. type: Plain text
2670 #: build/C/man2/poll.2:320
2671 msgid "A signal occurred before any requested event; see B<signal>(7)."
2672 msgstr ""
2673 "要求されたイベントのどれかが起こる前にシグナルが発生した。 B<signal>(7)  参"
2674 "照。"
2675
2676 #. type: Plain text
2677 #: build/C/man2/poll.2:327
2678 msgid "The I<nfds> value exceeds the B<RLIMIT_NOFILE> value."
2679 msgstr "I<nfds> の値が B<RLIMIT_NOFILE> を超えた。"
2680
2681 #. type: Plain text
2682 #: build/C/man2/poll.2:330
2683 msgid "There was no space to allocate file descriptor tables."
2684 msgstr "ファイルディスクリプターテーブルを確保するためのメモリーがない。"
2685
2686 #.  library call was introduced in libc 5.4.28
2687 #. type: Plain text
2688 #: build/C/man2/poll.2:340
2689 msgid ""
2690 "The B<poll>()  system call was introduced in Linux 2.1.23.  On older kernels "
2691 "that lack this system call, the glibc (and the old Linux libc)  B<poll>()  "
2692 "wrapper function provides emulation using B<select>(2)."
2693 msgstr ""
2694 "B<poll>() システムコールは Linux 2.1.23 で導入された。\n"
2695 "このシステムコールが存在しない古いカーネルでは、\n"
2696 "glibc (や古い Linux libc) は B<select>(2) を使用して B<poll>() \n"
2697 "ラッパー関数のエミュレーションを行う。"
2698
2699 #. type: Plain text
2700 #: build/C/man2/poll.2:347
2701 msgid ""
2702 "The B<ppoll>()  system call was added to Linux in kernel 2.6.16.  The "
2703 "B<ppoll>()  library call was added in glibc 2.4."
2704 msgstr ""
2705 "B<ppoll>()  システムコールは カーネル 2.6.16 で Linux に追加された。 "
2706 "B<ppoll>()  ライブラリコールは glibc 2.4 に追加された。"
2707
2708 #.  NetBSD 3.0 has a pollts() which is like Linux ppoll().
2709 #. type: Plain text
2710 #: build/C/man2/poll.2:353
2711 msgid "B<poll>()  conforms to POSIX.1-2001.  B<ppoll>()  is Linux-specific."
2712 msgstr ""
2713 "B<poll>()  は POSIX.1-2001 に準拠している。 B<ppoll>()  は Linux 固有である。"
2714
2715 #. type: Plain text
2716 #: build/C/man2/poll.2:361
2717 msgid ""
2718 "Some implementations define the nonstandard constant B<INFTIM> with the "
2719 "value -1 for use as a I<timeout> for B<poll>().  This constant is not "
2720 "provided in glibc."
2721 msgstr ""
2722 "いくつかの実装では、値 -1 を持った非標準の定数 B<INFTIM> が定義されており、 "
2723 "B<poll>()  の I<timeout> の指定に使用できる。 この定数は glibc では定義されて"
2724 "いない。"
2725
2726 #. type: Plain text
2727 #: build/C/man2/poll.2:366
2728 msgid ""
2729 "For a discussion of what may happen if a file descriptor being monitored by "
2730 "B<poll>()  is closed in another thread, see B<select>(2)."
2731 msgstr ""
2732 "B<poll>() で監視中のファイルディスクリプターが別のスレッドによってクローズさ"
2733 "れた場合に何が起こるかの議論については、 B<select>(2) を参照してほしい。"
2734
2735 #. type: Plain text
2736 #: build/C/man2/poll.2:380
2737 msgid ""
2738 "The Linux B<ppoll>()  system call modifies its I<timeout_ts> argument.  "
2739 "However, the glibc wrapper function hides this behavior by using a local "
2740 "variable for the timeout argument that is passed to the system call.  Thus, "
2741 "the glibc B<ppoll>()  function does not modify its I<timeout_ts> argument."
2742 msgstr ""
2743 "Linux の B<ppoll>()  システムコールは I<timeout_ts> 引き数を変更する。 しか"
2744 "し、glibc のラッパー関数は、システムコールに渡す timeout 引き数 としてローカ"
2745 "ル変数を使うことでこの動作を隠蔽している。 このため、glibc の B<ppoll>()  関"
2746 "数では I<timeout_ts> 引き数は変更されない。"
2747
2748 #. type: Plain text
2749 #: build/C/man2/poll.2:393
2750 msgid ""
2751 "The raw B<ppoll>()  system call has a fifth argument, I<size_t sigsetsize>, "
2752 "which specifies the size in bytes of the I<sigmask> argument.  The glibc "
2753 "B<ppoll>()  wrapper function specifies this argument as a fixed value (equal "
2754 "to I<sizeof(sigset_t)>)."
2755 msgstr ""
2756 "素の B<ppoll>() システムコールは 5 番目の引き数 I<size_t sigsetsize> をと"
2757 "る。 この引き数は I<sigmask> 引き数のバイト単位のサイズを指定する。 glibc の "
2758 "B<ppoll>() ラッパー関数は、この引き数に固定値 (I<sizeof(sigset_t)> と同じ) を"
2759 "指定する。"
2760
2761 #. type: Plain text
2762 #: build/C/man2/poll.2:397
2763 msgid ""
2764 "See the discussion of spurious readiness notifications under the BUGS "
2765 "section of B<select>(2)."
2766 msgstr ""
2767 "B<select>(2)  の「バグ」の節に書かれている、誤った準備完了通知 (spurious "
2768 "readiness notifications) についての議論を参照のこと。"
2769
2770 #. type: Plain text
2771 #: build/C/man2/poll.2:402
2772 msgid "B<restart_syscall>(2), B<select>(2), B<select_tut>(2), B<time>(7)"
2773 msgstr "B<restart_syscall>(2), B<select>(2), B<select_tut>(2), B<time>(7)"