OSDN Git Service

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