OSDN Git Service

d6d69e2e7d23df308a626a6b102939452323adae
[linuxjm/LDP_man-pages.git] / po4a / notify / po / ja.po
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-23 22:22+0900\n"
10 "PO-Revision-Date: 2015-01-23 22:35+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/fanotify.7:25
20 #, no-wrap
21 msgid "FANOTIFY"
22 msgstr "FANOTIFY"
23
24 #. type: TH
25 #: build/C/man7/fanotify.7:25 build/C/man7/inotify.7:27
26 #, no-wrap
27 msgid "2014-12-31"
28 msgstr "2014-12-31"
29
30 #. type: TH
31 #: build/C/man7/fanotify.7:25 build/C/man2/fanotify_init.2:24
32 #: build/C/man2/fanotify_mark.2:24 build/C/man7/inotify.7:27
33 #: build/C/man2/inotify_add_watch.2:28 build/C/man2/inotify_init.2:29
34 #: build/C/man2/inotify_rm_watch.2:27
35 #, no-wrap
36 msgid "Linux"
37 msgstr "Linux"
38
39 #. type: TH
40 #: build/C/man7/fanotify.7:25 build/C/man2/fanotify_init.2:24
41 #: build/C/man2/fanotify_mark.2:24 build/C/man7/inotify.7:27
42 #: build/C/man2/inotify_add_watch.2:28 build/C/man2/inotify_init.2:29
43 #: build/C/man2/inotify_rm_watch.2:27
44 #, no-wrap
45 msgid "Linux Programmer's Manual"
46 msgstr "Linux Programmer's Manual"
47
48 #. type: SH
49 #: build/C/man7/fanotify.7:26 build/C/man2/fanotify_init.2:25
50 #: build/C/man2/fanotify_mark.2:25 build/C/man7/inotify.7:28
51 #: build/C/man2/inotify_add_watch.2:29 build/C/man2/inotify_init.2:30
52 #: build/C/man2/inotify_rm_watch.2:28
53 #, no-wrap
54 msgid "NAME"
55 msgstr "名前"
56
57 #. type: Plain text
58 #: build/C/man7/fanotify.7:28
59 msgid "fanotify - monitoring filesystem events"
60 msgstr "fanotify - ファイルシステムイベントを監視する"
61
62 #. type: SH
63 #: build/C/man7/fanotify.7:28 build/C/man2/fanotify_init.2:33
64 #: build/C/man2/fanotify_mark.2:36 build/C/man7/inotify.7:30
65 #: build/C/man2/inotify_add_watch.2:35 build/C/man2/inotify_init.2:39
66 #: build/C/man2/inotify_rm_watch.2:36
67 #, no-wrap
68 msgid "DESCRIPTION"
69 msgstr "説明"
70
71 #. type: Plain text
72 #: build/C/man7/fanotify.7:37
73 msgid ""
74 "The fanotify API provides notification and interception of filesystem "
75 "events.  Use cases include virus scanning and hierarchical storage "
76 "management.  Currently, only a limited set of events is supported.  In "
77 "particular, there is no support for create, delete, and move events.  (See "
78 "B<inotify>(7)  for details of an API that does notify those events.)"
79 msgstr ""
80 "fanotify API はファイルシステムイベントの通知と横取り機能 (interception) を提"
81 "供する。 ユースケースとしては、ウイルススキャンや階層型ストレージの管理などが"
82 "ある。 現在のところ、限定的なイベントのみがサポートされている。 特に、作成 "
83 "(create)、削除 (delete)、移動 (move) イベントがサポートされていない (これらの"
84 "イベントを通知する API の詳細については B<inotify>(7) を参照)。"
85
86 #. type: Plain text
87 #: build/C/man7/fanotify.7:44
88 msgid ""
89 "Additional capabilities compared to the B<inotify>(7)  API include the "
90 "ability to monitor all of the objects in a mounted filesystem, the ability "
91 "to make access permission decisions, and the possibility to read or modify "
92 "files before access by other applications."
93 msgstr ""
94 "B<inotify>(7) API と比較して追加されている機能としては、 マウントされたファイ"
95 "ルシステムの全オブジェクトを監視する機能、 アクセス許可の判定を行う機能、 他"
96 "のアプリケーションによるアクセスの前にファイルを読み出したり変更したりする機"
97 "能がある。"
98
99 #. type: Plain text
100 #: build/C/man7/fanotify.7:52
101 msgid ""
102 "The following system calls are used with this API: B<fanotify_init>(2), "
103 "B<fanotify_mark>(2), B<read>(2), B<write>(2), and B<close>(2)."
104 msgstr ""
105 "この API では以下のシステムコールを使用する: B<fanotify_init>(2), "
106 "B<fanotify_mark>(2), B<read>(2), B<write>(2), B<close>(2)。"
107
108 #. type: SS
109 #: build/C/man7/fanotify.7:52
110 #, no-wrap
111 msgid "fanotify_init(), fanotify_mark(), and notification groups"
112 msgstr "fanotify_init(), fanotify_mark() と通知グループ"
113
114 #. type: Plain text
115 #: build/C/man7/fanotify.7:57
116 msgid ""
117 "The B<fanotify_init>(2)  system call creates and initializes an fanotify "
118 "notification group and returns a file descriptor referring to it."
119 msgstr ""
120 "B<fanotify_init>(2) システムコールは fanotify 通知グループを作成、初期化し、 "
121 "この通知グループを参照するファイルディスクリプターを返す。"
122
123 #. type: Plain text
124 #: build/C/man7/fanotify.7:61
125 msgid ""
126 "An fanotify notification group is a kernel-internal object that holds a list "
127 "of files, directories, and mount points for which events shall be created."
128 msgstr ""
129 "fanotify 通知グループはカーネル内部のオブジェクトで、 イベントが作成される"
130 "ファイル、 ディレクトリ、 マウントポイントのリストを保持する。"
131
132 #. type: Plain text
133 #: build/C/man7/fanotify.7:72
134 msgid ""
135 "For each entry in an fanotify notification group, two bit masks exist: the "
136 "I<mark> mask and the I<ignore> mask.  The mark mask defines file activities "
137 "for which an event shall be created.  The ignore mask defines activities for "
138 "which no event shall be generated.  Having these two types of masks permits "
139 "a mount point or directory to be marked for receiving events, while at the "
140 "same time ignoring events for specific objects under that mount point or "
141 "directory."
142 msgstr ""
143 "fanotify 通知グループの各エントリーには 2 つのビットマスクがある。 I<mark> マ"
144 "スクと I<ignore> マスクである。 mark マスクはどのファイル操作についてイベント"
145 "を作成するかを定義する。 ignore マスクはどの操作についてイベントを作成しない"
146 "かを定義する。 これらの 2 種類のマスクがあることで、 マウントポイントやディレ"
147 "クトリに対してイベントの受信を mark しておきつつ、 同時にそのマウントポイント"
148 "やディレクトリ配下の特定のオブジェクトに対するイベントを無視する、 といったこ"
149 "とができる。"
150
151 #. type: Plain text
152 #: build/C/man7/fanotify.7:78
153 msgid ""
154 "The B<fanotify_mark>(2)  system call adds a file, directory, or mount to a "
155 "notification group and specifies which events shall be reported (or "
156 "ignored), or removes or modifies such an entry."
157 msgstr ""
158 "B<fanotify_mark>(2) システムコールは、ファイル、ディレクトリ、マウントを通知"
159 "グループに追加し、 どのイベントを報告 (もしくは無視) するかを指定する。 ま"
160 "た、このようなエントリーの削除、変更も行う。"
161
162 #. type: Plain text
163 #: build/C/man7/fanotify.7:91
164 msgid ""
165 "A possible usage of the ignore mask is for a file cache.  Events of interest "
166 "for a file cache are modification of a file and closing of the same.  Hence, "
167 "the cached directory or mount point is to be marked to receive these "
168 "events.  After receiving the first event informing that a file has been "
169 "modified, the corresponding cache entry will be invalidated.  No further "
170 "modification events for this file are of interest until the file is closed.  "
171 "Hence, the modify event can be added to the ignore mask.  Upon receiving the "
172 "close event, the modify event can be removed from the ignore mask and the "
173 "file cache entry can be updated."
174 msgstr ""
175 "ignore マスクの考えられる使用方法はファイルキャッシュに対してである。 ファイ"
176 "ルキャッシュに関して興味のあるイベントは、ファイルの変更とファイルのクローズ"
177 "である。 それゆえ、 キャッシュされたディレクトリやマウントポイントは、 これら"
178 "のイベントを受信するようにマークされる。 ファイルが変更されたという最初のイベ"
179 "ントを受信した後は、 対応するキャッシュエントリーは無効化される。 そのファイ"
180 "ルがクローズされるまでは、 このファイルに対する変更イベントは興味のない情報と"
181 "なる。 したがって、 変更イベントを ignore マスクに追加することができる。 ク"
182 "ローズイベントを受信すると、 変更イベントを ignore イベントから削除し、 ファ"
183 "イルキャッシュエントリーを更新することができる。"
184
185 #. type: Plain text
186 #: build/C/man7/fanotify.7:98
187 msgid ""
188 "The entries in the fanotify notification groups refer to files and "
189 "directories via their inode number and to mounts via their mount ID.  If "
190 "files or directories are renamed or moved, the respective entries survive.  "
191 "If files or directories are deleted or mounts are unmounted, the "
192 "corresponding entries are deleted."
193 msgstr ""
194 "fanotify 通知グループのエントリーは、 ファイルやディレクトリでは inode 番号経"
195 "由で参照され、 マウントではマウント ID 経由で参照される。 ファイルやディレク"
196 "トリの名前が変更されたり、移動されたりした場合も、 関連するエントリーはそのま"
197 "ま残る。 ファイルやディレクトリが削除されたり、マウントがアンマウントされたり"
198 "した場合には、 対応するエントリーは削除される。"
199
200 #. type: SS
201 #: build/C/man7/fanotify.7:98
202 #, no-wrap
203 msgid "The event queue"
204 msgstr "イベントキュー"
205
206 #. type: Plain text
207 #: build/C/man7/fanotify.7:107
208 msgid ""
209 "As events occur on the filesystem objects monitored by a notification group, "
210 "the fanotify system generates events that are collected in a queue.  These "
211 "events can then be read (using B<read>(2)  or similar)  from the fanotify "
212 "file descriptor returned by B<fanotify_init>(2)."
213 msgstr ""
214 "通知グループにより監視されているファイルシステムオブジェクトでイベントが発生"
215 "すると、 fanotify システムはイベントを生成し、 そのイベントはキューにまとめら"
216 "れる。 これらのイベントは、 B<fanotify_init>(2) が返した fanotify ファイル"
217 "ディスクリプターから (B<read>(2) などを使って) 読み出すことができる。"
218
219 #. type: Plain text
220 #: build/C/man7/fanotify.7:121
221 msgid ""
222 "Two types of events are generated: I<notification> events and I<permission> "
223 "events.  Notification events are merely informative and require no action to "
224 "be taken by the receiving application except for closing the file descriptor "
225 "passed in the event (see below).  Permission events are requests to the "
226 "receiving application to decide whether permission for a file access shall "
227 "be granted.  For these events, the recipient must write a response which "
228 "decides whether access is granted or not."
229 msgstr ""
230 "2 種類のイベントが生成される。 I<notification> (通知) イベントと "
231 "I<permission> (アクセス許可) イベントである。 通知イベントは単なる情報通知で"
232 "あり、 イベントで渡されたファイルディスクリプターをクローズする場合 (下記参"
233 "照) を除き、 受信したアプリケーションでアクションを取る必要はない。 アクセス"
234 "許可イベントは、 受信したアプリケーションがファイルアクセスの許可を承認するか"
235 "を判定する必要がある。 この場合、 受信者はアクセスが許可されたか否かを決定す"
236 "る応答を書き込まなければならない。"
237
238 #. type: Plain text
239 #: build/C/man7/fanotify.7:128
240 msgid ""
241 "An event is removed from the event queue of the fanotify group when it has "
242 "been read.  Permission events that have been read are kept in an internal "
243 "list of the fanotify group until either a permission decision has been taken "
244 "by writing to the fanotify file descriptor or the fanotify file descriptor "
245 "is closed."
246 msgstr ""
247 "イベントは、 読み出されると、 fanotify グループのイベントキューから削除され"
248 "る。 読み出されたアクセス許可イベントは、 fanotify ファイルディスクリプターに"
249 "アクセス許可の判定が書き込まれるか、 fanotify ファイルディスクリプターがク"
250 "ローズされるまで、 fanotify グループの内部のリストに保持される。"
251
252 #. type: SS
253 #: build/C/man7/fanotify.7:128
254 #, no-wrap
255 msgid "Reading fanotify events"
256 msgstr "fanotify イベントの読み出し"
257
258 #. type: Plain text
259 #: build/C/man7/fanotify.7:140
260 msgid ""
261 "Calling B<read>(2)  for the file descriptor returned by B<fanotify_init>(2)  "
262 "blocks (if the flag B<FAN_NONBLOCK> is not specified in the call to "
263 "B<fanotify_init>(2))  until either a file event occurs or the call is "
264 "interrupted by a signal (see B<signal>(7))."
265 msgstr ""
266 "B<fanotify_init>(2) が返したファイルディスクリプターに対する B<read>(2) を呼"
267 "び出しは、 (B<fanotify_init>(2) の呼び出しでフラグ B<FAN_NONBLOCK> を指定しな"
268 "かった場合) ファイルイベントが起こるか、呼び出しがシグナルによって割り込まれ"
269 "る (B<signal>(7) 参照) まで停止する。"
270
271 #. type: Plain text
272 #: build/C/man7/fanotify.7:144
273 msgid ""
274 "After a successful B<read>(2), the read buffer contains one or more of the "
275 "following structures:"
276 msgstr ""
277 "B<read>(2) が成功すると、読み出しバッファーには以下の構造体が 1 つ以上格納さ"
278 "れる。"
279
280 #. type: Plain text
281 #: build/C/man7/fanotify.7:156
282 #, no-wrap
283 msgid ""
284 "struct fanotify_event_metadata {\n"
285 "    __u32 event_len;\n"
286 "    __u8 vers;\n"
287 "    __u8 reserved;\n"
288 "    __u16 metadata_len;\n"
289 "    __aligned_u64 mask;\n"
290 "    __s32 fd;\n"
291 "    __s32 pid;\n"
292 "};\n"
293 msgstr ""
294 "struct fanotify_event_metadata {\n"
295 "    __u32 event_len;\n"
296 "    __u8 vers;\n"
297 "    __u8 reserved;\n"
298 "    __u16 metadata_len;\n"
299 "    __aligned_u64 mask;\n"
300 "    __s32 fd;\n"
301 "    __s32 pid;\n"
302 "};\n"
303
304 #. type: Plain text
305 #: build/C/man7/fanotify.7:163
306 msgid ""
307 "For performance reasons, it is recommended to use a large buffer size (for "
308 "example, 4096 bytes), so that multiple events can be retrieved by a single "
309 "B<read>(2)."
310 msgstr ""
311 "性能上の理由から、複数のイベントを一度の B<read>(2) で取得できるように大きめ"
312 "のバッファーサイズ (例えば 4096 バイト) を使用することを推奨する。"
313
314 #. type: Plain text
315 #: build/C/man7/fanotify.7:168
316 msgid ""
317 "The return value of B<read>(2)  is the number of bytes placed in the buffer, "
318 "or -1 in case of an error (but see BUGS)."
319 msgstr ""
320 "B<read>(2) の返り値はバッファーに格納されたバイト数である。 エラーの場合は "
321 "-1 が返される (ただし、バグも参照)。"
322
323 #. type: Plain text
324 #: build/C/man7/fanotify.7:172
325 msgid "The fields of the I<fanotify_event_metadata> structure are as follows:"
326 msgstr "I<fanotify_event_metadata> 構造体のフィールドは以下のとおりである。"
327
328 #. type: TP
329 #: build/C/man7/fanotify.7:172
330 #, no-wrap
331 msgid "I<event_len>"
332 msgstr "I<event_len>"
333
334 #. type: Plain text
335 #: build/C/man7/fanotify.7:182
336 msgid ""
337 "This is the length of the data for the current event and the offset to the "
338 "next event in the buffer.  In the current implementation, the value of "
339 "I<event_len> is always B<FAN_EVENT_METADATA_LEN>.  However, the API is "
340 "designed to allow variable-length structures to be returned in the future."
341 msgstr ""
342 "これは、 このイベントのデータ長であり、バッファー内の次のイベントへのオフセッ"
343 "トである。 現在の実装では、 I<event_len> の値は常に "
344 "B<FAN_EVENT_METADATA_LEN> である。 しかしながら、 API は将来可変長の構造体を"
345 "返すことができるように設計されている。"
346
347 #. type: TP
348 #: build/C/man7/fanotify.7:182
349 #, no-wrap
350 msgid "I<vers>"
351 msgstr "I<vers>"
352
353 #. type: Plain text
354 #: build/C/man7/fanotify.7:191
355 msgid ""
356 "This field holds a version number for the structure.  It must be compared to "
357 "B<FANOTIFY_METADATA_VERSION> to verify that the structures returned at "
358 "runtime match the structures defined at compile time.  In case of a "
359 "mismatch, the application should abandon trying to use the fanotify file "
360 "descriptor."
361 msgstr ""
362 "このフィールドには構造体のバージョン番号が入る。 実行時に返された構造体がコン"
363 "パイル時の構造体と一致しているかを検査するには、 この値を "
364 "B<FANOTIFY_METADATA_VERSION> を比較すること。 一致しない場合、 アプリケーショ"
365 "ンはその fanotify ファイルディスクリプターを使用するのを諦めるべきである。"
366
367 #. type: TP
368 #: build/C/man7/fanotify.7:191
369 #, no-wrap
370 msgid "I<reserved>"
371 msgstr "I<reserved>"
372
373 #. type: Plain text
374 #: build/C/man7/fanotify.7:194
375 msgid "This field is not used."
376 msgstr "このフィールドは使用されない。"
377
378 #. type: TP
379 #: build/C/man7/fanotify.7:194
380 #, no-wrap
381 msgid "I<metadata_len>"
382 msgstr "I<metadata_len>"
383
384 #. type: Plain text
385 #: build/C/man7/fanotify.7:200
386 msgid ""
387 "This is the length of the structure.  The field was introduced to facilitate "
388 "the implementation of optional headers per event type.  No such optional "
389 "headers exist in the current implementation."
390 msgstr ""
391 "この構造体の長さである。 このフィールドは、 イベント種別単位のオプションヘッ"
392 "ダーの実装を扱うために導入された。 現在の実装ではこのようなオプションヘッダー"
393 "は存在しない。"
394
395 #. type: TP
396 #: build/C/man7/fanotify.7:200
397 #, no-wrap
398 msgid "I<mask>"
399 msgstr "I<mask>"
400
401 #. type: Plain text
402 #: build/C/man7/fanotify.7:203
403 msgid "This is a bit mask describing the event (see below)."
404 msgstr "イベントを示すビットマスクである (下記参照)"
405
406 #. type: TP
407 #: build/C/man7/fanotify.7:203 build/C/man7/fanotify.7:360
408 #, no-wrap
409 msgid "I<fd>"
410 msgstr "I<fd>"
411
412 #. type: Plain text
413 #: build/C/man7/fanotify.7:211
414 msgid ""
415 "This is an open file descriptor for the object being accessed, or "
416 "B<FAN_NOFD> if a queue overflow occurred.  The file descriptor can be used "
417 "to access the contents of the monitored file or directory.  The reading "
418 "application is responsible for closing this file descriptor."
419 msgstr ""
420 "これはアクセスされたオブジェクトに対するオープンされたファイルディスクリプ"
421 "ターである。 または、キューのオーバーフローが発生した場合には B<FAN_NOFD> が"
422 "入る。 ファイルディスクリプターは監視対象のファイルやディレクトリの内容にアク"
423 "セスするのに使用できる。 読み出したアプリケーションは責任を持ってこのファイル"
424 "ディスクリプターをクローズしなければならない。"
425
426 #. type: Plain text
427 #: build/C/man7/fanotify.7:224
428 msgid ""
429 "When calling B<fanotify_init>(2), the caller may specify (via the "
430 "I<event_f_flags> argument) various file status flags that are to be set on "
431 "the open file description that corresponds to this file descriptor.  In "
432 "addition, the (kernel-internal)  B<FMODE_NONOTIFY> file status flag is set "
433 "on the open file description.  This flag suppresses fanotify event "
434 "generation.  Hence, when the receiver of the fanotify event accesses the "
435 "notified file or directory using this file descriptor, no additional events "
436 "will be created."
437 msgstr ""
438 "B<fanotify_init>(2) を呼び出す際、 呼び出し元はこのファイルディスクリプターに"
439 "対応するオープンファイル記述にセットされた様々なファイル状態フラグを "
440 "(I<event_f_flags> 引き数を使って) 指定することができる。 さらに、 (カーネル内"
441 "部の) B<FMODE_NONOTIFY> ファイル状態フラグがオープンファイル記述にセットされ"
442 "る。 このフラグは fanotify イベントの生成を抑制する。 したがって、 fanotify "
443 "イベントの受信者がこのファイルディスクリプターを使って通知されたファイルや"
444 "ディレクトリにアクセスした際に、 これ以上イベントが作成されなくなる。"
445
446 #. type: TP
447 #: build/C/man7/fanotify.7:224
448 #, no-wrap
449 msgid "I<pid>"
450 msgstr "I<pid>"
451
452 #. type: Plain text
453 #: build/C/man7/fanotify.7:232
454 msgid ""
455 "This is the ID of the process that caused the event.  A program listening to "
456 "fanotify events can compare this PID to the PID returned by B<getpid>(2), to "
457 "determine whether the event is caused by the listener itself, or is due to a "
458 "file access by another process."
459 msgstr ""
460 "これはイベントが発生する原因となったプロセス ID である。 fanotify イベントを"
461 "監視しているプログラムは、 この PID を B<getpid>(2) が返す PID と比較すること"
462 "で、 イベントが監視しているプログラム自身から発生したかどうか、 別のプロセス"
463 "によるファイルアクセスにより発生したか、を判定できる。"
464
465 #. type: Plain text
466 #: build/C/man7/fanotify.7:242
467 msgid ""
468 "The bit mask in I<mask> indicates which events have occurred for a single "
469 "filesystem object.  Multiple bits may be set in this mask, if more than one "
470 "event occurred for the monitored filesystem object.  In particular, "
471 "consecutive events for the same filesystem object and originating from the "
472 "same process may be merged into a single event, with the exception that two "
473 "permission events are never merged into one queue entry."
474 msgstr ""
475 "I<mask> のビットマスクは、1 つのファイルシステムオブジェクトに対してどのイベ"
476 "ントが発生したかを示す。 監視対象のファイルシステムオブジェクトに複数のイベン"
477 "トが発生した場合は、 このマスクに複数のビットがセットされることがある。 特"
478 "に、 同じファイルシステムオブジェクトに対する連続するイベントが同じプロセスか"
479 "ら生成された場合には、 一つのイベントにまとめられることがある。 例外として、 "
480 "2 つのアクセス許可イベントが一つのキューエントリーにまとめられることは決して"
481 "ない。"
482
483 #. type: Plain text
484 #: build/C/man7/fanotify.7:246
485 msgid "The bits that may appear in I<mask> are as follows:"
486 msgstr "I<mask> でセットされている可能性のあるビットは以下のとおりである。"
487
488 #. type: TP
489 #: build/C/man7/fanotify.7:246 build/C/man2/fanotify_mark.2:136
490 #, no-wrap
491 msgid "B<FAN_ACCESS>"
492 msgstr "B<FAN_ACCESS>"
493
494 #. type: Plain text
495 #: build/C/man7/fanotify.7:249
496 msgid "A file or a directory (but see BUGS) was accessed (read)."
497 msgstr ""
498 "ファイルやディレクトリがアクセスされた (読み出しが行われた) (ただし、「バグ」"
499 "の節も参照)。"
500
501 #. type: TP
502 #: build/C/man7/fanotify.7:249 build/C/man2/fanotify_mark.2:148
503 #, no-wrap
504 msgid "B<FAN_OPEN>"
505 msgstr "B<FAN_OPEN>"
506
507 #. type: Plain text
508 #: build/C/man7/fanotify.7:252
509 msgid "A file or a directory was opened."
510 msgstr "ファイルやディレクトリがオープンされた。"
511
512 #. type: TP
513 #: build/C/man7/fanotify.7:252 build/C/man2/fanotify_mark.2:139
514 #, no-wrap
515 msgid "B<FAN_MODIFY>"
516 msgstr "B<FAN_MODIFY>"
517
518 #. type: Plain text
519 #: build/C/man7/fanotify.7:255
520 msgid "A file was modified."
521 msgstr "ファイルやディレクトリが変更された。"
522
523 #. type: TP
524 #: build/C/man7/fanotify.7:255 build/C/man2/fanotify_mark.2:142
525 #, no-wrap
526 msgid "B<FAN_CLOSE_WRITE>"
527 msgstr "B<FAN_CLOSE_WRITE>"
528
529 #. type: Plain text
530 #: build/C/man7/fanotify.7:262
531 msgid ""
532 "A file that was opened for writing (B<O_WRONLY> or B<O_RDWR>)  was closed."
533 msgstr ""
534 "書き込み用 (B<O_WRONLY> か B<O_RDWR>) にオープンされたファイルがクローズされ"
535 "た。"
536
537 #. type: TP
538 #: build/C/man7/fanotify.7:262 build/C/man2/fanotify_mark.2:145
539 #, no-wrap
540 msgid "B<FAN_CLOSE_NOWRITE>"
541 msgstr "B<FAN_CLOSE_NOWRITE>"
542
543 #. type: Plain text
544 #: build/C/man7/fanotify.7:267
545 msgid ""
546 "A file or directory that was opened read-only (B<O_RDONLY>)  was closed."
547 msgstr "読み出し用 (B<O_RDONLY>) にオープンされたファイルがクローズされた。"
548
549 #. type: TP
550 #: build/C/man7/fanotify.7:267
551 #, no-wrap
552 msgid "B<FAN_Q_OVERFLOW>"
553 msgstr "B<FAN_Q_OVERFLOW>"
554
555 #. type: Plain text
556 #: build/C/man7/fanotify.7:274
557 msgid ""
558 "The event queue exceeded the limit of 16384 entries.  This limit can be "
559 "overridden by specifying the B<FAN_UNLIMITED_QUEUE> flag when calling "
560 "B<fanotify_init>(2)."
561 msgstr ""
562 "イベントキューが 16384 エントリーの上限を超過した。 この上限は "
563 "B<fanotify_init>(2) 呼び出し時に B<FAN_UNLIMITED_QUEUE> フラグを指定すること"
564 "で上書きできる。"
565
566 #. type: TP
567 #: build/C/man7/fanotify.7:274 build/C/man2/fanotify_mark.2:159
568 #, no-wrap
569 msgid "B<FAN_ACCESS_PERM>"
570 msgstr "B<FAN_ACCESS_PERM>"
571
572 #. type: Plain text
573 #: build/C/man7/fanotify.7:283
574 msgid ""
575 "An application wants to read a file or directory, for example using "
576 "B<read>(2)  or B<readdir>(2).  The reader must write a response (as "
577 "described below)  that determines whether the permission to access the "
578 "filesystem object shall be granted."
579 msgstr ""
580 "アプリケーションが例えば B<read>(2) や B<readdir>(2) などを使ってファイルや"
581 "ディレクトリを読み出そうとした。 このイベントを読み出したプログラムは、 その"
582 "ファイルシステムオブジェクトへのアクセス許可を承認するかを判定し (下記で説明"
583 "するとおり) 応答を書き込まなければならない。"
584
585 #. type: TP
586 #: build/C/man7/fanotify.7:283 build/C/man2/fanotify_mark.2:151
587 #, no-wrap
588 msgid "B<FAN_OPEN_PERM>"
589 msgstr "B<FAN_OPEN_PERM>"
590
591 #. type: Plain text
592 #: build/C/man7/fanotify.7:288
593 msgid ""
594 "An application wants to open a file or directory.  The reader must write a "
595 "response that determines whether the permission to open the filesystem "
596 "object shall be granted."
597 msgstr ""
598 "アプリケーションがファイルやディレクトリをオープンしようとした。 このイベント"
599 "を読み出したプログラムは、 そのファイルシステムオブジェクトのオープンを承認す"
600 "るかを判定し (下記で説明するとおり) 応答を書き込まなければならない。"
601
602 #. type: Plain text
603 #: build/C/man7/fanotify.7:290
604 msgid "To check for any close event, the following bit mask may be used:"
605 msgstr "クローズイベントを確認するために以下のビットマスクを使うことができる。"
606
607 #. type: TP
608 #: build/C/man7/fanotify.7:290 build/C/man2/fanotify_mark.2:186
609 #, no-wrap
610 msgid "B<FAN_CLOSE>"
611 msgstr "B<FAN_CLOSE>"
612
613 #. type: Plain text
614 #: build/C/man7/fanotify.7:294
615 msgid "A file was closed.  This is a synonym for:"
616 msgstr "ファイルがクローズされた。 以下の同義語である。"
617
618 #. type: Plain text
619 #: build/C/man7/fanotify.7:296
620 #, no-wrap
621 msgid "    FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE\n"
622 msgstr "    FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE\n"
623
624 #. type: Plain text
625 #: build/C/man7/fanotify.7:301
626 msgid ""
627 "The following macros are provided to iterate over a buffer containing "
628 "fanotify event metadata returned by a B<read>(2)  from an fanotify file "
629 "descriptor:"
630 msgstr ""
631 "fanotify ファイルディスクリプターからの B<read>(2) が返した fanotify イベント"
632 "メタデータを含むバッファーに対して繰り返しを行うため、 以下のマクロが提供され"
633 "ている。"
634
635 #. type: TP
636 #: build/C/man7/fanotify.7:301
637 #, no-wrap
638 msgid "B<FAN_EVENT_OK(meta, len)>"
639 msgstr "B<FAN_EVENT_OK(meta, len)>"
640
641 #. type: Plain text
642 #: build/C/man7/fanotify.7:310
643 msgid ""
644 "This macro checks the remaining length I<len> of the buffer I<meta> against "
645 "the length of the metadata structure and the I<event_len> field of the first "
646 "metadata structure in the buffer."
647 msgstr ""
648 "このマクロは、 バッファー I<meta> の残りの長さ I<len> を、 メタデータ構造体の"
649 "長さとバッファーの最初のメタデータ構造体の I<event_len> フィールドと比較して"
650 "検査する。"
651
652 #. type: TP
653 #: build/C/man7/fanotify.7:310
654 #, no-wrap
655 msgid "B<FAN_EVENT_NEXT(meta, len)>"
656 msgstr "B<FAN_EVENT_NEXT(meta, len)>"
657
658 #. type: Plain text
659 #: build/C/man7/fanotify.7:329
660 msgid ""
661 "This macro uses the length indicated in the I<event_len> field of the "
662 "metadata structure pointed to by I<meta> to calculate the address of the "
663 "next metadata structure that follows I<meta>.  I<len> is the number of bytes "
664 "of metadata that currently remain in the buffer.  The macro returns a "
665 "pointer to the next metadata structure that follows I<meta>, and reduces "
666 "I<len> by the number of bytes in the the metadata structure that has been "
667 "skipped over (i.e., it subtracts I<meta-E<gt>event_len> from I<len>)."
668 msgstr ""
669 "このマクロは、 I<meta> が指すメタデータ構造体の I<event_len> フィールドで示さ"
670 "れた長さを使って、 I<meta> の次のメタデータ構造体のアドレスを計算する。 "
671 "I<len> はバッファーに現在残っているメタデータのバイト数である。 このマクロは "
672 "I<meta> の次のメタデータ構造体へのポインターを返し、 スキップされたメタデータ"
673 "構造体のバイト数だけ I<len> を減算する (つまり、 I<len> から I<meta-"
674 "E<gt>event_len> を引き算する)。"
675
676 #. type: Plain text
677 #: build/C/man7/fanotify.7:331
678 msgid "In addition, there is:"
679 msgstr "また、 以下のマクロも用意されている。"
680
681 #. type: TP
682 #: build/C/man7/fanotify.7:331
683 #, no-wrap
684 msgid "B<FAN_EVENT_METADATA_LEN>"
685 msgstr "B<FAN_EVENT_METADATA_LEN>"
686
687 #. type: Plain text
688 #: build/C/man7/fanotify.7:337
689 msgid ""
690 "This macro returns the size (in bytes) of the structure "
691 "I<fanotify_event_metadata>.  This is the minimum size (and currently the "
692 "only size) of any event metadata."
693 msgstr ""
694 "このマクロは I<fanotify_event_metadata> 構造体の (バイト単位の) サイズを返"
695 "す。 返される値はイベントメタデータの最小値である (現在のところ、これが唯一の"
696 "サイズである)。"
697
698 #. type: SS
699 #: build/C/man7/fanotify.7:337
700 #, no-wrap
701 msgid "Monitoring an fanotify file descriptor for events"
702 msgstr "fanotify ファイルディスクリプターのイベントを監視する"
703
704 #. type: Plain text
705 #: build/C/man7/fanotify.7:344
706 msgid ""
707 "When an fanotify event occurs, the fanotify file descriptor indicates as "
708 "readable when passed to B<epoll>(7), B<poll>(2), or B<select>(2)."
709 msgstr ""
710 "fanotify イベントが発生すると、 B<epoll>(7), B<poll>(2), B<select>(2) に "
711 "fanotify ファイルディスクリプターが渡された場合には、そのファイルディスクリプ"
712 "ターが読み出し可能であると通知される。"
713
714 #. type: SS
715 #: build/C/man7/fanotify.7:344
716 #, no-wrap
717 msgid "Dealing with permission events"
718 msgstr "アクセス許可イベントの取り扱い"
719
720 #. type: Plain text
721 #: build/C/man7/fanotify.7:349
722 msgid ""
723 "For permission events, the application must B<write>(2)  a structure of the "
724 "following form to the fanotify file descriptor:"
725 msgstr ""
726 "アクセス許可イベントでは、 アプリケーションは以下の形式の構造体を fanotify "
727 "ファイルディスクリプターに B<write>(2) しなければならない。"
728
729 #. type: Plain text
730 #: build/C/man7/fanotify.7:356
731 #, no-wrap
732 msgid ""
733 "struct fanotify_response {\n"
734 "    __s32 fd;\n"
735 "    __u32 response;\n"
736 "};\n"
737 msgstr ""
738 "struct fanotify_response {\n"
739 "    __s32 fd;\n"
740 "    __u32 response;\n"
741 "};\n"
742
743 #. type: Plain text
744 #: build/C/man7/fanotify.7:360
745 msgid "The fields of this structure are as follows:"
746 msgstr "この構造体のフィールドは以下のとおりである。"
747
748 #. type: Plain text
749 #: build/C/man7/fanotify.7:364
750 msgid ""
751 "This is the file descriptor from the structure I<fanotify_event_metadata>."
752 msgstr ""
753 "このフィールドは I<fanotify_event_metadata> 構造体で返されたファイルディスク"
754 "リプターである。"
755
756 #. type: TP
757 #: build/C/man7/fanotify.7:364
758 #, no-wrap
759 msgid "I<response>"
760 msgstr "I<response>"
761
762 #. type: Plain text
763 #: build/C/man7/fanotify.7:372
764 msgid ""
765 "This field indicates whether or not the permission is to be granted.  Its "
766 "value must be either B<FAN_ALLOW> to allow the file operation or B<FAN_DENY> "
767 "to deny the file operation."
768 msgstr ""
769 "このフィールドはアクセス許可を承認するかどうかを示す。 値は、このファイル操作"
770 "を許可する B<FAN_ALLOW> か、 このファイル操作を拒否する B<FAN_DENY> のいずれ"
771 "かでなければならない。"
772
773 #. type: Plain text
774 #: build/C/man7/fanotify.7:376
775 msgid ""
776 "If access is denied, the requesting application call will receive an "
777 "B<EPERM> error."
778 msgstr ""
779 "アクセスを拒否した場合、 アクセスを要求したアプリケーションは B<EPERM> エラー"
780 "を受け取ることになる。"
781
782 #. type: SS
783 #: build/C/man7/fanotify.7:376
784 #, no-wrap
785 msgid "Closing the fanotify file descriptor"
786 msgstr "fanotify ファイルディスクリプターのクローズ"
787
788 #. type: Plain text
789 #: build/C/man7/fanotify.7:384
790 msgid ""
791 "When all file descriptors referring to the fanotify notification group are "
792 "closed, the fanotify group is released and its resources are freed for reuse "
793 "by the kernel.  Upon B<close>(2), outstanding permission events will be set "
794 "to allowed."
795 msgstr ""
796 "fanotify 通知グループを参照するすべてのファイルディスクリプターがクローズされ"
797 "ると、 fanotify グループは解放され、 カーネルが再利用できるようにそのリソース"
798 "は解放される。 B<close>(2) の際に、 処理中であったアクセス許可イベントには許"
799 "可が設定される。"
800
801 #. type: SS
802 #: build/C/man7/fanotify.7:384
803 #, no-wrap
804 msgid "/proc/[pid]/fdinfo"
805 msgstr "/proc/[pid]/fdinfo"
806
807 #. type: Plain text
808 #: build/C/man7/fanotify.7:394
809 msgid ""
810 "The file I</proc/[pid]/fdinfo/[fd]> contains information about fanotify "
811 "marks for file descriptor I<fd> of process I<pid>.  See the kernel source "
812 "file I<Documentation/filesystems/proc.txt> for details."
813 msgstr ""
814 "ファイル I</proc/[pid]/fdinfo/[fd]> には、 プロセス I<pid> のファイルディスク"
815 "リプター I<fd> の fanotify マークに関する情報が格納される。 詳細はカーネルの"
816 "ソースファイル I<Documentation/filesystems/proc.txt> を参照。"
817
818 #. type: SH
819 #: build/C/man7/fanotify.7:394 build/C/man2/fanotify_init.2:206
820 #: build/C/man2/fanotify_mark.2:243 build/C/man2/inotify_add_watch.2:84
821 #: build/C/man2/inotify_init.2:79 build/C/man2/inotify_rm_watch.2:55
822 #, no-wrap
823 msgid "ERRORS"
824 msgstr "エラー"
825
826 #. type: Plain text
827 #: build/C/man7/fanotify.7:399
828 msgid ""
829 "In addition to the usual errors for B<read>(2), the following errors can "
830 "occur when reading from the fanotify file descriptor:"
831 msgstr ""
832 "通常の B<read>(2) のエラーに加え、 fanotify ファイルディスクリプターから読み"
833 "出しを行った際に以下のエラーが発生することがある。"
834
835 #. type: TP
836 #: build/C/man7/fanotify.7:399 build/C/man7/fanotify.7:433
837 #: build/C/man2/fanotify_init.2:207 build/C/man2/fanotify_mark.2:248
838 #: build/C/man2/fanotify_mark.2:257 build/C/man2/inotify_add_watch.2:95
839 #: build/C/man2/inotify_init.2:80 build/C/man2/inotify_rm_watch.2:60
840 #, no-wrap
841 msgid "B<EINVAL>"
842 msgstr "B<EINVAL>"
843
844 #. type: Plain text
845 #: build/C/man7/fanotify.7:402
846 msgid "The buffer is too small to hold the event."
847 msgstr "バッファーがイベントを保持するには小さすぎる。"
848
849 #. type: TP
850 #: build/C/man7/fanotify.7:402 build/C/man2/fanotify_init.2:216
851 #: build/C/man2/inotify_init.2:85
852 #, no-wrap
853 msgid "B<EMFILE>"
854 msgstr "B<EMFILE>"
855
856 #. type: Plain text
857 #: build/C/man7/fanotify.7:409
858 msgid ""
859 "The per-process limit on the number of open files has been reached.  See the "
860 "description of B<RLIMIT_NOFILE> in B<getrlimit>(2)."
861 msgstr ""
862 "オープンしたファイル数のプロセス毎の上限に達した。 B<getrlimit>(2) の "
863 "B<RLIMIT_NOFILE> の説明を参照。"
864
865 #. type: TP
866 #: build/C/man7/fanotify.7:409 build/C/man2/inotify_init.2:88
867 #, no-wrap
868 msgid "B<ENFILE>"
869 msgstr "B<ENFILE>"
870
871 #. type: Plain text
872 #: build/C/man7/fanotify.7:416
873 msgid ""
874 "The system-wide limit on the number of open files has been reached.  See I</"
875 "proc/sys/fs/file-max> in B<proc>(5)."
876 msgstr ""
877 "オープンされたファイル数のシステム全体の上限に達した。 B<proc>(5) の I</proc/"
878 "sys/fs/file-max> を参照。"
879
880 #. type: TP
881 #: build/C/man7/fanotify.7:416
882 #, no-wrap
883 msgid "B<ETXTBSY>"
884 msgstr "B<ETXTBSY>"
885
886 #. type: Plain text
887 #: build/C/man7/fanotify.7:429
888 msgid ""
889 "This error is returned by B<read>(2)  if B<O_RDWR> or B<O_WRONLY> was "
890 "specified in the I<event_f_flags> argument when calling B<fanotify_init>(2)  "
891 "and an event occurred for a monitored file that is currently being executed."
892 msgstr ""
893 "B<fanotify_init>(2) の呼び出し時に B<O_RDWR> か B<O_WRONLY> が "
894 "I<event_f_flags> 引き数に指定されており、 現在実行中の監視対象のファイルに対"
895 "してイベントが発生した際に、 このエラーが B<read>(2) から返される。"
896
897 #. type: Plain text
898 #: build/C/man7/fanotify.7:433
899 msgid ""
900 "In addition to the usual errors for B<write>(2), the following errors can "
901 "occur when writing to the fanotify file descriptor:"
902 msgstr ""
903 "通常の B<write>(2) のエラーに加え、 fanotify ファイルディスクリプターに書き込"
904 "みを行った際に以下のエラーが発生することがある。"
905
906 #. type: Plain text
907 #: build/C/man7/fanotify.7:439
908 msgid ""
909 "Fanotify access permissions are not enabled in the kernel configuration or "
910 "the value of I<response> in the response structure is not valid."
911 msgstr ""
912 "fanotify アクセス許可がカーネルの設定で有効になっていない。 応答構造体の "
913 "I<response> 値が無効である。"
914
915 #. type: TP
916 #: build/C/man7/fanotify.7:439 build/C/man2/fanotify_mark.2:265
917 #: build/C/man2/inotify_add_watch.2:104
918 #, no-wrap
919 msgid "B<ENOENT>"
920 msgstr "B<ENOENT>"
921
922 #. type: Plain text
923 #: build/C/man7/fanotify.7:446
924 msgid ""
925 "The file descriptor I<fd> in the response structure is not valid.  This may "
926 "occur when a response for the permission event has already been written."
927 msgstr ""
928 "応答構造体のファイルディスクリプター I<fd> が無効である。 このエラーはアクセ"
929 "ス許可イベントに対する応答がすでに書き込まれている際に発生する。"
930
931 #. type: SH
932 #: build/C/man7/fanotify.7:446 build/C/man2/fanotify_init.2:233
933 #: build/C/man2/fanotify_mark.2:299 build/C/man7/inotify.7:553
934 #: build/C/man2/inotify_add_watch.2:116 build/C/man2/inotify_init.2:94
935 #: build/C/man2/inotify_rm_watch.2:67
936 #, no-wrap
937 msgid "VERSIONS"
938 msgstr "バージョン"
939
940 #. type: Plain text
941 #: build/C/man7/fanotify.7:450
942 msgid ""
943 "The fanotify API was introduced in version 2.6.36 of the Linux kernel and "
944 "enabled in version 2.6.37.  Fdinfo support was added in version 3.8."
945 msgstr ""
946 "fanotify API は Linux カーネルのバージョン 2.6.36 で導入され、 バージョン "
947 "2.6.37 で有効にされた。 fdinfo のサポートはバージョン 3.8 で追加された。"
948
949 #. type: SH
950 #: build/C/man7/fanotify.7:450 build/C/man2/fanotify_init.2:237
951 #: build/C/man2/fanotify_mark.2:303 build/C/man7/inotify.7:561
952 #: build/C/man2/inotify_add_watch.2:118 build/C/man2/inotify_init.2:101
953 #: build/C/man2/inotify_rm_watch.2:69
954 #, no-wrap
955 msgid "CONFORMING TO"
956 msgstr "準拠"
957
958 #. type: Plain text
959 #: build/C/man7/fanotify.7:452
960 msgid "The fanotify API is Linux-specific."
961 msgstr "fanotify API は Linux 独自のものである。"
962
963 #. type: SH
964 #: build/C/man7/fanotify.7:452 build/C/man7/inotify.7:563
965 #, no-wrap
966 msgid "NOTES"
967 msgstr "注意"
968
969 #. type: Plain text
970 #: build/C/man7/fanotify.7:459
971 msgid ""
972 "The fanotify API is available only if the kernel was built with the "
973 "B<CONFIG_FANOTIFY> configuration option enabled.  In addition, fanotify "
974 "permission handling is available only if the "
975 "B<CONFIG_FANOTIFY_ACCESS_PERMISSIONS> configuration option is enabled."
976 msgstr ""
977 "fanotify API が利用できるのは、 カーネルが B<CONFIG_FANOTIFY> 設定オプション"
978 "を有効にして作成されている場合だけである。 また、 fanotify アクセス許可の処理"
979 "が利用できるのは B<CONFIG_FANOTIFY_ACCESS_PERMISSIONS> 設定オプションが有効に"
980 "なっている場合だけである。"
981
982 #. type: SS
983 #: build/C/man7/fanotify.7:459 build/C/man7/inotify.7:624
984 #, no-wrap
985 msgid "Limitations and caveats"
986 msgstr "制限と警告"
987
988 #. type: Plain text
989 #: build/C/man7/fanotify.7:464
990 msgid ""
991 "Fanotify reports only events that a user-space program triggers through the "
992 "filesystem API.  As a result, it does not catch remote events that occur on "
993 "network filesystems."
994 msgstr ""
995 "fanotify が報告するのはユーザー空間プログラムがファイルシステム API 経由で"
996 "行ったイベントだけである。 その結果、 fanotify ではネットワークファイルシステ"
997 "ム上で発生したリモートイベントは捕捉できない。"
998
999 #. type: Plain text
1000 #: build/C/man7/fanotify.7:471
1001 msgid ""
1002 "The fanotify API does not report file accesses and modifications that may "
1003 "occur because of B<mmap>(2), B<msync>(2), and B<munmap>(2)."
1004 msgstr ""
1005 "inotify API は B<mmap>(2), B<msync>(2), B<munmap>(2) により起こったファイルの"
1006 "アクセスと変更を報告しない。"
1007
1008 #. type: Plain text
1009 #: build/C/man7/fanotify.7:476
1010 msgid ""
1011 "Events for directories are created only if the directory itself is opened, "
1012 "read, and closed.  Adding, removing, or changing children of a marked "
1013 "directory does not create events for the monitored directory itself."
1014 msgstr ""
1015 "ディレクトリのイベントは、ディレクトリ自身がオープン、読み出し、クローズされ"
1016 "た場合にしか作成されない。 マークされたディレクトリでの子要素の追加、削除、変"
1017 "更では、監視対象のディレクトリ自身へのイベントは作成されない。"
1018
1019 #. type: Plain text
1020 #: build/C/man7/fanotify.7:484
1021 msgid ""
1022 "Fanotify monitoring of directories is not recursive: to monitor "
1023 "subdirectories under a directory, additional marks must be created.  (But "
1024 "note that the fanotify API provides no way of detecting when a subdirectory "
1025 "has been created under a marked directory, which makes recursive monitoring "
1026 "difficult.)  Monitoring mounts offers the capability to monitor a whole "
1027 "directory tree."
1028 msgstr ""
1029 "fanotify のディレクトリの監視は再帰的ではない。 ディレクトリ内のサブディレク"
1030 "トリを監視するには、 追加で監視用のマークを作成しなければならない。 (ただ"
1031 "し、 fanotify API では、サブディレクトリが監視対象としてマークされているディ"
1032 "レクトリに作成された際に検出する手段は提供されていない点に注意すること。) マ"
1033 "ウントの監視を使うことで、 ディレクトリツリー全体を監視することができる。"
1034
1035 #. type: Plain text
1036 #: build/C/man7/fanotify.7:487
1037 msgid "The event queue can overflow.  In this case, events are lost."
1038 msgstr ""
1039 "ベントキューはオーバーフローすることがある。 この場合、 イベントは失われる。"
1040
1041 #. type: SH
1042 #: build/C/man7/fanotify.7:487 build/C/man2/fanotify_init.2:239
1043 #: build/C/man2/fanotify_mark.2:305 build/C/man7/inotify.7:754
1044 #, no-wrap
1045 msgid "BUGS"
1046 msgstr "バグ"
1047
1048 #. type: Plain text
1049 #: build/C/man7/fanotify.7:490
1050 msgid "As of Linux 3.17, the following bugs exist:"
1051 msgstr "Linux 3.17 時点では、 以下のバグが存在する。"
1052
1053 #. type: IP
1054 #: build/C/man7/fanotify.7:490 build/C/man7/fanotify.7:499
1055 #: build/C/man7/fanotify.7:503 build/C/man7/fanotify.7:512
1056 #: build/C/man2/fanotify_init.2:242 build/C/man2/fanotify_init.2:250
1057 #: build/C/man2/fanotify_mark.2:195 build/C/man2/fanotify_mark.2:201
1058 #: build/C/man2/fanotify_mark.2:209 build/C/man2/fanotify_mark.2:215
1059 #: build/C/man2/fanotify_mark.2:226 build/C/man2/fanotify_mark.2:307
1060 #: build/C/man2/fanotify_mark.2:317 build/C/man2/fanotify_mark.2:323
1061 #: build/C/man7/inotify.7:40 build/C/man7/inotify.7:51
1062 #: build/C/man7/inotify.7:64 build/C/man7/inotify.7:70
1063 #: build/C/man7/inotify.7:73 build/C/man7/inotify.7:270
1064 #: build/C/man7/inotify.7:273
1065 #, no-wrap
1066 msgid "*"
1067 msgstr "*"
1068
1069 #. type: Plain text
1070 #: build/C/man7/fanotify.7:499
1071 msgid ""
1072 "On Linux, a filesystem object may be accessible through multiple paths, for "
1073 "example, a part of a filesystem may be remounted using the I<--bind> option "
1074 "of B<mount>(8).  A listener that marked a mount will be notified only of "
1075 "events that were triggered for a filesystem object using the same mount.  "
1076 "Any other event will pass unnoticed."
1077 msgstr ""
1078 "Linux では、ファイルシステムオブジェクトは複数のパスでアクセス可能である。 例"
1079 "えば、 ファイルシステムの一部は B<mount>(8) の I<--bind> オプションを使って再"
1080 "マウントされることがある。 マークされたマウントの監視者は、 同じマウントを"
1081 "使ったファイルオブジェクトについてのみイベント通知を受ける。 それ以外のイベン"
1082 "トは通知されない。"
1083
1084 #. type: Plain text
1085 #: build/C/man7/fanotify.7:503
1086 msgid "Calling B<fallocate>(2)  does not create any fanotify events."
1087 msgstr "B<fallocate>(2) の呼び出しでは fanotify イベントが作成されない。"
1088
1089 #.  FIXME . A patch was proposed.
1090 #. type: Plain text
1091 #: build/C/man7/fanotify.7:512
1092 msgid ""
1093 "When an event is generated, no check is made to see whether the user ID of "
1094 "the receiving process has authorization to read or write the file before "
1095 "passing a file descriptor for that file.  This poses a security risk, when "
1096 "the B<CAP_SYS_ADMIN> capability is set for programs executed by unprivileged "
1097 "users."
1098 msgstr ""
1099 "イベントが生成された際に、 そのファイルのファイルディスクリプターを渡す前"
1100 "に、 イベントを受信するプロセスのユーザー ID がそのファイルに対する読み出し/"
1101 "書き込み許可があるかの確認は行われない。 非特権ユーザーによって実行されたプロ"
1102 "グラムに B<CAP_SYS_ADMIN> ケーパビリティーがセットされている場合には、 このこ"
1103 "とはセキュリティーリスクとなる。"
1104
1105 #. type: Plain text
1106 #: build/C/man7/fanotify.7:522
1107 msgid ""
1108 "If a call to B<read>(2)  processes multiple events from the fanotify queue "
1109 "and an error occurs, the return value will be the total length of the events "
1110 "successfully copied to the user-space buffer before the error occurred.  The "
1111 "return value will not be -1, and I<errno> will not be set.  Thus, the "
1112 "reading application has no way to detect the error."
1113 msgstr ""
1114 "B<read>(2) の呼び出しが fanotify キューから複数のイベントを処理している際"
1115 "に、 エラーが発生した場合、 返り値はエラーが発生する前までにユーザー空間バッ"
1116 "ファーに正常にコピーされたイベントの合計長となる。 返り値は -1 にならず、 "
1117 "I<errno> もセットされない。 したがって、 読み出しを行うアプリケーションではエ"
1118 "ラーを検出する方法はない。"
1119
1120 #. type: SH
1121 #: build/C/man7/fanotify.7:522 build/C/man7/inotify.7:815
1122 #, no-wrap
1123 msgid "EXAMPLE"
1124 msgstr "例"
1125
1126 #. type: Plain text
1127 #: build/C/man7/fanotify.7:532
1128 msgid ""
1129 "The following program demonstrates the usage of the fanotify API.  It marks "
1130 "the mount point passed as a command-line argument and waits for events of "
1131 "type B<FAN_PERM_OPEN> and B<FAN_CLOSE_WRITE>.  When a permission event "
1132 "occurs, a B<FAN_ALLOW> response is given."
1133 msgstr ""
1134 "以下のプログラムは fanotify API の使用法を示すものである。 コマンドライン引き"
1135 "数で渡されたマウントポイントを監視し、 種別が B<FAN_PERM_OPEN> と "
1136 "B<FAN_CLOSE_WRITE> のイベントを待つ。 アクセス許可イベントが発生には、 "
1137 "B<FAN_ALLOW> 応答を返す。"
1138
1139 #. type: Plain text
1140 #: build/C/man7/fanotify.7:542
1141 msgid ""
1142 "The following output was recorded while editing the file I</home/user/temp/"
1143 "notes>.  Before the file was opened, a B<FAN_OPEN_PERM> event occurred.  "
1144 "After the file was closed, a B<FAN_CLOSE_WRITE> event occurred.  Execution "
1145 "of the program ends when the user presses the ENTER key."
1146 msgstr ""
1147 "以下の出力例はファイル I</home/user/temp/notes> を編集した際に記録されたもの"
1148 "である。 ファイルをオープンする前に B<FAN_OPEN_PERM> イベントが発生してい"
1149 "る。 ファイルをクローズした後に B<FAN_CLOSE_WRITE> イベントが発生している。 "
1150 "エンターキーをユーザーが押すと、 このプログラムの実行は終了する。"
1151
1152 #. type: SS
1153 #: build/C/man7/fanotify.7:542 build/C/man7/inotify.7:838
1154 #, no-wrap
1155 msgid "Example output"
1156 msgstr "出力例"
1157
1158 #. type: Plain text
1159 #: build/C/man7/fanotify.7:550
1160 #, no-wrap
1161 msgid ""
1162 "# ./fanotify_example /home\n"
1163 "Press enter key to terminate.\n"
1164 "Listening for events.\n"
1165 "FAN_OPEN_PERM: File /home/user/temp/notes\n"
1166 "FAN_CLOSE_WRITE: File /home/user/temp/notes\n"
1167 msgstr ""
1168 "# ./fanotify_example /home\n"
1169 "Press enter key to terminate.\n"
1170 "Listening for events.\n"
1171 "FAN_OPEN_PERM: File /home/user/temp/notes\n"
1172 "FAN_CLOSE_WRITE: File /home/user/temp/notes\n"
1173
1174 #. type: Plain text
1175 #: build/C/man7/fanotify.7:552 build/C/man7/inotify.7:850
1176 #, no-wrap
1177 msgid "Listening for events stopped.\n"
1178 msgstr "Listening for events stopped.\n"
1179
1180 #. type: SS
1181 #: build/C/man7/fanotify.7:554 build/C/man7/inotify.7:852
1182 #, no-wrap
1183 msgid "Program source"
1184 msgstr "プログラムソース"
1185
1186 #. type: Plain text
1187 #: build/C/man7/fanotify.7:565
1188 #, no-wrap
1189 msgid ""
1190 "#define _GNU_SOURCE     /* Needed to get O_LARGEFILE definition */\n"
1191 "#include E<lt>errno.hE<gt>\n"
1192 "#include E<lt>fcntl.hE<gt>\n"
1193 "#include E<lt>limits.hE<gt>\n"
1194 "#include E<lt>poll.hE<gt>\n"
1195 "#include E<lt>stdio.hE<gt>\n"
1196 "#include E<lt>stdlib.hE<gt>\n"
1197 "#include E<lt>sys/fanotify.hE<gt>\n"
1198 "#include E<lt>unistd.hE<gt>\n"
1199 msgstr ""
1200 "#define _GNU_SOURCE     /* O_LARGEFILE の定義を得るために必要 */\n"
1201 "#include E<lt>errno.hE<gt>\n"
1202 "#include E<lt>fcntl.hE<gt>\n"
1203 "#include E<lt>limits.hE<gt>\n"
1204 "#include E<lt>poll.hE<gt>\n"
1205 "#include E<lt>stdio.hE<gt>\n"
1206 "#include E<lt>stdlib.hE<gt>\n"
1207 "#include E<lt>sys/fanotify.hE<gt>\n"
1208 "#include E<lt>unistd.hE<gt>\n"
1209
1210 #. type: Plain text
1211 #: build/C/man7/fanotify.7:567
1212 #, no-wrap
1213 msgid "/* Read all available fanotify events from the file descriptor 'fd' */\n"
1214 msgstr "/* ファイルディスクリプター 'fd' から読み出しできる全 fanotify イベントを読み出す */\n"
1215
1216 #. type: Plain text
1217 #: build/C/man7/fanotify.7:578
1218 #, no-wrap
1219 msgid ""
1220 "static void\n"
1221 "handle_events(int fd)\n"
1222 "{\n"
1223 "    const struct fanotify_event_metadata *metadata;\n"
1224 "    struct fanotify_event_metadata buf[200];\n"
1225 "    ssize_t len;\n"
1226 "    char path[PATH_MAX];\n"
1227 "    ssize_t path_len;\n"
1228 "    char procfd_path[PATH_MAX];\n"
1229 "    struct fanotify_response response;\n"
1230 msgstr ""
1231 "static void\n"
1232 "handle_events(int fd)\n"
1233 "{\n"
1234 "    const struct fanotify_event_metadata *metadata;\n"
1235 "    struct fanotify_event_metadata buf[200];\n"
1236 "    ssize_t len;\n"
1237 "    char path[PATH_MAX];\n"
1238 "    ssize_t path_len;\n"
1239 "    char procfd_path[PATH_MAX];\n"
1240 "    struct fanotify_response response;\n"
1241
1242 #. type: Plain text
1243 #: build/C/man7/fanotify.7:580
1244 #, no-wrap
1245 msgid "    /* Loop while events can be read from fanotify file descriptor */\n"
1246 msgstr "    /* fanotify ファイルディスクリプターからイベントが読み出せる間はループする */\n"
1247
1248 #. type: Plain text
1249 #: build/C/man7/fanotify.7:582
1250 #, no-wrap
1251 msgid "    for(;;) {\n"
1252 msgstr "    for(;;) {\n"
1253
1254 #. type: Plain text
1255 #: build/C/man7/fanotify.7:584
1256 #, no-wrap
1257 msgid "        /* Read some events */\n"
1258 msgstr "        /* イベントを読み出す */\n"
1259
1260 #. type: Plain text
1261 #: build/C/man7/fanotify.7:590
1262 #, no-wrap
1263 msgid ""
1264 "        len = read(fd, (void *) &buf, sizeof(buf));\n"
1265 "        if (len == -1 && errno != EAGAIN) {\n"
1266 "            perror(\"read\");\n"
1267 "            exit(EXIT_FAILURE);\n"
1268 "        }\n"
1269 msgstr ""
1270 "        len = read(fd, (void *) &buf, sizeof(buf));\n"
1271 "        if (len == -1 && errno != EAGAIN) {\n"
1272 "            perror(\"read\");\n"
1273 "            exit(EXIT_FAILURE);\n"
1274 "        }\n"
1275
1276 #. type: Plain text
1277 #: build/C/man7/fanotify.7:592
1278 #, no-wrap
1279 msgid "        /* Check if end of available data reached */\n"
1280 msgstr "        /* 読み出せるデータの最後に達しているかチェックする */\n"
1281
1282 #. type: Plain text
1283 #: build/C/man7/fanotify.7:595 build/C/man7/inotify.7:901
1284 #, no-wrap
1285 msgid ""
1286 "        if (len E<lt>= 0)\n"
1287 "            break;\n"
1288 msgstr ""
1289 "        if (len E<lt>= 0)\n"
1290 "            break;\n"
1291
1292 #. type: Plain text
1293 #: build/C/man7/fanotify.7:597
1294 #, no-wrap
1295 msgid "        /* Point to the first event in the buffer */\n"
1296 msgstr "        /* バッファーの最初のイベントを参照する */\n"
1297
1298 #. type: Plain text
1299 #: build/C/man7/fanotify.7:599
1300 #, no-wrap
1301 msgid "        metadata = buf;\n"
1302 msgstr "        metadata = buf;\n"
1303
1304 #. type: Plain text
1305 #: build/C/man7/fanotify.7:601 build/C/man7/inotify.7:903
1306 #, no-wrap
1307 msgid "        /* Loop over all events in the buffer */\n"
1308 msgstr "        /* バッファー内の全イベントを処理する */\n"
1309
1310 #. type: Plain text
1311 #: build/C/man7/fanotify.7:603
1312 #, no-wrap
1313 msgid "        while (FAN_EVENT_OK(metadata, len)) {\n"
1314 msgstr "        while (FAN_EVENT_OK(metadata, len)) {\n"
1315
1316 #. type: Plain text
1317 #: build/C/man7/fanotify.7:605
1318 #, no-wrap
1319 msgid "            /* Check that run-time and compile-time structures match */\n"
1320 msgstr "            /* 実行時とコンパイル時の構造体が一致するか確認する */\n"
1321
1322 #. type: Plain text
1323 #: build/C/man7/fanotify.7:611
1324 #, no-wrap
1325 msgid ""
1326 "            if (metadata-E<gt>vers != FANOTIFY_METADATA_VERSION) {\n"
1327 "                fprintf(stderr,\n"
1328 "                        \"Mismatch of fanotify metadata version.\\en\");\n"
1329 "                exit(EXIT_FAILURE);\n"
1330 "            }\n"
1331 msgstr ""
1332 "            if (metadata-E<gt>vers != FANOTIFY_METADATA_VERSION) {\n"
1333 "                fprintf(stderr,\n"
1334 "                        \"Mismatch of fanotify metadata version.\\en\");\n"
1335 "                exit(EXIT_FAILURE);\n"
1336 "            }\n"
1337
1338 #. type: Plain text
1339 #: build/C/man7/fanotify.7:615
1340 #, no-wrap
1341 msgid ""
1342 "            /* metadata-E<gt>fd contains either FAN_NOFD, indicating a\n"
1343 "               queue overflow, or a file descriptor (a nonnegative\n"
1344 "               integer). Here, we simply ignore queue overflow. */\n"
1345 msgstr ""
1346 "            /* metadata-E<gt>fd には、キューのオーバーフローを示す FAN_NOFD か、\n"
1347 "               ファイルディスクリプター (負でない整数) のいずれかが入っている。\n"
1348 "               ここではキューのオーバーフローは無視している。 */\n"
1349
1350 #. type: Plain text
1351 #: build/C/man7/fanotify.7:617
1352 #, no-wrap
1353 msgid "            if (metadata-E<gt>fd E<gt>= 0) {\n"
1354 msgstr "            if (metadata-E<gt>fd E<gt>= 0) {\n"
1355
1356 #. type: Plain text
1357 #: build/C/man7/fanotify.7:619
1358 #, no-wrap
1359 msgid "                /* Handle open permission event */\n"
1360 msgstr "                /* オープン許可イベントを処理する */\n"
1361
1362 #. type: Plain text
1363 #: build/C/man7/fanotify.7:622
1364 #, no-wrap
1365 msgid ""
1366 "                if (metadata-E<gt>mask & FAN_OPEN_PERM) {\n"
1367 "                    printf(\"FAN_OPEN_PERM: \");\n"
1368 msgstr ""
1369 "                if (metadata-E<gt>mask & FAN_OPEN_PERM) {\n"
1370 "                    printf(\"FAN_OPEN_PERM: \");\n"
1371
1372 #. type: Plain text
1373 #: build/C/man7/fanotify.7:624
1374 #, no-wrap
1375 msgid "                    /* Allow file to be opened */\n"
1376 msgstr "                    /* ファイルのオープンを許可する */\n"
1377
1378 #. type: Plain text
1379 #: build/C/man7/fanotify.7:630
1380 #, no-wrap
1381 msgid ""
1382 "                    response.fd = metadata-E<gt>fd;\n"
1383 "                    response.response = FAN_ALLOW;\n"
1384 "                    write(fd, &response,\n"
1385 "                          sizeof(struct fanotify_response));\n"
1386 "                }\n"
1387 msgstr ""
1388 "                    response.fd = metadata-E<gt>fd;\n"
1389 "                    response.response = FAN_ALLOW;\n"
1390 "                    write(fd, &response,\n"
1391 "                          sizeof(struct fanotify_response));\n"
1392 "                }\n"
1393
1394 #. type: Plain text
1395 #: build/C/man7/fanotify.7:632
1396 #, no-wrap
1397 msgid "                /* Handle closing of writable file event */\n"
1398 msgstr "                /* 書き込み可能ファイルのクローズイベントを処理する */\n"
1399
1400 #. type: Plain text
1401 #: build/C/man7/fanotify.7:635
1402 #, no-wrap
1403 msgid ""
1404 "                if (metadata-E<gt>mask & FAN_CLOSE_WRITE)\n"
1405 "                    printf(\"FAN_CLOSE_WRITE: \");\n"
1406 msgstr ""
1407 "                if (metadata-E<gt>mask & FAN_CLOSE_WRITE)\n"
1408 "                    printf(\"FAN_CLOSE_WRITE: \");\n"
1409
1410 #. type: Plain text
1411 #: build/C/man7/fanotify.7:637
1412 #, no-wrap
1413 msgid "                /* Retrieve and print pathname of the accessed file */\n"
1414 msgstr "                /* アクセスされたファイルのパス名を取得し表示する */\n"
1415
1416 #. type: Plain text
1417 #: build/C/man7/fanotify.7:646
1418 #, no-wrap
1419 msgid ""
1420 "                snprintf(procfd_path, sizeof(procfd_path),\n"
1421 "                         \"/proc/self/fd/%d\", metadata-E<gt>fd);\n"
1422 "                path_len = readlink(procfd_path, path,\n"
1423 "                                    sizeof(path) - 1);\n"
1424 "                if (path_len == -1) {\n"
1425 "                    perror(\"readlink\");\n"
1426 "                    exit(EXIT_FAILURE);\n"
1427 "                }\n"
1428 msgstr ""
1429 "                snprintf(procfd_path, sizeof(procfd_path),\n"
1430 "                         \"/proc/self/fd/%d\", metadata-E<gt>fd);\n"
1431 "                path_len = readlink(procfd_path, path,\n"
1432 "                                    sizeof(path) - 1);\n"
1433 "                if (path_len == -1) {\n"
1434 "                    perror(\"readlink\");\n"
1435 "                    exit(EXIT_FAILURE);\n"
1436 "                }\n"
1437
1438 #. type: Plain text
1439 #: build/C/man7/fanotify.7:649
1440 #, no-wrap
1441 msgid ""
1442 "                path[path_len] = '\\e0';\n"
1443 "                printf(\"File %s\\en\", path);\n"
1444 msgstr ""
1445 "                path[path_len] = '\\e0';\n"
1446 "                printf(\"File %s\\en\", path);\n"
1447
1448 #. type: Plain text
1449 #: build/C/man7/fanotify.7:651
1450 #, no-wrap
1451 msgid "                /* Close the file descriptor of the event */\n"
1452 msgstr "                /* イベントのファイルディスクリプターをクローズする */\n"
1453
1454 #. type: Plain text
1455 #: build/C/man7/fanotify.7:654
1456 #, no-wrap
1457 msgid ""
1458 "                close(metadata-E<gt>fd);\n"
1459 "            }\n"
1460 msgstr ""
1461 "                close(metadata-E<gt>fd);\n"
1462 "            }\n"
1463
1464 #. type: Plain text
1465 #: build/C/man7/fanotify.7:656
1466 #, no-wrap
1467 msgid "            /* Advance to next event */\n"
1468 msgstr "            /* 次のイベントに進む */\n"
1469
1470 #. type: Plain text
1471 #: build/C/man7/fanotify.7:661
1472 #, no-wrap
1473 msgid ""
1474 "            metadata = FAN_EVENT_NEXT(metadata, len);\n"
1475 "        }\n"
1476 "    }\n"
1477 "}\n"
1478 msgstr ""
1479 "            metadata = FAN_EVENT_NEXT(metadata, len);\n"
1480 "        }\n"
1481 "    }\n"
1482 "}\n"
1483
1484 #. type: Plain text
1485 #: build/C/man7/fanotify.7:669
1486 #, no-wrap
1487 msgid ""
1488 "int\n"
1489 "main(int argc, char *argv[])\n"
1490 "{\n"
1491 "    char buf;\n"
1492 "    int fd, poll_num;\n"
1493 "    nfds_t nfds;\n"
1494 "    struct pollfd fds[2];\n"
1495 msgstr ""
1496 "int\n"
1497 "main(int argc, char *argv[])\n"
1498 "{\n"
1499 "    char buf;\n"
1500 "    int fd, poll_num;\n"
1501 "    nfds_t nfds;\n"
1502 "    struct pollfd fds[2];\n"
1503
1504 #. type: Plain text
1505 #: build/C/man7/fanotify.7:671
1506 #, no-wrap
1507 msgid "    /* Check mount point is supplied */\n"
1508 msgstr "    /* マウントポイントが指定されたか確認する */\n"
1509
1510 #. type: Plain text
1511 #: build/C/man7/fanotify.7:676
1512 #, no-wrap
1513 msgid ""
1514 "    if (argc != 2) {\n"
1515 "        fprintf(stderr, \"Usage: %s MOUNT\\en\", argv[0]);\n"
1516 "        exit(EXIT_FAILURE);\n"
1517 "    }\n"
1518 msgstr ""
1519 "    if (argc != 2) {\n"
1520 "        fprintf(stderr, \"Usage: %s MOUNT\\en\", argv[0]);\n"
1521 "        exit(EXIT_FAILURE);\n"
1522 "    }\n"
1523
1524 #. type: Plain text
1525 #: build/C/man7/fanotify.7:678
1526 #, no-wrap
1527 msgid "    printf(\"Press enter key to terminate.\\en\");\n"
1528 msgstr "    printf(\"Press enter key to terminate.\\en\");\n"
1529
1530 #. type: Plain text
1531 #: build/C/man7/fanotify.7:680
1532 #, no-wrap
1533 msgid "    /* Create the file descriptor for accessing the fanotify API */\n"
1534 msgstr "    /* fanotify API にアクセスするためのファイルディスクリプターを作成する */\n"
1535
1536 #. type: Plain text
1537 #: build/C/man7/fanotify.7:687
1538 #, no-wrap
1539 msgid ""
1540 "    fd = fanotify_init(FAN_CLOEXEC | FAN_CLASS_CONTENT | FAN_NONBLOCK,\n"
1541 "                       O_RDONLY | O_LARGEFILE);\n"
1542 "    if (fd == -1) {\n"
1543 "        perror(\"fanotify_init\");\n"
1544 "        exit(EXIT_FAILURE);\n"
1545 "    }\n"
1546 msgstr ""
1547 "    fd = fanotify_init(FAN_CLOEXEC | FAN_CLASS_CONTENT | FAN_NONBLOCK,\n"
1548 "                       O_RDONLY | O_LARGEFILE);\n"
1549 "    if (fd == -1) {\n"
1550 "        perror(\"fanotify_init\");\n"
1551 "        exit(EXIT_FAILURE);\n"
1552 "    }\n"
1553
1554 #. type: Plain text
1555 #: build/C/man7/fanotify.7:692
1556 #, no-wrap
1557 msgid ""
1558 "    /* Mark the mount for:\n"
1559 "       - permission events before opening files\n"
1560 "       - notification events after closing a write-enabled\n"
1561 "         file descriptor */\n"
1562 msgstr ""
1563 "    /* 指定されたマウントに対して以下を監視するようにマークを付ける:\n"
1564 "       - ファイルのオープン前のアクセス許可イベント\n"
1565 "       - 書き込み可能なファイルディスクリプターのクローズ後の\n"
1566 "         通知イベント */\n"
1567
1568 #. type: Plain text
1569 #: build/C/man7/fanotify.7:699
1570 #, no-wrap
1571 msgid ""
1572 "    if (fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT,\n"
1573 "                      FAN_OPEN_PERM | FAN_CLOSE_WRITE, AT_FDCWD,\n"
1574 "                      argv[1]) == -1) {\n"
1575 "        perror(\"fanotify_mark\");\n"
1576 "        exit(EXIT_FAILURE);\n"
1577 "    }\n"
1578 msgstr ""
1579 "    if (fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT,\n"
1580 "                      FAN_OPEN_PERM | FAN_CLOSE_WRITE, AT_FDCWD,\n"
1581 "                      argv[1]) == -1) {\n"
1582 "        perror(\"fanotify_mark\");\n"
1583 "        exit(EXIT_FAILURE);\n"
1584 "    }\n"
1585
1586 #. type: Plain text
1587 #: build/C/man7/fanotify.7:701 build/C/man7/inotify.7:989
1588 #, no-wrap
1589 msgid "    /* Prepare for polling */\n"
1590 msgstr "    /* ポーリングの準備 */\n"
1591
1592 #. type: Plain text
1593 #: build/C/man7/fanotify.7:703 build/C/man7/inotify.7:991
1594 #, no-wrap
1595 msgid "    nfds = 2;\n"
1596 msgstr "    nfds = 2;\n"
1597
1598 #. type: Plain text
1599 #: build/C/man7/fanotify.7:705 build/C/man7/inotify.7:993
1600 #, no-wrap
1601 msgid "    /* Console input */\n"
1602 msgstr "    /* コンソールの入力 */\n"
1603
1604 #. type: Plain text
1605 #: build/C/man7/fanotify.7:708 build/C/man7/inotify.7:996
1606 #, no-wrap
1607 msgid ""
1608 "    fds[0].fd = STDIN_FILENO;\n"
1609 "    fds[0].events = POLLIN;\n"
1610 msgstr ""
1611 "    fds[0].fd = STDIN_FILENO;\n"
1612 "    fds[0].events = POLLIN;\n"
1613
1614 #. type: Plain text
1615 #: build/C/man7/fanotify.7:710
1616 #, no-wrap
1617 msgid "    /* Fanotify input */\n"
1618 msgstr "    /* fanotify の入力 */\n"
1619
1620 #. type: Plain text
1621 #: build/C/man7/fanotify.7:713 build/C/man7/inotify.7:1001
1622 #, no-wrap
1623 msgid ""
1624 "    fds[1].fd = fd;\n"
1625 "    fds[1].events = POLLIN;\n"
1626 msgstr ""
1627 "    fds[1].fd = fd;\n"
1628 "    fds[1].events = POLLIN;\n"
1629
1630 #. type: Plain text
1631 #: build/C/man7/fanotify.7:715
1632 #, no-wrap
1633 msgid "    /* This is the loop to wait for incoming events */\n"
1634 msgstr "    /* イベントの発生を待つループ */\n"
1635
1636 #. type: Plain text
1637 #: build/C/man7/fanotify.7:717
1638 #, no-wrap
1639 msgid "    printf(\"Listening for events.\\en\");\n"
1640 msgstr "    printf(\"Listening for events.\\en\");\n"
1641
1642 #. type: Plain text
1643 #: build/C/man7/fanotify.7:723
1644 #, no-wrap
1645 msgid ""
1646 "    while (1) {\n"
1647 "        poll_num = poll(fds, nfds, -1);\n"
1648 "        if (poll_num == -1) {\n"
1649 "            if (errno == EINTR)     /* Interrupted by a signal */\n"
1650 "                continue;           /* Restart poll() */\n"
1651 msgstr ""
1652 "    while (1) {\n"
1653 "        poll_num = poll(fds, nfds, -1);\n"
1654 "        if (poll_num == -1) {\n"
1655 "            if (errno == EINTR)     /* シグナルに割り込まれた場合 */\n"
1656 "                continue;           /* poll() を再開する */\n"
1657
1658 #. type: Plain text
1659 #: build/C/man7/fanotify.7:727
1660 #, no-wrap
1661 msgid ""
1662 "            perror(\"poll\");         /* Unexpected error */\n"
1663 "            exit(EXIT_FAILURE);\n"
1664 "        }\n"
1665 msgstr ""
1666 "            perror(\"poll\");         /* 予期しないエラー */\n"
1667 "            exit(EXIT_FAILURE);\n"
1668 "        }\n"
1669
1670 #. type: Plain text
1671 #: build/C/man7/fanotify.7:730
1672 #, no-wrap
1673 msgid ""
1674 "        if (poll_num E<gt> 0) {\n"
1675 "            if (fds[0].revents & POLLIN) {\n"
1676 msgstr ""
1677 "        if (poll_num E<gt> 0) {\n"
1678 "            if (fds[0].revents & POLLIN) {\n"
1679
1680 #. type: Plain text
1681 #: build/C/man7/fanotify.7:732
1682 #, no-wrap
1683 msgid "                /* Console input is available: empty stdin and quit */\n"
1684 msgstr "                /* コンソールからの入力がある場合: 空の標準入力であれば終了 */\n"
1685
1686 #. type: Plain text
1687 #: build/C/man7/fanotify.7:737 build/C/man7/inotify.7:1024
1688 #, no-wrap
1689 msgid ""
1690 "                while (read(STDIN_FILENO, &buf, 1) E<gt> 0 && buf != '\\en')\n"
1691 "                    continue;\n"
1692 "                break;\n"
1693 "            }\n"
1694 msgstr ""
1695 "                while (read(STDIN_FILENO, &buf, 1) E<gt> 0 && buf != '\\en')\n"
1696 "                    continue;\n"
1697 "                break;\n"
1698 "            }\n"
1699
1700 #. type: Plain text
1701 #: build/C/man7/fanotify.7:739 build/C/man7/inotify.7:1026
1702 #, no-wrap
1703 msgid "            if (fds[1].revents & POLLIN) {\n"
1704 msgstr "            if (fds[1].revents & POLLIN) {\n"
1705
1706 #. type: Plain text
1707 #: build/C/man7/fanotify.7:741
1708 #, no-wrap
1709 msgid "                /* Fanotify events are available */\n"
1710 msgstr "                /* fanotify イベントがある場合 */\n"
1711
1712 #. type: Plain text
1713 #: build/C/man7/fanotify.7:746
1714 #, no-wrap
1715 msgid ""
1716 "                handle_events(fd);\n"
1717 "            }\n"
1718 "        }\n"
1719 "    }\n"
1720 msgstr ""
1721 "                handle_events(fd);\n"
1722 "            }\n"
1723 "        }\n"
1724 "    }\n"
1725
1726 #. type: Plain text
1727 #: build/C/man7/fanotify.7:750
1728 #, no-wrap
1729 msgid ""
1730 "    printf(\"Listening for events stopped.\\en\");\n"
1731 "    exit(EXIT_SUCCESS);\n"
1732 "}\n"
1733 msgstr ""
1734 "    printf(\"Listening for events stopped.\\en\");\n"
1735 "    exit(EXIT_SUCCESS);\n"
1736 "}\n"
1737
1738 #. type: SH
1739 #: build/C/man7/fanotify.7:751 build/C/man2/fanotify_init.2:260
1740 #: build/C/man2/fanotify_mark.2:331 build/C/man7/inotify.7:1044
1741 #: build/C/man2/inotify_add_watch.2:120 build/C/man2/inotify_init.2:103
1742 #: build/C/man2/inotify_rm_watch.2:71
1743 #, no-wrap
1744 msgid "SEE ALSO"
1745 msgstr "関連項目"
1746
1747 #. type: Plain text
1748 #: build/C/man7/fanotify.7:756
1749 msgid "B<fanotify_init>(2), B<fanotify_mark>(2), B<inotify>(7)"
1750 msgstr "B<fanotify_init>(2), B<fanotify_mark>(2), B<inotify>(7)"
1751
1752 #. type: SH
1753 #: build/C/man7/fanotify.7:756 build/C/man2/fanotify_init.2:263
1754 #: build/C/man2/fanotify_mark.2:334 build/C/man7/inotify.7:1057
1755 #: build/C/man2/inotify_add_watch.2:124 build/C/man2/inotify_init.2:107
1756 #: build/C/man2/inotify_rm_watch.2:75
1757 #, no-wrap
1758 msgid "COLOPHON"
1759 msgstr "この文書について"
1760
1761 #. type: Plain text
1762 #: build/C/man7/fanotify.7:764 build/C/man2/fanotify_init.2:271
1763 #: build/C/man2/fanotify_mark.2:342 build/C/man7/inotify.7:1065
1764 #: build/C/man2/inotify_add_watch.2:132 build/C/man2/inotify_init.2:115
1765 #: build/C/man2/inotify_rm_watch.2:83
1766 msgid ""
1767 "This page is part of release 3.78 of the Linux I<man-pages> project.  A "
1768 "description of the project, information about reporting bugs, and the latest "
1769 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
1770 "pages/."
1771 msgstr ""
1772 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
1773 "である。プロジェクトの説明とバグ報告に関する情報は\n"
1774 "http://www.kernel.org/doc/man-pages/ に書かれている。"
1775
1776 #. type: TH
1777 #: build/C/man2/fanotify_init.2:24
1778 #, no-wrap
1779 msgid "FANOTIFY_INIT"
1780 msgstr "FANOTIFY_INIT"
1781
1782 #. type: TH
1783 #: build/C/man2/fanotify_init.2:24 build/C/man2/fanotify_mark.2:24
1784 #, no-wrap
1785 msgid "2014-10-02"
1786 msgstr "2014-10-02"
1787
1788 #. type: Plain text
1789 #: build/C/man2/fanotify_init.2:27
1790 msgid "fanotify_init - create and initialize fanotify group"
1791 msgstr "fanotify_init - fanotify グループを作成し、初期化する"
1792
1793 #. type: SH
1794 #: build/C/man2/fanotify_init.2:27 build/C/man2/fanotify_mark.2:28
1795 #: build/C/man2/inotify_add_watch.2:31 build/C/man2/inotify_init.2:32
1796 #: build/C/man2/inotify_rm_watch.2:30
1797 #, no-wrap
1798 msgid "SYNOPSIS"
1799 msgstr "書式"
1800
1801 #. type: Plain text
1802 #: build/C/man2/fanotify_init.2:29
1803 msgid "B<#include E<lt>fcntl.hE<gt>>"
1804 msgstr "B<#include E<lt>fcntl.hE<gt>>"
1805
1806 #. type: Plain text
1807 #: build/C/man2/fanotify_init.2:31
1808 msgid "B<#include E<lt>sys/fanotify.hE<gt>>"
1809 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>"
1810
1811 #. type: Plain text
1812 #: build/C/man2/fanotify_init.2:33
1813 msgid ""
1814 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1815 ">I<event_f_flags>B<);>"
1816 msgstr ""
1817 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1818 ">I<event_f_flags>B<);>"
1819
1820 #. type: Plain text
1821 #: build/C/man2/fanotify_init.2:36 build/C/man2/fanotify_mark.2:39
1822 msgid "For an overview of the fanotify API, see B<fanotify>(7)."
1823 msgstr "fanotify API の概要については B<fanotify>(7) を参照。"
1824
1825 #. type: Plain text
1826 #: build/C/man2/fanotify_init.2:40
1827 msgid ""
1828 "B<fanotify_init>()  initializes a new fanotify group and returns a file "
1829 "descriptor for the event queue associated with the group."
1830 msgstr ""
1831 "B<fanotify_init>() は新しい fanotify グループを初期化し、 このグループに関連"
1832 "付けられたイベントキューに対するファイルディスクリプターを返す。"
1833
1834 #. type: Plain text
1835 #: build/C/man2/fanotify_init.2:51
1836 msgid ""
1837 "The file descriptor is used in calls to B<fanotify_mark>(2)  to specify the "
1838 "files, directories, and mounts for which fanotify events shall be created.  "
1839 "These events are received by reading from the file descriptor.  Some events "
1840 "are only informative, indicating that a file has been accessed.  Other "
1841 "events can be used to determine whether another application is permitted to "
1842 "access a file or directory.  Permission to access filesystem objects is "
1843 "granted by writing to the file descriptor."
1844 msgstr ""
1845 "このファイルディスクリプターは、 B<fanotify_mark>(2) の呼び出しで fanotify イ"
1846 "ベントが作成されるファイル、 ディレクトリ、 マウントを指定するのに使用でき"
1847 "る。 B<fanotify_mark>(2) で指定したファイル、 これらのイベントは、 このファイ"
1848 "ルディスクリプターからの読み出しで受信する。 いくつかのイベントは、 ファイル"
1849 "がアクセスされたことを示す単なる情報である。 他のいくつかのイベントは、 別の"
1850 "アプリケーションがファイルやディレクトリにアクセスする許可を与えるかを判定す"
1851 "るのに使用される。 ファイルシステムオブジェクトへのアクセス許可イベントについ"
1852 "ては、 承認結果をこのファイルディスクリプターに書き込む。"
1853
1854 #. type: Plain text
1855 #: build/C/man2/fanotify_init.2:54
1856 msgid ""
1857 "Multiple programs may be using the fanotify interface at the same time to "
1858 "monitor the same files."
1859 msgstr ""
1860 "複数のプログラムが同時に fanotify インターフェースを使って同じファイルを同時"
1861 "に監視することができる。"
1862
1863 #. type: Plain text
1864 #: build/C/man2/fanotify_init.2:58
1865 msgid ""
1866 "In the current implementation, the number of fanotify groups per user is "
1867 "limited to 128.  This limit cannot be overridden."
1868 msgstr ""
1869 "現在の実装では、 ユーザーあたりの fanotify グループ数は 128 に制限されてい"
1870 "る。 この制限は上書きすることができない。"
1871
1872 #. type: Plain text
1873 #: build/C/man2/fanotify_init.2:67
1874 msgid ""
1875 "Calling B<fanotify_init>()  requires the B<CAP_SYS_ADMIN> capability.  This "
1876 "constraint might be relaxed in future versions of the API.  Therefore, "
1877 "certain additional capability checks have been implemented as indicated "
1878 "below."
1879 msgstr ""
1880 "B<fanotify_init>() を呼び出すには B<CAP_SYS_ADMIN> ケーパビリティーが必要であ"
1881 "る。 この制約は将来のバージョンの API で緩和される可能性がある。 そのため、 "
1882 "以下に示すケーパビリティーチェックのいくつかが実装されている。"
1883
1884 #. type: Plain text
1885 #: build/C/man2/fanotify_init.2:73
1886 msgid ""
1887 "The I<flags> argument contains a multi-bit field defining the notification "
1888 "class of the listening application and further single bit fields specifying "
1889 "the behavior of the file descriptor."
1890 msgstr ""
1891 "I<flags> 引き数は、 イベントを待つアプリケーションの通知クラスを定義する複数"
1892 "ビットのフィールドである。 これに加えて、 このファイルディスクリプターの動作"
1893 "を示す 1 ビットのフィールドがある。"
1894
1895 #. type: Plain text
1896 #: build/C/man2/fanotify_init.2:77
1897 msgid ""
1898 "If multiple listeners for permission events exist, the notification class is "
1899 "used to establish the sequence in which the listeners receive the events."
1900 msgstr ""
1901 "アクセス許可イベントを監視しているプログラムが複数いる場合、 通知クラスを使っ"
1902 "て監視するプログラムのイベント受信順序が管理される。"
1903
1904 #. type: Plain text
1905 #: build/C/man2/fanotify_init.2:80
1906 msgid ""
1907 "Only one of the following notification classes may be specified in I<flags>:"
1908 msgstr "以下の通知クラスのいずれか一つだけを I<flags> に指定できる。"
1909
1910 #. type: TP
1911 #: build/C/man2/fanotify_init.2:80
1912 #, no-wrap
1913 msgid "B<FAN_CLASS_PRE_CONTENT>"
1914 msgstr "B<FAN_CLASS_PRE_CONTENT>"
1915
1916 #. type: Plain text
1917 #: build/C/man2/fanotify_init.2:88
1918 msgid ""
1919 "This value allows the receipt of events notifying that a file has been "
1920 "accessed and events for permission decisions if a file may be accessed.  It "
1921 "is intended for event listeners that need to access files before they "
1922 "contain their final data.  This notification class might be used by "
1923 "hierarchical storage managers, for example."
1924 msgstr ""
1925 "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのア"
1926 "クセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント"
1927 "受信者がファイルが最終的なデータを格納する前にそのファイルにアクセスする必要"
1928 "がある場合に使用される。 この通知クラスは例えば階層型ストレージ管理などで使用"
1929 "される。"
1930
1931 #. type: TP
1932 #: build/C/man2/fanotify_init.2:88
1933 #, no-wrap
1934 msgid "B<FAN_CLASS_CONTENT>"
1935 msgstr "B<FAN_CLASS_CONTENT>"
1936
1937 #. type: Plain text
1938 #: build/C/man2/fanotify_init.2:96
1939 msgid ""
1940 "This value allows the receipt of events notifying that a file has been "
1941 "accessed and events for permission decisions if a file may be accessed.  It "
1942 "is intended for event listeners that need to access files when they already "
1943 "contain their final content.  This notification class might be used by "
1944 "malware detection programs, for example."
1945 msgstr ""
1946 "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのア"
1947 "クセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント"
1948 "受信者がファイルに最終的なデータが格納された際にそのファイルにアクセスする必"
1949 "要がある場合に使用される。 この通知クラスは例えばウイルス検知プログラムなどで"
1950 "使用される。"
1951
1952 #. type: TP
1953 #: build/C/man2/fanotify_init.2:96
1954 #, no-wrap
1955 msgid "B<FAN_CLASS_NOTIF>"
1956 msgstr "B<FAN_CLASS_NOTIF>"
1957
1958 #. type: Plain text
1959 #: build/C/man2/fanotify_init.2:103
1960 msgid ""
1961 "This is the default value.  It does not need to be specified.  This value "
1962 "only allows the receipt of events notifying that a file has been accessed.  "
1963 "Permission decisions before the file is accessed are not possible."
1964 msgstr ""
1965 "これはデフォルト値である。 この値を指定する必要はない。 この値は、 ファイルが"
1966 "アクセスされたことを通知するイベントの受信だけを行うことを意味する。 ファイル"
1967 "がアクセスする前にアクセス許可の判定を行うことはできない。"
1968
1969 #. type: Plain text
1970 #: build/C/man2/fanotify_init.2:111
1971 msgid ""
1972 "Listeners with different notification classes will receive events in the "
1973 "order B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, B<FAN_CLASS_NOTIF>.  "
1974 "The order of notification for listeners in the same notification class is "
1975 "undefined."
1976 msgstr ""
1977 "異なる通知クラスの受信者は B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, "
1978 "B<FAN_CLASS_NOTIF> の順序でイベントを受信する。 同じ通知クラスの受信者での通"
1979 "知順序は不定である。"
1980
1981 #. type: Plain text
1982 #: build/C/man2/fanotify_init.2:114
1983 msgid "The following bits can additionally be set in I<flags>:"
1984 msgstr "I<flags> には以下のビットを追加でセットすることができる。"
1985
1986 #. type: TP
1987 #: build/C/man2/fanotify_init.2:114
1988 #, no-wrap
1989 msgid "B<FAN_CLOEXEC>"
1990 msgstr "B<FAN_CLOEXEC>"
1991
1992 #. type: Plain text
1993 #: build/C/man2/fanotify_init.2:123
1994 msgid ""
1995 "Set the close-on-exec flag (B<FD_CLOEXEC>)  on the new file descriptor.  See "
1996 "the description of the B<O_CLOEXEC> flag in B<open>(2)."
1997 msgstr ""
1998 "close-on-exec フラグ (B<FD_CLOEXEC>) を新しいファイルディスクリプターにセット"
1999 "する。 B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
2000
2001 #. type: TP
2002 #: build/C/man2/fanotify_init.2:123
2003 #, no-wrap
2004 msgid "B<FAN_NONBLOCK>"
2005 msgstr "B<FAN_NONBLOCK>"
2006
2007 #. type: Plain text
2008 #: build/C/man2/fanotify_init.2:133
2009 msgid ""
2010 "Enable the nonblocking flag (B<O_NONBLOCK>)  for the file descriptor.  "
2011 "Reading from the file descriptor will not block.  Instead, if no data is "
2012 "available, B<read>(2)  will fail with the error B<EAGAIN>."
2013 msgstr ""
2014 "ノンブロッキングフラグ (B<O_NONBLOCK>) をそのファイルディスクリプターで有効に"
2015 "する。 このファイルディスクリプターからの読み出しは停止しない。 その代わり、 "
2016 "読みだし可能なデータが何もない場合、 B<read>(2) はエラー B<EAGAIN> で失敗す"
2017 "る。"
2018
2019 #. type: TP
2020 #: build/C/man2/fanotify_init.2:133
2021 #, no-wrap
2022 msgid "B<FAN_UNLIMITED_QUEUE>"
2023 msgstr "B<FAN_UNLIMITED_QUEUE>"
2024
2025 #. type: Plain text
2026 #: build/C/man2/fanotify_init.2:139
2027 msgid ""
2028 "Remove the limit of 16384 events for the event queue.  Use of this flag "
2029 "requires the B<CAP_SYS_ADMIN> capability."
2030 msgstr ""
2031 "そのイベントキューの 16384 イベントの上限を削除する。 このフラグを使用するに"
2032 "は B<CAP_SYS_ADMIN> ケーパビリティーが必要である。"
2033
2034 #. type: TP
2035 #: build/C/man2/fanotify_init.2:139
2036 #, no-wrap
2037 msgid "B<FAN_UNLIMITED_MARKS>"
2038 msgstr "B<FAN_UNLIMITED_MARKS>"
2039
2040 #. type: Plain text
2041 #: build/C/man2/fanotify_init.2:145
2042 msgid ""
2043 "Remove the limit of 8192 marks.  Use of this flag requires the "
2044 "B<CAP_SYS_ADMIN> capability."
2045 msgstr ""
2046 "8192 マークの上限を削除する。 このフラグを使用するには B<CAP_SYS_ADMIN> ケー"
2047 "パビリティーが必要である。"
2048
2049 #. type: Plain text
2050 #: build/C/man2/fanotify_init.2:158
2051 msgid ""
2052 "The I<event_f_flags> argument defines the file status flags that will be set "
2053 "on the open file descriptions that are created for fanotify events.  For "
2054 "details of these flags, see the description of the I<flags> values in "
2055 "B<open>(2).  I<event_f_flags> includes a multi-bit field for the access "
2056 "mode.  This field can take the following values:"
2057 msgstr ""
2058 "I<event_f_flags> 引き数は fanotify イベントが作成されるオープンファイル記述に"
2059 "セットされるファイル状態フラグを定義する。 これらのフラグの詳細については "
2060 "B<open>(2) の I<flags> 値の説明を参照のこと。 I<event_f_flags> にはアクセス"
2061 "モードのビットを複数入れることができる。 このフィールドには以下の値も指定する"
2062 "ことができる。"
2063
2064 #. type: TP
2065 #: build/C/man2/fanotify_init.2:158
2066 #, no-wrap
2067 msgid "B<O_RDONLY>"
2068 msgstr "B<O_RDONLY>"
2069
2070 #. type: Plain text
2071 #: build/C/man2/fanotify_init.2:161
2072 msgid "This value allows only read access."
2073 msgstr "読み出しアクセスのみを許可する。"
2074
2075 #. type: TP
2076 #: build/C/man2/fanotify_init.2:161
2077 #, no-wrap
2078 msgid "B<O_WRONLY>"
2079 msgstr "B<O_WRONLY>"
2080
2081 #. type: Plain text
2082 #: build/C/man2/fanotify_init.2:164
2083 msgid "This value allows only write access."
2084 msgstr "書き込みアクセスのみを許可する。"
2085
2086 #. type: TP
2087 #: build/C/man2/fanotify_init.2:164
2088 #, no-wrap
2089 msgid "B<O_RDWR>"
2090 msgstr "B<O_RDWR>"
2091
2092 #. type: Plain text
2093 #: build/C/man2/fanotify_init.2:167
2094 msgid "This value allows read and write access."
2095 msgstr "読み出しと書き込みの両方を許可する。"
2096
2097 #. type: Plain text
2098 #: build/C/man2/fanotify_init.2:171
2099 msgid ""
2100 "Additional bits can be set in I<event_f_flags>.  The most useful values are:"
2101 msgstr ""
2102 "他のビットも I<event_f_flags> もセットすることができる。 役立つであろう値は以"
2103 "下である。"
2104
2105 #. type: TP
2106 #: build/C/man2/fanotify_init.2:171
2107 #, no-wrap
2108 msgid "B<O_LARGEFILE>"
2109 msgstr "B<O_LARGEFILE>"
2110
2111 #. type: Plain text
2112 #: build/C/man2/fanotify_init.2:178
2113 msgid ""
2114 "Enable support for files exceeding 2 GB.  Failing to set this flag will "
2115 "result in an B<EOVERFLOW> error when trying to open a large file which is "
2116 "monitored by an fanotify group on a 32-bit system."
2117 msgstr ""
2118 "2 GB を超えるファイルのサポートを有効にする。 このフラグのセットに失敗する"
2119 "と、 32 ビットシステムで fanotify グループが監視するラージファイルをオープン"
2120 "しようとした際に B<EOVERFLOW> エラーとなる。"
2121
2122 #. type: TP
2123 #: build/C/man2/fanotify_init.2:178
2124 #, no-wrap
2125 msgid "B<O_CLOEXEC>"
2126 msgstr "B<O_CLOEXEC>"
2127
2128 #. type: Plain text
2129 #: build/C/man2/fanotify_init.2:186
2130 msgid ""
2131 "Enable the close-on-exec flag for the file descriptor.  See the description "
2132 "of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this may be useful."
2133 msgstr ""
2134 "このファイルディスクリプターで close-on-exec フラグを有効にする。 このフラグ"
2135 "が役立つ理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
2136
2137 #. type: Plain text
2138 #: build/C/man2/fanotify_init.2:199
2139 msgid ""
2140 "The following are also allowable: B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, "
2141 "B<O_NONBLOCK>, and B<O_SYNC>.  Specifying any other flag in I<event_f_flags> "
2142 "yields the error B<EINVAL> (but see BUGS)."
2143 msgstr ""
2144 "B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, B<O_NONBLOCK>, B<O_SYNC> も指定するこ"
2145 "とができる。 I<event_f_flags> にこれ以外のフラグを指定すると、 エラー "
2146 "B<EINVAL> が起こる (ただし、バグを参照)。"
2147
2148 #. type: SH
2149 #: build/C/man2/fanotify_init.2:199 build/C/man2/fanotify_mark.2:236
2150 #: build/C/man2/inotify_add_watch.2:77 build/C/man2/inotify_init.2:74
2151 #: build/C/man2/inotify_rm_watch.2:48
2152 #, no-wrap
2153 msgid "RETURN VALUE"
2154 msgstr "返り値"
2155
2156 #. type: Plain text
2157 #: build/C/man2/fanotify_init.2:206
2158 msgid ""
2159 "On success, B<fanotify_init>()  returns a new file descriptor.  On error, -1 "
2160 "is returned, and I<errno> is set to indicate the error."
2161 msgstr ""
2162 "成功すると B<fanotify_init>() は新しいファイルディスクリプターを返す。 エラー"
2163 "の場合、 -1 を返し、 I<errno> にエラーを示す値を設定する。"
2164
2165 #. type: Plain text
2166 #: build/C/man2/fanotify_init.2:216
2167 msgid ""
2168 "An invalid value was passed in I<flags> or I<event_f_flags>.  "
2169 "B<FAN_ALL_INIT_FLAGS> defines all allowable bits for I<flags>."
2170 msgstr ""
2171 "I<flags> か I<event_f_flags> に無効な値が渡された。 B<FAN_ALL_INIT_FLAGS> で "
2172 "I<flags> に指定できる全ビットが定義されている。"
2173
2174 #. type: Plain text
2175 #: build/C/man2/fanotify_init.2:219
2176 msgid "The number of fanotify groups for this user exceeds 128."
2177 msgstr "このユーザーの fanotify グループ数が 128 を超過した。"
2178
2179 #. type: TP
2180 #: build/C/man2/fanotify_init.2:219 build/C/man2/fanotify_mark.2:274
2181 #: build/C/man2/inotify_add_watch.2:109 build/C/man2/inotify_init.2:91
2182 #, no-wrap
2183 msgid "B<ENOMEM>"
2184 msgstr "B<ENOMEM>"
2185
2186 #. type: Plain text
2187 #: build/C/man2/fanotify_init.2:222
2188 msgid "The allocation of memory for the notification group failed."
2189 msgstr "通知グループへのメモリー割り当てが失敗した。"
2190
2191 #. type: TP
2192 #: build/C/man2/fanotify_init.2:222 build/C/man2/fanotify_mark.2:283
2193 #, no-wrap
2194 msgid "B<ENOSYS>"
2195 msgstr "B<ENOSYS>"
2196
2197 #. type: Plain text
2198 #: build/C/man2/fanotify_init.2:228
2199 msgid ""
2200 "This kernel does not implement B<fanotify_init>().  The fanotify API is "
2201 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
2202 msgstr ""
2203 "このカーネルは B<fanotify_init>() を実装していない。 fanotify API が利用でき"
2204 "るのは、 カーネルが B<CONFIG_FANOTIFY> を有効にして作成されている場合だけであ"
2205 "る。"
2206
2207 #. type: TP
2208 #: build/C/man2/fanotify_init.2:228
2209 #, no-wrap
2210 msgid "B<EPERM>"
2211 msgstr "B<EPERM>"
2212
2213 #. type: Plain text
2214 #: build/C/man2/fanotify_init.2:233
2215 msgid ""
2216 "The operation is not permitted because the caller lacks the B<CAP_SYS_ADMIN> "
2217 "capability."
2218 msgstr ""
2219 "呼び出し元が B<CAP_SYS_ADMIN> ケーパビリティーを持っていないので、操作が許可"
2220 "されない。"
2221
2222 #. type: Plain text
2223 #: build/C/man2/fanotify_init.2:237
2224 msgid ""
2225 "B<fanotify_init>()  was introduced in version 2.6.36 of the Linux kernel and "
2226 "enabled in version 2.6.37."
2227 msgstr ""
2228 "B<fanotify_init>() は Linux カーネルのバージョン 2.6.36 で導入され、 バージョ"
2229 "ン 2.6.37 で有効になった。"
2230
2231 #. type: Plain text
2232 #: build/C/man2/fanotify_init.2:239 build/C/man2/fanotify_mark.2:305
2233 #: build/C/man2/inotify_add_watch.2:120 build/C/man2/inotify_rm_watch.2:71
2234 msgid "This system call is Linux-specific."
2235 msgstr "このシステムコールは Linux 独自である。"
2236
2237 #. type: Plain text
2238 #: build/C/man2/fanotify_init.2:242
2239 msgid "As of Linux 3.17, the following bug exists:"
2240 msgstr "Linux 3.17 時点では、 以下のバグが存在する。"
2241
2242 #.  FIXME . Patch proposed: https://lkml.org/lkml/2014/9/24/967
2243 #. type: Plain text
2244 #: build/C/man2/fanotify_init.2:248
2245 msgid "The B<O_CLOEXEC> is ignored when passed in I<event_f_flags>."
2246 msgstr "B<O_CLOEXEC> が I<event_f_flags> に指定された場合、 無視される。"
2247
2248 #. type: Plain text
2249 #: build/C/man2/fanotify_init.2:250
2250 msgid "The following bug was present in Linux kernels before version 3.14:"
2251 msgstr "バージョン 3.14 より前の Linux カーネルには以下のバグが存在する。"
2252
2253 #.  Fixed by commit 48149e9d3a7e924010a0daab30a6197b7d7b6580
2254 #. type: Plain text
2255 #: build/C/man2/fanotify_init.2:260
2256 msgid ""
2257 "The I<event_f_flags> argument is not checked for invalid flags.  Flags that "
2258 "are intended only for internal use, such as B<FMODE_EXEC>, can be set, and "
2259 "will consequently be set for the file descriptors returned when reading from "
2260 "the fanotify file descriptor."
2261 msgstr ""
2262 "I<event_f_flags> 引き数に無効なフラグがないかのチェックが行われない。 "
2263 "B<FMODE_EXEC> などの内部での使用のみが意図されたフラグを指定することができ、 "
2264 "その場合 fanotify ファイルディスクリプターからの読み出し時に返されるファイル"
2265 "ディスクリプターにそのフラグがセットされる。"
2266
2267 #. type: Plain text
2268 #: build/C/man2/fanotify_init.2:263
2269 msgid "B<fanotify_mark>(2), B<fanotify>(7)"
2270 msgstr "B<fanotify_mark>(2), B<fanotify>(7)"
2271
2272 #. type: TH
2273 #: build/C/man2/fanotify_mark.2:24
2274 #, no-wrap
2275 msgid "FANOTIFY_MARK"
2276 msgstr "FANOTIFY_MARK"
2277
2278 #. type: Plain text
2279 #: build/C/man2/fanotify_mark.2:28
2280 msgid ""
2281 "fanotify_mark - add, remove, or modify an fanotify mark on a filesystem "
2282 "object"
2283 msgstr ""
2284 "fanotify_mark - ファイルシステムオブジェクトへの fanotify マークの追加、削"
2285 "除、変更"
2286
2287 #. type: Plain text
2288 #: build/C/man2/fanotify_mark.2:31
2289 #, no-wrap
2290 msgid "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2291 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2292
2293 #. type: Plain text
2294 #: build/C/man2/fanotify_mark.2:35
2295 #, no-wrap
2296 msgid ""
2297 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2298 "B<                  uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2299 msgstr ""
2300 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2301 "B<                  uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2302
2303 #. type: Plain text
2304 #: build/C/man2/fanotify_mark.2:44
2305 msgid ""
2306 "B<fanotify_mark>(2)  adds, removes, or modifies an fanotify mark on a "
2307 "filesystem object.  The caller must have read permission on the filesystem "
2308 "object that is to be marked."
2309 msgstr ""
2310 "B<fanotify_mark>(2) はファイルシステムオブジェクトに対する fanotify マークの"
2311 "追加、削除、変更を行う。 呼び出し元はマークを付けるファイルシステムオブジェク"
2312 "トに対する読み出し許可を持っていなければならない。"
2313
2314 #. type: Plain text
2315 #: build/C/man2/fanotify_mark.2:49
2316 msgid ""
2317 "The I<fanotify_fd> argument is a file descriptor returned by "
2318 "B<fanotify_init>(2)."
2319 msgstr ""
2320 "I<fanotify_fd> 引き数は B<fanotify_init>(2) で返されたファイルディスクリプ"
2321 "ターである。"
2322
2323 #. type: Plain text
2324 #: build/C/man2/fanotify_mark.2:53
2325 msgid ""
2326 "I<flags> is a bit mask describing the modification to perform.  It must "
2327 "include exactly one of the following values:"
2328 msgstr ""
2329 "I<flags> は実行する操作内容を示すビットマスクである。 以下の値のいずれか一つ"
2330 "だけを指定しなければならない。"
2331
2332 #. type: TP
2333 #: build/C/man2/fanotify_mark.2:53
2334 #, no-wrap
2335 msgid "B<FAN_MARK_ADD>"
2336 msgstr "B<FAN_MARK_ADD>"
2337
2338 #. type: Plain text
2339 #: build/C/man2/fanotify_mark.2:62
2340 msgid ""
2341 "The events in I<mask> will be added to the mark mask (or to the ignore "
2342 "mask).  I<mask> must be nonempty or the error B<EINVAL> will occur."
2343 msgstr ""
2344 "I<mask> のイベントを mark マスク (もしくは ignore マスク) に追加する。 "
2345 "I<mask> は空であってはいけない。 空の場合はエラー B<EINVAL> が発生する。"
2346
2347 #. type: TP
2348 #: build/C/man2/fanotify_mark.2:62
2349 #, no-wrap
2350 msgid "B<FAN_MARK_REMOVE>"
2351 msgstr "B<FAN_MARK_REMOVE>"
2352
2353 #. type: Plain text
2354 #: build/C/man2/fanotify_mark.2:71
2355 msgid ""
2356 "The events in argument I<mask> will be removed from the mark mask (or from "
2357 "the ignore mask).  I<mask> must be nonempty or the error B<EINVAL> will "
2358 "occur."
2359 msgstr ""
2360 "引き数 I<mask> のイベントを mark マスク (もしくは ignore マスク) から削除す"
2361 "る。 I<mask> は空であってはいけない。 空の場合はエラー B<EINVAL>が発生する。"
2362
2363 #. type: TP
2364 #: build/C/man2/fanotify_mark.2:71
2365 #, no-wrap
2366 msgid "B<FAN_MARK_FLUSH>"
2367 msgstr "B<FAN_MARK_FLUSH>"
2368
2369 #. type: Plain text
2370 #: build/C/man2/fanotify_mark.2:86
2371 msgid ""
2372 "Remove either all mount or all non-mount marks from the fanotify group.  If "
2373 "I<flags> contains B<FAN_MARK_MOUNT>, all marks for mounts are removed from "
2374 "the group.  Otherwise, all marks for directories and files are removed.  No "
2375 "flag other than B<FAN_MARK_MOUNT> can be used in conjunction with "
2376 "B<FAN_MARK_FLUSH>.  I<mask> is ignored."
2377 msgstr ""
2378 "fanotify グループから全てのマウント mark か全てのマウント以外の mark を削除す"
2379 "る。 I<flag> に B<FAN_MARK_MOUNT> が含まれる場合、 マウントに対する全ての "
2380 "mark がそのグループから削除される。 含まれない場合は、 ディレクトリとファイル"
2381 "に対する全ての mark が削除される。 B<FAN_MARK_MOUNT> 以外のフラグを "
2382 "B<FAN_MARK_FLUSH> と組み合わせて使うことはできない。 I<mask> は無視される。"
2383
2384 #. type: Plain text
2385 #: build/C/man2/fanotify_mark.2:90
2386 msgid ""
2387 "If none of the values above is specified, or more than one is specified, the "
2388 "call fails with the error B<EINVAL>."
2389 msgstr ""
2390 "上記のどの値も指定されなかった場合、 または 2 つ以上の値が指定された場合、 呼"
2391 "び出しはエラー B<EINVAL> で失敗する。"
2392
2393 #. type: Plain text
2394 #: build/C/man2/fanotify_mark.2:94
2395 msgid ""
2396 "In addition, zero or more of the following values may be ORed into I<flags>:"
2397 msgstr ""
2398 "これに加えて、 I<flags> に以下の値を 0 個以上ビット単位の論理和 (OR) で指定で"
2399 "きる。"
2400
2401 #. type: TP
2402 #: build/C/man2/fanotify_mark.2:94
2403 #, no-wrap
2404 msgid "B<FAN_MARK_DONT_FOLLOW>"
2405 msgstr "B<FAN_MARK_DONT_FOLLOW>"
2406
2407 #. type: Plain text
2408 #: build/C/man2/fanotify_mark.2:105
2409 msgid ""
2410 "If I<pathname> is a symbolic link, mark the link itself, rather than the "
2411 "file to which it refers.  (By default, B<fanotify_mark>()  dereferences "
2412 "I<pathname> if it is a symbolic link.)"
2413 msgstr ""
2414 "I<pathname> がシンボリックリンクの場合、 リンクが参照するファイルではなく、 "
2415 "リンク自身にマークを付ける (デフォルトでは B<fanotify_mark>() は I<pathname> "
2416 "がシンボリックリンクの場合シンボリックリンクの展開を行う)。"
2417
2418 #. type: TP
2419 #: build/C/man2/fanotify_mark.2:105
2420 #, no-wrap
2421 msgid "B<FAN_MARK_ONLYDIR>"
2422 msgstr "B<FAN_MARK_ONLYDIR>"
2423
2424 #. type: Plain text
2425 #: build/C/man2/fanotify_mark.2:110
2426 msgid ""
2427 "If the filesystem object to be marked is not a directory, the error "
2428 "B<ENOTDIR> shall be raised."
2429 msgstr ""
2430 "マークが付けられたファイルシステムオブジェクトがディレクトリでない場合、 エ"
2431 "ラー B<ENOTDIR> が発生する。"
2432
2433 #. type: TP
2434 #: build/C/man2/fanotify_mark.2:110
2435 #, no-wrap
2436 msgid "B<FAN_MARK_MOUNT>"
2437 msgstr "B<FAN_MARK_MOUNT>"
2438
2439 #. type: Plain text
2440 #: build/C/man2/fanotify_mark.2:121
2441 msgid ""
2442 "Mark the mount point specified by I<pathname>.  If I<pathname> is not itself "
2443 "a mount point, the mount point containing I<pathname> will be marked.  All "
2444 "directories, subdirectories, and the contained files of the mount point will "
2445 "be monitored."
2446 msgstr ""
2447 "I<pathname> で指定されたマウントポイントにマークを付ける。 I<pathname> がマウ"
2448 "ントポイント自身ではない場合、 I<pathname> を含むマウントポイントがマークされ"
2449 "る。 マウントポイントに含まれる全てのディレクトリ、 サブディレクトリ、 その中"
2450 "のファイルが監視される。"
2451
2452 #. type: TP
2453 #: build/C/man2/fanotify_mark.2:121
2454 #, no-wrap
2455 msgid "B<FAN_MARK_IGNORED_MASK>"
2456 msgstr "B<FAN_MARK_IGNORED_MASK>"
2457
2458 #. type: Plain text
2459 #: build/C/man2/fanotify_mark.2:126
2460 msgid ""
2461 "The events in I<mask> shall be added to or removed from the ignore mask."
2462 msgstr "I<mask> のイベントの ignore マスクへの追加、もしくは削除を行う。"
2463
2464 #. type: TP
2465 #: build/C/man2/fanotify_mark.2:126
2466 #, no-wrap
2467 msgid "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2468 msgstr "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2469
2470 #. type: Plain text
2471 #: build/C/man2/fanotify_mark.2:132
2472 msgid ""
2473 "The ignore mask shall survive modify events.  If this flag is not set, the "
2474 "ignore mask is cleared when a modify event occurs for the ignored file or "
2475 "directory."
2476 msgstr ""
2477 "ignore マスクは変更イベントが発生しても残り続ける。 このフラグがセットされて"
2478 "いない場合、 無視するファイルやディレクトリに対して変更イベントが発生した際"
2479 "に ignore マスクはクリアされる。"
2480
2481 #. type: Plain text
2482 #: build/C/man2/fanotify_mark.2:136
2483 msgid ""
2484 "I<mask> defines which events shall be listened for (or which shall be "
2485 "ignored).  It is a bit mask composed of the following values:"
2486 msgstr ""
2487 "I<mask> はどのイベントに対して通知を受けるか (もしくはどのイベントを無視する"
2488 "か) を定義する。  以下の値から構成されるビットマスクである。"
2489
2490 #. type: Plain text
2491 #: build/C/man2/fanotify_mark.2:139
2492 msgid ""
2493 "Create an event when a file or directory (but see BUGS) is accessed (read)."
2494 msgstr ""
2495 "ファイルやディレクトリへのアクセス (読み出し) があった際にイベントを作成する "
2496 "(「バグ」も参照)。"
2497
2498 #. type: Plain text
2499 #: build/C/man2/fanotify_mark.2:142
2500 msgid "Create an event when a file is modified (write)."
2501 msgstr "ファイルが変更された (書き込み) 際にイベントを作成する。"
2502
2503 #. type: Plain text
2504 #: build/C/man2/fanotify_mark.2:145
2505 msgid "Create an event when a writable file is closed."
2506 msgstr "書き込み可能ファイルがクローズされた際にイベントを作成する。"
2507
2508 #. type: Plain text
2509 #: build/C/man2/fanotify_mark.2:148
2510 msgid "Create an event when a read-only file or directory is closed."
2511 msgstr ""
2512 "読み出し専用のファイルやディレクトリがクローズされた際にイベントを作成する。"
2513
2514 #. type: Plain text
2515 #: build/C/man2/fanotify_mark.2:151
2516 msgid "Create an event when a file or directory is opened."
2517 msgstr "ファイルやディレクトリがオープンされた際にイベントを作成する。"
2518
2519 #. type: Plain text
2520 #: build/C/man2/fanotify_mark.2:159
2521 msgid ""
2522 "Create an event when a permission to open a file or directory is requested.  "
2523 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2524 "B<FAN_CLASS_CONTENT> is required."
2525 msgstr ""
2526 "ファイルやディレクトリをオープンするアクセス許可が要求された際にイベントを作"
2527 "成する。 fanotify ファイルディスクリプターが B<FAN_CLASS_PRE_CONTENT> か "
2528 "B<FAN_CLASS_CONTENT> を指定されて作成されている必要がある。"
2529
2530 #. type: Plain text
2531 #: build/C/man2/fanotify_mark.2:167
2532 msgid ""
2533 "Create an event when a permission to read a file or directory is requested.  "
2534 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2535 "B<FAN_CLASS_CONTENT> is required."
2536 msgstr ""
2537 "ファイルやディレクトリを読み出すアクセス許可が要求された際にイベントを作成す"
2538 "る。 fanotify ファイルディスクリプターが B<FAN_CLASS_PRE_CONTENT> か "
2539 "B<FAN_CLASS_CONTENT> を指定されて作成されている必要がある。"
2540
2541 #. type: TP
2542 #: build/C/man2/fanotify_mark.2:167
2543 #, no-wrap
2544 msgid "B<FAN_ONDIR>"
2545 msgstr "B<FAN_ONDIR>"
2546
2547 #. type: Plain text
2548 #: build/C/man2/fanotify_mark.2:176
2549 msgid ""
2550 "Create events for directories\\(emfor example, when B<opendir>(3), "
2551 "B<readdir>(3)  (but see BUGS), and B<closedir>(3)  are called.  Without this "
2552 "flag, only events for files are created."
2553 msgstr ""
2554 "ディレクトリに対するイベントを作成する。 例えば B<opendir>(3)、 "
2555 "B<readdir>(3) (ただし「バグ」も参照)、 B<closedir>(3) が呼び出された場合。 こ"
2556 "のフラグが指定されなかった場合、 ファイルに対するイベントだけが作成される。"
2557
2558 #. type: TP
2559 #: build/C/man2/fanotify_mark.2:176
2560 #, no-wrap
2561 msgid "B<FAN_EVENT_ON_CHILD>"
2562 msgstr "B<FAN_EVENT_ON_CHILD>"
2563
2564 #. type: Plain text
2565 #: build/C/man2/fanotify_mark.2:184
2566 msgid ""
2567 "Events for the immediate children of marked directories shall be created.  "
2568 "The flag has no effect when marking mounts.  Note that events are not "
2569 "generated for children of the subdirectories of marked directories.  To "
2570 "monitor complete directory trees it is necessary to mark the relevant mount."
2571 msgstr ""
2572 "マークされたディレクトリの直下のエントリーに対してイベントを作成する。 このフ"
2573 "ラグはマウントにマークを付ける際には効果はない。 マークされたディレクトリのサ"
2574 "ブディレクトリのエントリーに対してはイベントが作成されない点に注意すること。 "
2575 "ディレクトリツリー全体を監視するには、 関連するマウントにマークを付ける必要が"
2576 "ある。"
2577
2578 #. type: Plain text
2579 #: build/C/man2/fanotify_mark.2:186
2580 msgid "The following composed value is defined:"
2581 msgstr "以下の組み合わせ値が定義されている。"
2582
2583 #. type: Plain text
2584 #: build/C/man2/fanotify_mark.2:190
2585 msgid "A file is closed (B<FAN_CLOSE_WRITE>|B<FAN_CLOSE_NOWRITE>)."
2586 msgstr "ファイルがクローズされた (B<FAN_CLOSE_WRITE>|B<FAN_CLOSE_NOWRITE>)。"
2587
2588 #. type: Plain text
2589 #: build/C/man2/fanotify_mark.2:195
2590 msgid ""
2591 "The filesystem object to be marked is determined by the file descriptor "
2592 "I<dirfd> and the pathname specified in I<pathname>:"
2593 msgstr ""
2594 "マークを付けるファイルシステムオブジェクトは、 ファイルディスクリプター "
2595 "I<dirfd> と I<pathname> で指定されたパス名から決定される。"
2596
2597 #. type: Plain text
2598 #: build/C/man2/fanotify_mark.2:201
2599 msgid ""
2600 "If I<pathname> is NULL, I<dirfd> defines the filesystem object to be marked."
2601 msgstr ""
2602 "I<pathname> が NULL の場合、 I<dirfd> でマークを付けるファイルシステムオブ"
2603 "ジェクトが定義される。"
2604
2605 #. type: Plain text
2606 #: build/C/man2/fanotify_mark.2:209
2607 msgid ""
2608 "If I<pathname> is NULL, and I<dirfd> takes the special value B<AT_FDCWD>, "
2609 "the current working directory is to be marked."
2610 msgstr ""
2611 "I<pathname> が NULL で、 I<dirfd> が特別な値 B<AT_FDCWD> の場合、 カレント"
2612 "ワーキングディレクトリがマークされる。"
2613
2614 #. type: Plain text
2615 #: build/C/man2/fanotify_mark.2:215
2616 msgid ""
2617 "If I<pathname> is absolute, it defines the filesystem object to be marked, "
2618 "and I<dirfd> is ignored."
2619 msgstr ""
2620 "I<pathname> が絶対パスの場合、 そのパス名によりマークを付けるファイルシステム"
2621 "オブジェクトが定義され、 I<dirfd> は無視される。"
2622
2623 #. type: Plain text
2624 #: build/C/man2/fanotify_mark.2:226
2625 msgid ""
2626 "If I<pathname> is relative, and I<dirfd> does not have the value "
2627 "B<AT_FDCWD>, then the filesystem object to be marked is determined by "
2628 "interpreting I<pathname> relative the directory referred to by I<dirfd>."
2629 msgstr ""
2630 "I<pathname> が相対パスで、 I<dirfd> が B<AT_FDCWD> でない場合、 マークを付け"
2631 "るファイルシステムオブジェクトは I<dirfd> が参照するディレクトリに対する相対"
2632 "パス I<pathname> を解釈して決定される。"
2633
2634 #. type: Plain text
2635 #: build/C/man2/fanotify_mark.2:236
2636 msgid ""
2637 "If I<pathname> is relative, and I<dirfd> has the value B<AT_FDCWD>, then the "
2638 "filesystem object to be marked is determined by interpreting I<pathname> "
2639 "relative the current working directory."
2640 msgstr ""
2641 "I<pathname> が相対パスで、 I<dirfd> が B<AT_FDCWD> の場合、 マークを付ける"
2642 "ファイルシステムオブジェクトはカレントワーキングディレクトリに対する相対パス "
2643 "I<pathname> を解釈して決定される。"
2644
2645 #. type: Plain text
2646 #: build/C/man2/fanotify_mark.2:243
2647 msgid ""
2648 "On success, B<fanotify_mark>()  returns 0.  On error, -1 is returned, and "
2649 "I<errno> is set to indicate the error."
2650 msgstr ""
2651 "成功すると B<fanotify_mark>() は 0 を返す。 エラーの場合、 -1 を返し、 "
2652 "I<errno> にエラーの原因を示す値を設定する。"
2653
2654 #. type: TP
2655 #: build/C/man2/fanotify_mark.2:244 build/C/man2/inotify_add_watch.2:88
2656 #: build/C/man2/inotify_rm_watch.2:56
2657 #, no-wrap
2658 msgid "B<EBADF>"
2659 msgstr "B<EBADF>"
2660
2661 #. type: Plain text
2662 #: build/C/man2/fanotify_mark.2:248
2663 msgid "An invalid file descriptor was passed in I<fanotify_fd>."
2664 msgstr "無効なファイルディスクリプターが I<fanotify_fd> で渡された。"
2665
2666 #. type: Plain text
2667 #: build/C/man2/fanotify_mark.2:257
2668 msgid ""
2669 "An invalid value was passed in I<flags> or I<mask>, or I<fanotify_fd> was "
2670 "not an fanotify file descriptor."
2671 msgstr ""
2672 "無効な値が I<flags> か I<mask> に指定されたか、 I<fanotify_fd> が fanotify "
2673 "ファイルディスクリプターでなかった。"
2674
2675 #. type: Plain text
2676 #: build/C/man2/fanotify_mark.2:265
2677 msgid ""
2678 "The fanotify file descriptor was opened with B<FAN_CLASS_NOTIF> and mask "
2679 "contains a flag for permission events (B<FAN_OPEN_PERM> or "
2680 "B<FAN_ACCESS_PERM>)."
2681 msgstr ""
2682 "fanotify ファイルディスクリプターが B<FAN_CLASS_NOTIF> でオープンされたが、 "
2683 "アクセス許可イベント (B<FAN_OPEN_PERM> か B<FAN_ACCESS_PERM>) のフラグがマス"
2684 "クに含まれている。"
2685
2686 #. type: Plain text
2687 #: build/C/man2/fanotify_mark.2:274
2688 msgid ""
2689 "The filesystem object indicated by I<dirfd> and I<pathname> does not exist.  "
2690 "This error also occurs when trying to remove a mark from an object which is "
2691 "not marked."
2692 msgstr ""
2693 "I<dirfd> と I<pathname> で指定されたファイルシステムオブジェクトが存在しな"
2694 "い。 このエラーはマークされていないオブジェクトからマークを削除しようとした場"
2695 "合にも発生する。"
2696
2697 #. type: Plain text
2698 #: build/C/man2/fanotify_mark.2:277
2699 msgid "The necessary memory could not be allocated."
2700 msgstr "必要なメモリを割り当てできなかった。"
2701
2702 #. type: TP
2703 #: build/C/man2/fanotify_mark.2:277 build/C/man2/inotify_add_watch.2:112
2704 #, no-wrap
2705 msgid "B<ENOSPC>"
2706 msgstr "B<ENOSPC>"
2707
2708 #. type: Plain text
2709 #: build/C/man2/fanotify_mark.2:283
2710 msgid ""
2711 "The number of marks exceeds the limit of 8192 and the B<FAN_UNLIMITED_MARKS> "
2712 "flag was not specified when the fanotify file descriptor was created with "
2713 "B<fanotify_init>(2)."
2714 msgstr ""
2715 "マークの数が 8192 の上限を超過し、 B<fanotify_init>(2) で fanotify ファイル"
2716 "ディスクリプターが作成された際に B<FAN_UNLIMITED_MARKS> フラグが指定されてい"
2717 "なかった。"
2718
2719 #. type: Plain text
2720 #: build/C/man2/fanotify_mark.2:289
2721 msgid ""
2722 "This kernel does not implement B<fanotify_mark>().  The fanotify API is "
2723 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
2724 msgstr ""
2725 "このカーネルでは B<fanotify_mark>() が実装されていない。 fanotify API が利用"
2726 "できるのは、 カーネルで B<CONFIG_FANOTIFY> が有効になっている場合だけである。"
2727
2728 #. type: TP
2729 #: build/C/man2/fanotify_mark.2:289
2730 #, no-wrap
2731 msgid "B<ENOTDIR>"
2732 msgstr "B<ENOTDIR>"
2733
2734 #. type: Plain text
2735 #: build/C/man2/fanotify_mark.2:299
2736 msgid ""
2737 "I<flags> contains B<FAN_MARK_ONLYDIR>, and I<dirfd> and I<pathname> do not "
2738 "specify a directory."
2739 msgstr ""
2740 "I<flags> に B<FAN_MARK_ONLYDIR> が含まれているが、 I<dirfd> と I<pathname> が"
2741 "ディレクトリを指定していない。"
2742
2743 #. type: Plain text
2744 #: build/C/man2/fanotify_mark.2:303
2745 msgid ""
2746 "B<fanotify_mark>()  was introduced in version 2.6.36 of the Linux kernel and "
2747 "enabled in version 2.6.37."
2748 msgstr ""
2749 "B<fanotify_mark>() は Linux カーネルのバージョン 2.6.36 で導入され、 バージョ"
2750 "ン 2.6.37 で有効になった。"
2751
2752 #. type: Plain text
2753 #: build/C/man2/fanotify_mark.2:307
2754 msgid "The following bugs were present in Linux kernels before version 3.16:"
2755 msgstr "バージョン 3.16 より前の Linux カーネルでは以下のバグが存在した。"
2756
2757 #.  Fixed by commit 0a8dd2db579f7a0ac7033d6b857c3d5dbaa77563
2758 #. type: Plain text
2759 #: build/C/man2/fanotify_mark.2:317
2760 msgid ""
2761 "If I<flags> contains B<FAN_MARK_FLUSH>, I<dirfd> and I<pathname> must "
2762 "specify a valid filesystem object, even though this object is not used."
2763 msgstr ""
2764 "I<flags> に B<FAN_MARK_FLUSH> が指定されている場合、 たとえそのオブジェクトが"
2765 "使用されない場合であっても、  I<dirfd> と I<pathname> には有効なファイルシス"
2766 "テムオブジェクトを指定しなければならない。"
2767
2768 #.  Fixed by commit d4c7cf6cffb1bc711a833b5e304ba5bcfe76398b
2769 #. type: Plain text
2770 #: build/C/man2/fanotify_mark.2:323
2771 msgid "B<readdir>(2)  does not generate a B<FAN_ACCESS> event."
2772 msgstr "B<readdir>(2) は B<FAN_ACCESS> イベントを生成しない。"
2773
2774 #.  Fixed by commit cc299a98eb13a9853675a9cbb90b30b4011e1406
2775 #. type: Plain text
2776 #: build/C/man2/fanotify_mark.2:331
2777 msgid ""
2778 "If B<fanotify_mark>(2)  is called with B<FAN_MARK_FLUSH>, I<flags> is not "
2779 "checked for invalid values."
2780 msgstr ""
2781 "B<fanotify_mark>(2) が B<FAN_MARK_FLUSH> 付きで呼び出された場合、 I<flags> の"
2782 "値が無効かはチェックされない。"
2783
2784 #. type: Plain text
2785 #: build/C/man2/fanotify_mark.2:334
2786 msgid "B<fanotify_init>(2), B<fanotify>(7)"
2787 msgstr "B<fanotify_init>(2), B<fanotify>(7)"
2788
2789 #. type: TH
2790 #: build/C/man7/inotify.7:27
2791 #, no-wrap
2792 msgid "INOTIFY"
2793 msgstr "INOTIFY"
2794
2795 #. type: Plain text
2796 #: build/C/man7/inotify.7:30
2797 msgid "inotify - monitoring filesystem events"
2798 msgstr "inotify - ファイルシステムイベントを監視する"
2799
2800 #. type: Plain text
2801 #: build/C/man7/inotify.7:38
2802 msgid ""
2803 "The I<inotify> API provides a mechanism for monitoring filesystem events.  "
2804 "Inotify can be used to monitor individual files, or to monitor directories.  "
2805 "When a directory is monitored, inotify will return events for the directory "
2806 "itself, and for files inside the directory."
2807 msgstr ""
2808 "I<inotify> API はファイルシステムイベントを監視するための機構を提供する。 "
2809 "inotify は個々のファイルやディレクトリを監視するのに使える。 ディレクトリを監"
2810 "視する場合、inotify はディレクトリ自身と ディレクトリ内のファイルのイベントを"
2811 "返す。"
2812
2813 #. type: Plain text
2814 #: build/C/man7/inotify.7:40
2815 msgid "The following system calls are used with this API:"
2816 msgstr "この API では以下のシステムコールが使用される。"
2817
2818 #. type: Plain text
2819 #: build/C/man7/inotify.7:51
2820 msgid ""
2821 "B<inotify_init>(2)  creates an inotify instance and returns a file "
2822 "descriptor referring to the inotify instance.  The more recent "
2823 "B<inotify_init1>(2)  is like B<inotify_init>(2), but has a I<flags> argument "
2824 "that provides access to some extra functionality."
2825 msgstr ""
2826 "B<inotify_init>(2)  は inotify インスタンスを作成し、inotify インスタンスを参"
2827 "照する ファイルディスクリプターを返す。 より新しい B<inotify_init1>(2)  も "
2828 "B<inotify_init>(2)  と同様だが、 こちらにはいくつかの追加の機能を利用するため"
2829 "の I<flags> 引き数がある。"
2830
2831 #. type: Plain text
2832 #: build/C/man7/inotify.7:64
2833 msgid ""
2834 "B<inotify_add_watch>(2)  manipulates the \"watch list\" associated with an "
2835 "inotify instance.  Each item (\"watch\") in the watch list specifies the "
2836 "pathname of a file or directory, along with some set of events that the "
2837 "kernel should monitor for the file referred to by that pathname.  "
2838 "B<inotify_add_watch>(2)  either creates a new watch item, or modifies an "
2839 "existing watch.  Each watch has a unique \"watch descriptor\", an integer "
2840 "returned by B<inotify_add_watch>(2)  when the watch is created."
2841 msgstr ""
2842 "B<inotify_add_watch>(2)  は inotify インスタンスに関連づけられた「監視対象 "
2843 "(watch) リスト」を操作する。 監視対象リストの各アイテム (\"watch\") は、 ファ"
2844 "イルまたはディレクトリのパス名と、 そのパス名で参照されるファイルに対して "
2845 "カーネルが監視する複数のイベントの集合を指定する。 B<inotify_add_watch>(2)  "
2846 "は新しい監視アイテムの作成や既存の監視対象の変更ができる。 各監視対象は一意の"
2847 "「監視対象ディスクリプター」を持つ。 これは監視対象を作成したときに "
2848 "B<inotify_add_watch>(2)  から返される整数である。"
2849
2850 #. type: Plain text
2851 #: build/C/man7/inotify.7:70
2852 msgid ""
2853 "When events occur for monitored files and directories, those events are made "
2854 "available to the application as structured data that can be read from the "
2855 "inotify file descriptor using B<read>(2)  (see below)."
2856 msgstr ""
2857 "監視しているファイルやディレクトリでイベントが起こると、 それらのイベントはア"
2858 "プリケーションから inotify ファイルディスクリプターから B<read>(2) を使って構"
2859 "造化データとして読み出すことができる (下記参照)。"
2860
2861 #. type: Plain text
2862 #: build/C/man7/inotify.7:73
2863 msgid "B<inotify_rm_watch>(2)  removes an item from an inotify watch list."
2864 msgstr ""
2865 "B<inotify_rm_watch>(2)  は inotify の監視対象リストからアイテムを削除する。"
2866
2867 #. type: Plain text
2868 #: build/C/man7/inotify.7:80
2869 msgid ""
2870 "When all file descriptors referring to an inotify instance have been closed "
2871 "(using B<close>(2)), the underlying object and its resources are freed for "
2872 "reuse by the kernel; all associated watches are automatically freed."
2873 msgstr ""
2874 "inotify インスタンスを指している 全てのファイルディスクリプターが "
2875 "(B<close>(2) を使って) クローズされた場合、 その下層にあるオブジェクトとその"
2876 "リソースは、 カーネルで再利用するために解放される。 関連が切られた監視対象は"
2877 "自動的に解放される。"
2878
2879 #. type: Plain text
2880 #: build/C/man7/inotify.7:89
2881 msgid ""
2882 "With careful programming, an application can use inotify to efficiently "
2883 "monitor and cache the state of a set of filesystem objects.  However, robust "
2884 "applications should allow for the fact that bugs in the monitoring logic or "
2885 "races of the kind described below may leave the cache inconsistent with the "
2886 "filesystem state.  It is probably wise to to do some consistency checking, "
2887 "and rebuild the cache when inconsistencies are detected."
2888 msgstr ""
2889 "注意深くプログラミングすることで、 アプリケーションは inotify を使ってファイ"
2890 "ルシステムオブジェクトの集合の状態を効率的に監視しキャッシュしておくことがで"
2891 "きる。 しかしながら、ロバストなアプリケーションでは、監視ロジックのバグや以下"
2892 "に説明があるような種類の競合条件によりファイルシステムの状態とキャッシュが一"
2893 "致しない状態になることがあるという事実も考慮に入れておくべきである。 おそらく"
2894 "何らかの一貫性のチェックを行い、不一致が検出された場合にはキャッシュを再構築"
2895 "するのが懸命だろう。"
2896
2897 #. type: SS
2898 #: build/C/man7/inotify.7:89
2899 #, no-wrap
2900 msgid "Reading events from an inotify file descriptor"
2901 msgstr "inotify ファイルディスクリプターからのイベントの読み出し"
2902
2903 #. type: Plain text
2904 #: build/C/man7/inotify.7:102
2905 msgid ""
2906 "To determine what events have occurred, an application B<read>(2)s from the "
2907 "inotify file descriptor.  If no events have so far occurred, then, assuming "
2908 "a blocking file descriptor, B<read>(2)  will block until at least one event "
2909 "occurs (unless interrupted by a signal, in which case the call fails with "
2910 "the error B<EINTR>; see B<signal>(7))."
2911 msgstr ""
2912 "どのようなイベントが起こっていたかを知るには、 アプリケーションで inotify "
2913 "ファイルディスクリプターを B<read>(2)  すればよい。 これまでに何もイベントが"
2914 "起こっていない場合、 停止 (blocking) モードのファイルディスクリプターであれ"
2915 "ば、 少なくとも 1 つのイベントが起こるまで B<read>(2)  は停止する (シグナルに"
2916 "より割り込まれなかった場合。 シグナルによる割り込みがあった場合、呼び出しはエ"
2917 "ラー B<EINTR> で失敗する。 B<signal>(7)  参照)。"
2918
2919 #. type: Plain text
2920 #: build/C/man7/inotify.7:106
2921 msgid ""
2922 "Each successful B<read>(2)  returns a buffer containing one or more of the "
2923 "following structures:"
2924 msgstr ""
2925 "B<read>(2)  が成功すると、以下の構造体を 1 つ以上含むバッファーが返される:"
2926
2927 #.  FIXME . The type of the 'wd' field should probably be "int32_t".
2928 #.  I submitted a patch to fix this.  See the LKML thread
2929 #.  "[patch] Fix type errors in inotify interfaces", 18 Nov 2008
2930 #.  Glibc bug filed: http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
2931 #. type: Plain text
2932 #: build/C/man7/inotify.7:121
2933 #, no-wrap
2934 msgid ""
2935 "struct inotify_event {\n"
2936 "    int      wd;       /* Watch descriptor */\n"
2937 "    uint32_t mask;     /* Mask describing event */\n"
2938 "    uint32_t cookie;   /* Unique cookie associating related\n"
2939 "                          events (for rename(2)) */\n"
2940 "    uint32_t len;      /* Size of I<name> field */\n"
2941 "    char     name[];   /* Optional null-terminated name */\n"
2942 "};\n"
2943 msgstr ""
2944 "struct inotify_event {\n"
2945 "    int      wd;       /* 監視対象ディスクリプター */\n"
2946 "    uint32_t mask;     /* イベントを示すマスク */\n"
2947 "    uint32_t cookie;   /* 関連するイベント群を関連づける\n"
2948 "                          一意なクッキー (rename(2) 用) */\n"
2949 "    uint32_t len;      /* \\(aqname\\(aq フィールドのサイズ */\n"
2950 "    char     name[];   /* ヌルで終端された任意の名前 */\n"
2951 "};\n"
2952
2953 #. type: Plain text
2954 #: build/C/man7/inotify.7:128
2955 msgid ""
2956 "I<wd> identifies the watch for which this event occurs.  It is one of the "
2957 "watch descriptors returned by a previous call to B<inotify_add_watch>(2)."
2958 msgstr ""
2959 "I<wd> はイベント発生の監視対象を指定する。 これは、前もって行われた "
2960 "B<inotify_add_watch>(2)  呼び出しで返された監視対象ディスクリプターのうちの "
2961 "1 つである。"
2962
2963 #. type: Plain text
2964 #: build/C/man7/inotify.7:131
2965 msgid ""
2966 "I<mask> contains bits that describe the event that occurred (see below)."
2967 msgstr ""
2968 "I<mask> には発生したイベント (下記参照) を記述するためのビットが含まれる。"
2969
2970 #. type: Plain text
2971 #: build/C/man7/inotify.7:143
2972 msgid ""
2973 "I<cookie> is a unique integer that connects related events.  Currently this "
2974 "is used only for rename events, and allows the resulting pair of "
2975 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events to be connected by the "
2976 "application.  For all other event types, I<cookie> is set to 0."
2977 msgstr ""
2978 "I<cookie> は関連するイベントを関連づけるための一意な整数である。\n"
2979 "現在のところ、この値は rename イベントに対してのみ使われており、\n"
2980 "結果のペアである B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントを\n"
2981 "アプリケーションで関連づけることができる。\n"
2982 "他のイベント種別の場合には、 I<cookie> は 0 に設定する。"
2983
2984 #. type: Plain text
2985 #: build/C/man7/inotify.7:152
2986 msgid ""
2987 "The I<name> field is present only when an event is returned for a file "
2988 "inside a watched directory; it identifies the file pathname relative to the "
2989 "watched directory.  This pathname is null-terminated, and may include "
2990 "further null bytes (\\(aq\\e0\\(aq) to align subsequent reads to a suitable "
2991 "address boundary."
2992 msgstr ""
2993 "I<name> フィールドは監視しているディレクトリ内のファイルに対して イベントが返"
2994 "される場合のためにだけ存在する。 監視するディレクトリからのファイルの相対パス"
2995 "名を表す。 このパス名はヌルで終端され、 その後の読み込みで適切なアドレス境界"
2996 "に調整するために、 さらにヌルバイト (\\(aq\\e0\\(aq) が含まれる場合もある。"
2997
2998 #. type: Plain text
2999 #: build/C/man7/inotify.7:162
3000 msgid ""
3001 "The I<len> field counts all of the bytes in I<name>, including the null "
3002 "bytes; the length of each I<inotify_event> structure is thus I<sizeof(struct "
3003 "inotify_event)+len>."
3004 msgstr ""
3005 "I<len> フィールドはヌルバイトを含む I<name> の全てのバイト数を表す。\n"
3006 "よって、 I<inotify_event> 構造体のサイズは \n"
3007 "I<sizeof(struct inotify_event)+len> である。"
3008
3009 #. type: Plain text
3010 #: build/C/man7/inotify.7:173
3011 msgid ""
3012 "The behavior when the buffer given to B<read>(2)  is too small to return "
3013 "information about the next event depends on the kernel version: in kernels "
3014 "before 2.6.21, B<read>(2)  returns 0; since kernel 2.6.21, B<read>(2)  fails "
3015 "with the error B<EINVAL>.  Specifying a buffer of size"
3016 msgstr ""
3017 "B<read>(2) に渡されたバッファーが小さすぎて次のイベントに関する情報を返せ\n"
3018 "ない場合の動作はカーネルのバージョンにより異なる。 2.6.21 より前のカー\n"
3019 "ネルでは、 B<read>(2) は 0 を返す。 2.6.21 以降のカーネルでは、\n"
3020 "B<read>(2) はエラー B<EINVAL> で失敗する。\n"
3021 "バッファーサイズとして"
3022
3023 #. type: Plain text
3024 #: build/C/man7/inotify.7:175
3025 #, no-wrap
3026 msgid "    sizeof(struct inotify_event) + NAME_MAX + 1\n"
3027 msgstr "    sizeof(struct inotify_event) + NAME_MAX + 1\n"
3028
3029 #. type: Plain text
3030 #: build/C/man7/inotify.7:177
3031 msgid "will be sufficient to read at least one event."
3032 msgstr "を指定すれば、少なくとも 1 イベントで読み出しを行うには十分である。"
3033
3034 #. type: SS
3035 #: build/C/man7/inotify.7:177
3036 #, no-wrap
3037 msgid "inotify events"
3038 msgstr "inotify イベント"
3039
3040 #. type: Plain text
3041 #: build/C/man7/inotify.7:197
3042 msgid ""
3043 "The B<inotify_add_watch>(2)  I<mask> argument and the I<mask> field of the "
3044 "I<inotify_event> structure returned when B<read>(2)ing an inotify file "
3045 "descriptor are both bit masks identifying inotify events.  The following "
3046 "bits can be specified in I<mask> when calling B<inotify_add_watch>(2)  and "
3047 "may be returned in the I<mask> field returned by B<read>(2):"
3048 msgstr ""
3049 "B<inotify_add_watch>(2)  の I<mask> 引き数と、inotify ファイル構造体を "
3050 "B<read>(2)  したときに返される I<inotify_event> 構造体の I<mask> フィールド"
3051 "は、ともに inotify イベントを識別するための ビットマスクである。 以下のビット"
3052 "が B<inotify_add_watch>(2)  を呼ぶときの I<mask> に指定可能であり、 "
3053 "B<read>(2)  で返される I<mask> フィールドで返される:"
3054
3055 #. type: TP
3056 #: build/C/man7/inotify.7:198
3057 #, no-wrap
3058 msgid "B<IN_ACCESS> (+)"
3059 msgstr "B<IN_ACCESS> (+)"
3060
3061 #. type: Plain text
3062 #: build/C/man7/inotify.7:203
3063 msgid "File was accessed (e.g., B<read>(2), B<execve>(2))."
3064 msgstr "(B<read>(2), B<execve>(2) などで) ファイルがアクセスされた。"
3065
3066 #. type: TP
3067 #: build/C/man7/inotify.7:203
3068 #, no-wrap
3069 msgid "B<IN_ATTRIB> (*)"
3070 msgstr "B<IN_ATTRIB> (*)"
3071
3072 #. type: Plain text
3073 #: build/C/man7/inotify.7:218
3074 msgid ""
3075 "Metadata changed\\(emfor example, permissions (e.g., B<chmod>(2)), "
3076 "timestamps (e.g., B<utimensat>(2)), extended attributes (B<setxattr>(2)), "
3077 "link count (since Linux 2.6.25; e.g., for the target of B<link>(2)  and for "
3078 "B<unlink>(2)), and user/group ID (e.g., B<chown>(2))."
3079 msgstr ""
3080 "メタデータが変更された。 メタデータとは、例えば、アクセス許可 (B<chmod>(2))、"
3081 "タイムスタンプ (B<utimensat>(2) など)、拡張属性 (B<setxattr>(2))、 リンクカウ"
3082 "ント (Linux 2.6.25 以降; B<link>(2) のリンク先や B<unlink>(2) など)、ユー"
3083 "ザー/グループ ID (B<chown>(2) など) などである。"
3084
3085 #. type: TP
3086 #: build/C/man7/inotify.7:218
3087 #, no-wrap
3088 msgid "B<IN_CLOSE_WRITE> (+)"
3089 msgstr "B<IN_CLOSE_WRITE> (+)"
3090
3091 #. type: Plain text
3092 #: build/C/man7/inotify.7:221
3093 msgid "File opened for writing was closed."
3094 msgstr "書き込みのためにオープンされたファイルがクローズされた。"
3095
3096 #. type: TP
3097 #: build/C/man7/inotify.7:221
3098 #, no-wrap
3099 msgid "B<IN_CLOSE_NOWRITE> (*)"
3100 msgstr "B<IN_CLOSE_NOWRITE> (*)"
3101
3102 #. type: Plain text
3103 #: build/C/man7/inotify.7:224
3104 msgid "File or directory not opened for writing was closed."
3105 msgstr ""
3106 "書き込み用としてはオープンされていないファイルやディレクトリがクローズされ"
3107 "た。"
3108
3109 #. type: TP
3110 #: build/C/man7/inotify.7:224
3111 #, no-wrap
3112 msgid "B<IN_CREATE> (+)"
3113 msgstr "B<IN_CREATE> (+)"
3114
3115 #. type: Plain text
3116 #: build/C/man7/inotify.7:234
3117 msgid ""
3118 "File/directory created in watched directory (e.g., B<open>(2)  B<O_CREAT>, "
3119 "B<mkdir>(2), B<link>(2), B<symlink>(2), B<bind>(2)  on a UNIX domain socket)."
3120 msgstr ""
3121 "監視対象ディレクトリ内でファイルやディレクトリが作成された (B<open>(2)  "
3122 "B<O_CREAT>, B<mkdir>(2), B<link>(2), B<symlink>(2), UNIX ドメインソケットに対"
3123 "する B<bind>(2) など)。"
3124
3125 #. type: TP
3126 #: build/C/man7/inotify.7:234
3127 #, no-wrap
3128 msgid "B<IN_DELETE> (+)"
3129 msgstr "B<IN_DELETE> (+)"
3130
3131 #. type: Plain text
3132 #: build/C/man7/inotify.7:237
3133 msgid "File/directory deleted from watched directory."
3134 msgstr "監視対象ディレクトリ内でファイルやディレクトリが削除された。"
3135
3136 #. type: TP
3137 #: build/C/man7/inotify.7:237
3138 #, no-wrap
3139 msgid "B<IN_DELETE_SELF>"
3140 msgstr "B<IN_DELETE_SELF>"
3141
3142 #. type: Plain text
3143 #: build/C/man7/inotify.7:248
3144 msgid ""
3145 "Watched file/directory was itself deleted.  (This event also occurs if an "
3146 "object is moved to another filesystem, since B<mv>(1)  in effect copies the "
3147 "file to the other filesystem and then deletes it from the original "
3148 "filesystem.)  In addition, an B<IN_IGNORED> event will subsequently be "
3149 "generated for the watch descriptor."
3150 msgstr ""
3151 "監視対象のファイルやディレクトリ自身が削除あれた。 (このイベントはオブジェク"
3152 "トが別のファイルシステムに移動された場合にも発生する。 B<mv>(1) は実際には別"
3153 "のファイルシステムにファイルをコピーした後、元のファイルシステムからそのファ"
3154 "イルを削除するからである。) また、 結果的に監視ディスクリプターに対して "
3155 "B<IN_IGNORED> イベントも生成される。"
3156
3157 #. type: TP
3158 #: build/C/man7/inotify.7:248
3159 #, no-wrap
3160 msgid "B<IN_MODIFY> (+)"
3161 msgstr "B<IN_MODIFY> (+)"
3162
3163 #. type: Plain text
3164 #: build/C/man7/inotify.7:253
3165 msgid "File was modified (e.g., B<write>(2), B<truncate>(2))."
3166 msgstr "ファイルが変更された (B<write>(2), B<truncate>(2) など)。"
3167
3168 #. type: TP
3169 #: build/C/man7/inotify.7:253
3170 #, no-wrap
3171 msgid "B<IN_MOVE_SELF>"
3172 msgstr "B<IN_MOVE_SELF>"
3173
3174 #. type: Plain text
3175 #: build/C/man7/inotify.7:256
3176 msgid "Watched file/directory was itself moved."
3177 msgstr "監視対象のディレクトリまたはファイル自身が移動された。"
3178
3179 #. type: TP
3180 #: build/C/man7/inotify.7:256
3181 #, no-wrap
3182 msgid "B<IN_MOVED_FROM> (+)"
3183 msgstr "B<IN_MOVED_FROM> (+)"
3184
3185 #. type: Plain text
3186 #: build/C/man7/inotify.7:260
3187 msgid ""
3188 "Generated for the directory containing the old filename when a file is "
3189 "renamed."
3190 msgstr ""
3191 "ファイル名の変更を行った際に変更前のファイル名が含まれるディレクトリに対して"
3192 "生成される。"
3193
3194 #. type: TP
3195 #: build/C/man7/inotify.7:260
3196 #, no-wrap
3197 msgid "B<IN_MOVED_TO> (+)"
3198 msgstr "B<IN_MOVED_TO> (+)"
3199
3200 #. type: Plain text
3201 #: build/C/man7/inotify.7:264
3202 msgid ""
3203 "Generated for the directory containing the new filename when a file is "
3204 "renamed."
3205 msgstr ""
3206 "ファイル名の変更を行った際に新しいファイル名が含まれるディレクトリに対して生"
3207 "成される。"
3208
3209 #. type: TP
3210 #: build/C/man7/inotify.7:264
3211 #, no-wrap
3212 msgid "B<IN_OPEN> (*)"
3213 msgstr "B<IN_OPEN> (*)"
3214
3215 #. type: Plain text
3216 #: build/C/man7/inotify.7:267
3217 msgid "File or directory was opened."
3218 msgstr "ファイルやディレクトリがオープンされた。"
3219
3220 #. type: Plain text
3221 #: build/C/man7/inotify.7:270
3222 msgid "When monitoring a directory:"
3223 msgstr "ディレクトリを監視する場合:"
3224
3225 #. type: Plain text
3226 #: build/C/man7/inotify.7:273
3227 msgid ""
3228 "the events marked above with an asterisk (*) can occur both for the "
3229 "directory itself and for objects inside the directory; and"
3230 msgstr ""
3231 "上記でアスタリスク (*) が付いたイベントは、 ディレクトリ自身とディレクトリ内"
3232 "のオブジェクトのどちらに対しても発生する。"
3233
3234 #. type: Plain text
3235 #: build/C/man7/inotify.7:276
3236 msgid ""
3237 "the events marked with a plus sign (+) occur only for objects inside the "
3238 "directory (not for the directory itself)."
3239 msgstr ""
3240 "上記でプラス記号 (+) が付いたイベントは、 ディレクトリ内のオブジェクトに対し"
3241 "てのみ発生する (ディレクトリ自身に対しては発生しない)。"
3242
3243 #. type: Plain text
3244 #: build/C/man7/inotify.7:282
3245 msgid ""
3246 "When events are generated for objects inside a watched directory, the "
3247 "I<name> field in the returned I<inotify_event> structure identifies the name "
3248 "of the file within the directory."
3249 msgstr ""
3250 "監視対象のディレクトリ内のオブジェクトに対してイベントが発生した場合、 "
3251 "I<inotify_event> 構造体で返される I<name> フィールドは、ディレクトリ内のファ"
3252 "イル名を表す。"
3253
3254 #. type: Plain text
3255 #: build/C/man7/inotify.7:290
3256 msgid ""
3257 "The B<IN_ALL_EVENTS> macro is defined as a bit mask of all of the above "
3258 "events.  This macro can be used as the I<mask> argument when calling "
3259 "B<inotify_add_watch>(2)."
3260 msgstr ""
3261 "B<IN_ALL_EVENTS> マクロは上記のイベント全てのマスクとして定義される。 このマ"
3262 "クロは B<inotify_add_watch>(2)  を呼び出すときの I<mask> 引き数として使える。"
3263
3264 #. type: Plain text
3265 #: build/C/man7/inotify.7:292
3266 msgid "Two additional convenience macros are defined:"
3267 msgstr "以下の 2 つの便利なマクロが定義されている。"
3268
3269 #. type: TP
3270 #: build/C/man7/inotify.7:293
3271 #, no-wrap
3272 msgid "B<IN_MOVE>"
3273 msgstr "B<IN_MOVE>"
3274
3275 #. type: Plain text
3276 #: build/C/man7/inotify.7:297
3277 msgid "Equates to B<IN_MOVED_FROM | IN_MOVED_TO>."
3278 msgstr "B<IN_MOVED_FROM | IN_MOVED_TO> と等価。"
3279
3280 #. type: TP
3281 #: build/C/man7/inotify.7:297
3282 #, no-wrap
3283 msgid "B<IN_CLOSE>"
3284 msgstr "B<IN_CLOSE>"
3285
3286 #. type: Plain text
3287 #: build/C/man7/inotify.7:301
3288 msgid "Equates to B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE>."
3289 msgstr "B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE> と等価。"
3290
3291 #. type: Plain text
3292 #: build/C/man7/inotify.7:307
3293 msgid ""
3294 "The following further bits can be specified in I<mask> when calling "
3295 "B<inotify_add_watch>(2):"
3296 msgstr ""
3297 "その他にも以下のビットを B<inotify_add_watch>(2)  を呼ぶときの I<mask> に指定"
3298 "できる:"
3299
3300 #. type: TP
3301 #: build/C/man7/inotify.7:308
3302 #, no-wrap
3303 msgid "B<IN_DONT_FOLLOW> (since Linux 2.6.15)"
3304 msgstr "B<IN_DONT_FOLLOW> (Linux 2.6.15 以降)"
3305
3306 #. type: Plain text
3307 #: build/C/man7/inotify.7:313
3308 msgid "Don't dereference I<pathname> if it is a symbolic link."
3309 msgstr ""
3310 "I<pathname> がシンボリックリンクである場合に辿らない。 (Linux 2.6.15 以降)"
3311
3312 #. type: TP
3313 #: build/C/man7/inotify.7:313
3314 #, no-wrap
3315 msgid "B<IN_EXCL_UNLINK> (since Linux 2.6.36)"
3316 msgstr "B<IN_EXCL_UNLINK> (Linux 2.6.36 以降)"
3317
3318 #.  commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6
3319 #. type: Plain text
3320 #: build/C/man7/inotify.7:329
3321 msgid ""
3322 "By default, when watching events on the children of a directory, events are "
3323 "generated for children even after they have been unlinked from the "
3324 "directory.  This can result in large numbers of uninteresting events for "
3325 "some applications (e.g., if watching I</tmp>, in which many applications "
3326 "create temporary files whose names are immediately unlinked).  Specifying "
3327 "B<IN_EXCL_UNLINK> changes the default behavior, so that events are not "
3328 "generated for children after they have been unlinked from the watched "
3329 "directory."
3330 msgstr ""
3331 "デフォルトでは、あるディレクトリの子ファイルに関するイベントを監視 (watch) し"
3332 "た際、ディレクトリからその子ファイルが削除 (unlink) された場合であってもその"
3333 "子ファイルに対してイベントが生成される。このことは、アプリケーションによって"
3334 "はあまり興味のないイベントが大量に発生することにつながる (例えば、I</tmp> を"
3335 "監視している場合、たくさんのアプリケーションが、すぐにその名前が削除される一"
3336 "時ファイルをそのディレクトリに作成する)。 B<IN_EXCL_UNLINK> を指定するとこの"
3337 "デフォルトの動作を変更でき、監視対象のディレクトリから子ファイルが削除された"
3338 "後に子ファイルに関するイベントが生成されなくなる。"
3339
3340 #. type: TP
3341 #: build/C/man7/inotify.7:329
3342 #, no-wrap
3343 msgid "B<IN_MASK_ADD>"
3344 msgstr "B<IN_MASK_ADD>"
3345
3346 #. type: Plain text
3347 #: build/C/man7/inotify.7:336
3348 msgid ""
3349 "If a watch instance already exists for the filesystem object corresponding "
3350 "to I<pathname>, add (OR) the events in I<mask> to the watch mask (instead of "
3351 "replacing the mask)."
3352 msgstr ""
3353 "監視インスタンスが I<pathname> に対応するファイルシステムオブジェクトに対して"
3354 "すでに存在する場合に、 (マスクを置き換えるのではなく) 監視マスクに I<mask> で"
3355 "指定されたイベントを追加 (OR) する。"
3356
3357 #. type: TP
3358 #: build/C/man7/inotify.7:336
3359 #, no-wrap
3360 msgid "B<IN_ONESHOT>"
3361 msgstr "B<IN_ONESHOT>"
3362
3363 #. type: Plain text
3364 #: build/C/man7/inotify.7:342
3365 msgid ""
3366 "Monitor the filesystem object corresponding to I<pathname> for one event, "
3367 "then remove from watch list."
3368 msgstr ""
3369 "I<pathname> に対応するファイルシステムオブジェクトを 1 イベントについてだけ監"
3370 "視し、 イベントが発生したら監視対象リストから削除する。"
3371
3372 #. type: TP
3373 #: build/C/man7/inotify.7:342
3374 #, no-wrap
3375 msgid "B<IN_ONLYDIR> (since Linux 2.6.15)"
3376 msgstr "B<IN_ONLYDIR> (Linux 2.6.15 以降)"
3377
3378 #. type: Plain text
3379 #: build/C/man7/inotify.7:349
3380 msgid ""
3381 "Only watch I<pathname> if it is a directory.  Using this flag provides an "
3382 "application with a race-free way of ensuring that the monitored object is a "
3383 "directory."
3384 msgstr ""
3385 "I<pathname> がディレクトリの場合のみ監視する。 このフラグを使うことで、アプリ"
3386 "ケーションは、競合状態を考慮せずに、監視するオブジェクトがディレクトリである"
3387 "ことを保証することができるようになる。"
3388
3389 #. type: Plain text
3390 #: build/C/man7/inotify.7:355
3391 msgid ""
3392 "The following bits may be set in the I<mask> field returned by B<read>(2):"
3393 msgstr "以下のビットが B<read>(2)  で返される I<mask> フィールドに設定される:"
3394
3395 #. type: TP
3396 #: build/C/man7/inotify.7:356
3397 #, no-wrap
3398 msgid "B<IN_IGNORED>"
3399 msgstr "B<IN_IGNORED>"
3400
3401 #. type: Plain text
3402 #: build/C/man7/inotify.7:362
3403 msgid ""
3404 "Watch was removed explicitly (B<inotify_rm_watch>(2))  or automatically "
3405 "(file was deleted, or filesystem was unmounted).  See also BUGS."
3406 msgstr ""
3407 "監視対象が (B<inotify_rm_watch>(2) により) 明示的に 削除された。もしくは "
3408 "(ファイルの削除、またはファイル システムのアンマウントにより) 自動的に削除さ"
3409 "れた。「バグ」も参照のこと。"
3410
3411 #. type: TP
3412 #: build/C/man7/inotify.7:362
3413 #, no-wrap
3414 msgid "B<IN_ISDIR>"
3415 msgstr "B<IN_ISDIR>"
3416
3417 #. type: Plain text
3418 #: build/C/man7/inotify.7:365
3419 msgid "Subject of this event is a directory."
3420 msgstr "このイベントの対象がディレクトリである。"
3421
3422 #. type: TP
3423 #: build/C/man7/inotify.7:365
3424 #, no-wrap
3425 msgid "B<IN_Q_OVERFLOW>"
3426 msgstr "B<IN_Q_OVERFLOW>"
3427
3428 #. type: Plain text
3429 #: build/C/man7/inotify.7:370
3430 msgid "Event queue overflowed (I<wd> is -1 for this event)."
3431 msgstr "イベントキューが溢れた (このイベントの場合、I<wd> は -1 である)。"
3432
3433 #. type: TP
3434 #: build/C/man7/inotify.7:370
3435 #, no-wrap
3436 msgid "B<IN_UNMOUNT>"
3437 msgstr "B<IN_UNMOUNT>"
3438
3439 #. type: Plain text
3440 #: build/C/man7/inotify.7:376
3441 msgid ""
3442 "Filesystem containing watched object was unmounted.  In addition, an "
3443 "B<IN_IGNORED> event will subsequently be generated for the watch descriptor."
3444 msgstr ""
3445 "監視対象オブジェクトを含むファイルシステムがアンマウントされた。さらに、この"
3446 "監視対象ディスクリプターに対して B<IN_IGNORED> イベントが生成される。"
3447
3448 #. type: SS
3449 #: build/C/man7/inotify.7:377
3450 #, no-wrap
3451 msgid "Examples"
3452 msgstr "例"
3453
3454 #. type: Plain text
3455 #: build/C/man7/inotify.7:385
3456 msgid ""
3457 "Suppose an application is watching the directory I<dir> and the file I<dir/"
3458 "myfile> for all events.  The examples below show some events that will be "
3459 "generated for these two objects."
3460 msgstr ""
3461 "アプリケーションがディレクトリ I<dir> とファイル I<dir/myfile> のすべてのイベ"
3462 "ントを監視しているとする。 以下に、これらの 2 つのオブジェクトに対して生成さ"
3463 "れるイベントの例を示す。"
3464
3465 #. type: TP
3466 #: build/C/man7/inotify.7:386
3467 #, no-wrap
3468 msgid "fd = open(\"dir/myfile\", O_RDWR);"
3469 msgstr "fd = open(\"dir/myfile\", O_RDWR);"
3470
3471 #. type: Plain text
3472 #: build/C/man7/inotify.7:394
3473 msgid "Generates B<IN_OPEN> events for both I<dir> and I<dir/myfile>."
3474 msgstr ""
3475 "I<dir> と I<dir/myfile> の両方に対して B<IN_OPEN> イベントが生成される。"
3476
3477 #. type: TP
3478 #: build/C/man7/inotify.7:394
3479 #, no-wrap
3480 msgid "read(fd, buf, count);"
3481 msgstr "read(fd, buf, count);"
3482
3483 #. type: Plain text
3484 #: build/C/man7/inotify.7:402
3485 msgid "Generates B<IN_ACCESS> events for both I<dir> and I<dir/myfile>."
3486 msgstr ""
3487 "I<dir> と I<dir/myfile> の両方に対して B<IN_ACCESS> イベントが生成される"
3488
3489 #. type: TP
3490 #: build/C/man7/inotify.7:402
3491 #, no-wrap
3492 msgid "write(fd, buf, count);"
3493 msgstr "write(fd, buf, count);"
3494
3495 #. type: Plain text
3496 #: build/C/man7/inotify.7:410
3497 msgid "Generates B<IN_MODIFY> events for both I<dir> and I<dir/myfile>."
3498 msgstr ""
3499 "I<dir> と I<dir/myfile> の両方に対して B<IN_MODIFY> イベントが生成される"
3500
3501 #. type: TP
3502 #: build/C/man7/inotify.7:410
3503 #, no-wrap
3504 msgid "fchmod(fd, mode);"
3505 msgstr "fchmod(fd, mode);"
3506
3507 #. type: Plain text
3508 #: build/C/man7/inotify.7:418
3509 msgid "Generates B<IN_ATTRIB> events for both I<dir> and I<dir/myfile>."
3510 msgstr ""
3511 "I<dir> と I<dir/myfile> の両方に対して B<IN_ATTRIB> イベントが生成される"
3512
3513 #. type: TP
3514 #: build/C/man7/inotify.7:418
3515 #, no-wrap
3516 msgid "close(fd);"
3517 msgstr "close(fd);"
3518
3519 #. type: Plain text
3520 #: build/C/man7/inotify.7:426
3521 msgid "Generates B<IN_CLOSE_WRITE> events for both I<dir> and I<dir/myfile>."
3522 msgstr ""
3523 "I<dir> と I<dir/myfile> の両方に対して B<IN_CLOSE_WRITE> イベントが生成される"
3524
3525 #. type: Plain text
3526 #: build/C/man7/inotify.7:435
3527 msgid ""
3528 "Suppose an application is watching the directories I<dir1> and I<dir2>, and "
3529 "the file I<dir1/myfile>.  The following examples show some events that may "
3530 "be generated."
3531 msgstr ""
3532 "アプリケーションがディレクトリ I<dir1> と I<dir2>、およびファイル I<dir1/"
3533 "myfile> を監視しているとする。 以下に生成されるイベントの例を示す。"
3534
3535 #. type: TP
3536 #: build/C/man7/inotify.7:436
3537 #, no-wrap
3538 msgid "link(\"dir1/myfile\", \"dir2/new\");"
3539 msgstr "link(\"dir1/myfile\", \"dir2/new\");"
3540
3541 #. type: Plain text
3542 #: build/C/man7/inotify.7:446
3543 msgid ""
3544 "Generates an B<IN_ATTRIB> event for I<myfile> and an B<IN_CREATE> event for "
3545 "I<dir2>."
3546 msgstr ""
3547 "I<myfile> に対して B<IN_ATTRIB> イベントが生成され、 I<dir2> に対して "
3548 "B<IN_CREATE> イベントが生成される。"
3549
3550 #. type: TP
3551 #: build/C/man7/inotify.7:446
3552 #, no-wrap
3553 msgid "rename(\"dir1/myfile\", \"dir2/myfile\");"
3554 msgstr "rename(\"dir1/myfile\", \"dir2/myfile\");"
3555
3556 #. type: Plain text
3557 #: build/C/man7/inotify.7:467
3558 msgid ""
3559 "Generates an B<IN_MOVED_FROM> event for I<dir1>, an B<IN_MOVED_TO> event for "
3560 "I<dir2>, and an B<IN_MOVE_SELF> event for I<myfile>.  The B<IN_MOVED_FROM> "
3561 "and B<IN_MOVED_TO> events will have the same I<cookie> value."
3562 msgstr ""
3563 "I<dir1> に対してイベント B<IN_MOVED_FROM> が、 I<dir2> に対してイベント "
3564 "B<IN_MOVED_TO> が、 I<myfile> に対してイベント B<IN_MOVE_SELF> が生成される。"
3565 "この際 イベント B<IN_MOVED_FROM> と B<IN_MOVED_TO> は同じ I<cookie> 値を持"
3566 "つ。"
3567
3568 #. type: Plain text
3569 #: build/C/man7/inotify.7:481
3570 msgid ""
3571 "Suppose that I<dir1/xx> and I<dir2/yy> are (the only) links to the same "
3572 "file, and an application is watching I<dir1>, I<dir2>, I<dir1/xx>, and "
3573 "I<dir2/yy>.  Executing the following calls in the order given below will "
3574 "generate the following events:"
3575 msgstr ""
3576 "I<dir1/xx> と I<dir2/yy> は同じファイルを参照するリンクで (他のリンクはないも"
3577 "のとする)、 アプリケーションは I<dir1>, I<dir2>, I<dir1/xx>, I<dir2/yy> を監"
3578 "視しているものとする。 以下に示す順序で下記の呼び出しを実行すると、以下のイベ"
3579 "ントが生成される。"
3580
3581 #. type: TP
3582 #: build/C/man7/inotify.7:482
3583 #, no-wrap
3584 msgid "unlink(\"dir2/yy\");"
3585 msgstr "unlink(\"dir2/yy\");"
3586
3587 #. type: Plain text
3588 #: build/C/man7/inotify.7:493
3589 msgid ""
3590 "Generates an B<IN_ATTRIB> event for I<xx> (because its link count changes)  "
3591 "and an B<IN_DELETE> event for I<dir2>."
3592 msgstr ""
3593 "I<xx> に対して B<IN_ATTRIB> イベントが生成され (リンク数が変化したため)、 "
3594 "I<dir2> に対して B<IN_DELETE> イベントが生成される。"
3595
3596 #. type: TP
3597 #: build/C/man7/inotify.7:493
3598 #, no-wrap
3599 msgid "unlink(\"dir1/xx\");"
3600 msgstr "unlink(\"dir1/xx\");"
3601
3602 #. type: Plain text
3603 #: build/C/man7/inotify.7:506
3604 msgid ""
3605 "Generates B<IN_ATTRIB>, B<IN_DELETE_SELF>, and B<IN_IGNORED> events for "
3606 "I<xx>, and an B<IN_DELETE> event for I<dir1>."
3607 msgstr ""
3608 "I<xx> に対してイベント B<IN_ATTRIB>, B<IN_DELETE_SELF>, B<IN_IGNORED> が生成"
3609 "され、 I<dir1> に対して B<IN_DELETE> イベントが生成される。"
3610
3611 #. type: Plain text
3612 #: build/C/man7/inotify.7:513
3613 msgid ""
3614 "Suppose an application is watching the directory I<dir> and (the empty) "
3615 "directory I<dir/subdir>.  The following examples show some events that may "
3616 "be generated."
3617 msgstr ""
3618 "アプリケーションがディレクトリ I<dir> と (空の) ディレクトリ I<dir/subdir> を"
3619 "監視しているものとする。 以下に生成されるイベントの例を示す。"
3620
3621 #. type: TP
3622 #: build/C/man7/inotify.7:514
3623 #, no-wrap
3624 msgid "mkdir(\"dir/new\", mode);"
3625 msgstr "mkdir(\"dir/new\", mode);"
3626
3627 #. type: Plain text
3628 #: build/C/man7/inotify.7:520
3629 msgid "Generates an B<IN_CREATE | IN_ISDIR> event for I<dir>."
3630 msgstr "I<dir> に対して B<IN_CREATE | IN_ISDIR> イベントが生成される。"
3631
3632 #. type: TP
3633 #: build/C/man7/inotify.7:520
3634 #, no-wrap
3635 msgid "rmdir(\"dir/subdir\");"
3636 msgstr "rmdir(\"dir/subdir\");"
3637
3638 #. type: Plain text
3639 #: build/C/man7/inotify.7:532
3640 msgid ""
3641 "Generates B<IN_DELETE_SELF> and B<IN_IGNORED> events for I<subdir>, and an "
3642 "B<IN_DELETE | IN_ISDIR> event for I<dir>."
3643 msgstr ""
3644 "I<subdir> に対してイベント B<IN_DELETE_SELF> と B<IN_IGNORED> が生成され、 "
3645 "I<dir> に対して B<IN_DELETE | IN_ISDIR> イベントが生成される。"
3646
3647 #. type: SS
3648 #: build/C/man7/inotify.7:533
3649 #, no-wrap
3650 msgid "/proc interfaces"
3651 msgstr "/proc インターフェース"
3652
3653 #. type: Plain text
3654 #: build/C/man7/inotify.7:536
3655 msgid ""
3656 "The following interfaces can be used to limit the amount of kernel memory "
3657 "consumed by inotify:"
3658 msgstr ""
3659 "以下のインターフェースは、inotify で消費される カーネルメモリの総量を制限する"
3660 "のに使用できる:"
3661
3662 #. type: TP
3663 #: build/C/man7/inotify.7:536
3664 #, no-wrap
3665 msgid "I</proc/sys/fs/inotify/max_queued_events>"
3666 msgstr "I</proc/sys/fs/inotify/max_queued_events>"
3667
3668 #. type: Plain text
3669 #: build/C/man7/inotify.7:545
3670 msgid ""
3671 "The value in this file is used when an application calls B<inotify_init>(2)  "
3672 "to set an upper limit on the number of events that can be queued to the "
3673 "corresponding inotify instance.  Events in excess of this limit are dropped, "
3674 "but an B<IN_Q_OVERFLOW> event is always generated."
3675 msgstr ""
3676 "このファイルの値は、アプリケーションが B<inotify_init>(2)  を呼び出すときに使"
3677 "用され、対応する inotify インスタンスについて キューに入れられるイベントの数"
3678 "の上限を設定する。 この制限を超えたイベントは破棄されるが、 B<IN_Q_OVERFLOW> "
3679 "イベントが常に生成される。"
3680
3681 #. type: TP
3682 #: build/C/man7/inotify.7:545
3683 #, no-wrap
3684 msgid "I</proc/sys/fs/inotify/max_user_instances>"
3685 msgstr "I</proc/sys/fs/inotify/max_user_instances>"
3686
3687 #. type: Plain text
3688 #: build/C/man7/inotify.7:549
3689 msgid ""
3690 "This specifies an upper limit on the number of inotify instances that can be "
3691 "created per real user ID."
3692 msgstr ""
3693 "1 つの実ユーザ ID に対して生成できる inotify インスタンスの数の上限を指定す"
3694 "る。"
3695
3696 #. type: TP
3697 #: build/C/man7/inotify.7:549
3698 #, no-wrap
3699 msgid "I</proc/sys/fs/inotify/max_user_watches>"
3700 msgstr "I</proc/sys/fs/inotify/max_user_watches>"
3701
3702 #. type: Plain text
3703 #: build/C/man7/inotify.7:553
3704 msgid ""
3705 "This specifies an upper limit on the number of watches that can be created "
3706 "per real user ID."
3707 msgstr "作成可能な監視対象の数の実 UID 単位の上限を指定する。"
3708
3709 #. type: Plain text
3710 #: build/C/man7/inotify.7:561
3711 msgid ""
3712 "Inotify was merged into the 2.6.13 Linux kernel.  The required library "
3713 "interfaces were added to glibc in version 2.4.  (B<IN_DONT_FOLLOW>, "
3714 "B<IN_MASK_ADD>, and B<IN_ONLYDIR> were added in glibc version 2.5.)"
3715 msgstr ""
3716 "inotify は 2.6.13 の Linux カーネルに組込まれた。 これに必要なライブラリのイ"
3717 "ンターフェースは、 glibc のバージョン 2.4 に追加された (B<IN_DONT_FOLLOW>, "
3718 "B<IN_MASK_ADD>, B<IN_ONLYDIR> は glibc バージョン 2.5 で追加された)。"
3719
3720 #. type: Plain text
3721 #: build/C/man7/inotify.7:563
3722 msgid "The inotify API is Linux-specific."
3723 msgstr "inotify API は Linux 独自のものである。"
3724
3725 #. type: Plain text
3726 #: build/C/man7/inotify.7:570
3727 msgid ""
3728 "Inotify file descriptors can be monitored using B<select>(2), B<poll>(2), "
3729 "and B<epoll>(7).  When an event is available, the file descriptor indicates "
3730 "as readable."
3731 msgstr ""
3732 "inotify ファイルディスクリプターは B<select>(2), B<poll>(2), B<epoll>(7)  を"
3733 "使って監視できる。 イベントがある場合、ファイルディスクリプターは読み込み可能"
3734 "と通知する。"
3735
3736 #. type: Plain text
3737 #: build/C/man7/inotify.7:599
3738 msgid ""
3739 "Since Linux 2.6.25, signal-driven I/O notification is available for inotify "
3740 "file descriptors; see the discussion of B<F_SETFL> (for setting the "
3741 "B<O_ASYNC> flag), B<F_SETOWN>, and B<F_SETSIG> in B<fcntl>(2).  The "
3742 "I<siginfo_t> structure (described in B<sigaction>(2))  that is passed to the "
3743 "signal handler has the following fields set: I<si_fd> is set to the inotify "
3744 "file descriptor number; I<si_signo> is set to the signal number; I<si_code> "
3745 "is set to B<POLL_IN>; and B<POLLIN> is set in I<si_band>."
3746 msgstr ""
3747 "Linux 2.6.25 以降では、シグナル駆動 (signal-driven) I/O の通知が inotify ファ"
3748 "イルディスクリプターについて利用可能である。 B<fcntl>(2)  に書かれている "
3749 "(B<O_ASYNC> フラグを設定するための)  B<F_SETFL>, B<F_SETOWN>, B<F_SETSIG> の"
3750 "議論を参照のこと。 シグナルハンドラに渡される I<siginfo_t> 構造体は、以下の"
3751 "フィールドが設定される (I<siginfo_t> は B<sigaction>(2)  で説明されている)。 "
3752 "I<si_fd> には inotify ファイルディスクリプター番号が、 I<si_signo> にはシグナ"
3753 "ル番号が、 I<si_code> には B<POLL_IN> が、 I<si_band> には B<POLLIN> が設定さ"
3754 "れる。"
3755
3756 #. type: Plain text
3757 #: build/C/man7/inotify.7:612
3758 msgid ""
3759 "If successive output inotify events produced on the inotify file descriptor "
3760 "are identical (same I<wd>, I<mask>, I<cookie>, and I<name>), then they are "
3761 "coalesced into a single event if the older event has not yet been read (but "
3762 "see BUGS).  This reduces the amount of kernel memory required for the event "
3763 "queue, but also means that an application can't use inotify to reliably "
3764 "count file events."
3765 msgstr ""
3766 "inotify ファイルディスクリプターに対して 連続して生成される出力 inotify イベ"
3767 "ントが同一の場合 (I<wd>, I<mask>, I<cookie>, I<name> が等しい場合)、 前のイベ"
3768 "ントがまだ読み込まれていなければ、 連続するイベントが 1 つのイベントにまとめ"
3769 "られる (ただし「バグ」の節も参照のこと)。 これによりイベントキューに必要な"
3770 "カーネルメモリ量が減るが、 これはまたアプリケーションがファイルイベント数を信"
3771 "頼性を持って数えるのに inotify を使用できないということでもある。"
3772
3773 #. type: Plain text
3774 #: build/C/man7/inotify.7:618
3775 msgid ""
3776 "The events returned by reading from an inotify file descriptor form an "
3777 "ordered queue.  Thus, for example, it is guaranteed that when renaming from "
3778 "one directory to another, events will be produced in the correct order on "
3779 "the inotify file descriptor."
3780 msgstr ""
3781 "inotify ファイルディスクリプターの読み込みで返されるイベントは、 順序付けられ"
3782 "たキューになる。 従って、たとえば、あるディレクトリの名前を別の名前に変更した"
3783 "場合、 inotify ファイルディスクリプターについての正しい順番で イベントが生成"
3784 "されることが保証される。"
3785
3786 #. type: Plain text
3787 #: build/C/man7/inotify.7:624
3788 msgid ""
3789 "The B<FIONREAD> B<ioctl>(2)  returns the number of bytes available to read "
3790 "from an inotify file descriptor."
3791 msgstr ""
3792 "B<FIONREAD> B<ioctl>(2)  は inotify ファイルディスクリプターから何バイト読み"
3793 "込めるかを返す。"
3794
3795 #. type: Plain text
3796 #: build/C/man7/inotify.7:631
3797 msgid ""
3798 "The inotify API provides no information about the user or process that "
3799 "triggered the inotify event.  In particular, there is no easy way for a "
3800 "process that is monitoring events via inotify to distinguish events that it "
3801 "triggers itself from those that are triggered by other processes."
3802 msgstr ""
3803 "inotify API では、inotify イベントが発生するきっかけとなったユーザやプロセス"
3804 "に関する情報は提供されない。とりわけ、inotify 経由でイベントを監視しているプ"
3805 "ロセスが、自分自身がきっかけとなったイベントと他のプロセスがきっかけとなった"
3806 "イベントを区別する簡単な手段はない。"
3807
3808 #. type: Plain text
3809 #: build/C/man7/inotify.7:644
3810 msgid ""
3811 "Inotify reports only events that a user-space program triggers through the "
3812 "filesystem API.  As a result, it does not catch remote events that occur on "
3813 "network filesystems.  (Applications must fall back to polling the filesystem "
3814 "to catch such events.)  Furthermore, various pseudo-filesystems such as I</"
3815 "proc>, I</sys>, and I</dev/pts> are not monitorable with inotify."
3816 msgstr ""
3817 "inotify は、ファイルシステム API 経由でユーザー空間プログラムがきっかけとなっ"
3818 "たイベントだけを報告する。 結果として、 inotify はネットワークファイルシステ"
3819 "ムで発生したリモートのイベントを捉えることはできない (このようなイベントを捉"
3820 "えるにはアプリケーションはファイルシステムをポーリングする必要がある)。 さら"
3821 "に、 I</proc>, I</sys>, I</dev/pts> といったいくつかの疑似ファイルシステムは "
3822 "inotify で監視することができない。"
3823
3824 #. type: Plain text
3825 #: build/C/man7/inotify.7:651
3826 msgid ""
3827 "The inotify API does not report file accesses and modifications that may "
3828 "occur because of B<mmap>(2), B<msync>(2), and B<munmap>(2)."
3829 msgstr ""
3830 "inotify API は B<mmap>(2), B<msync>(2), B<munmap>(2) により起こったファイルの"
3831 "アクセスと変更を報告しない。"
3832
3833 #. type: Plain text
3834 #: build/C/man7/inotify.7:655
3835 msgid ""
3836 "The inotify API identifies affected files by filename.  However, by the time "
3837 "an application processes an inotify event, the filename may already have "
3838 "been deleted or renamed."
3839 msgstr ""
3840 "inotify API では影響が受けるファイルをファイル名で特定する。\n"
3841 "しかしながら、アプリケーションが inotify イベントを処理する時点では、\n"
3842 "そのファイル名がすでに削除されたり変更されたりしている可能性がある。"
3843
3844 #. type: Plain text
3845 #: build/C/man7/inotify.7:660
3846 msgid ""
3847 "The inotify API identifies events via watch descriptors.  It is the "
3848 "application's responsibility to cache a mapping (if one is needed) between "
3849 "watch descriptors and pathnames.  Be aware that directory renamings may "
3850 "affect multiple cached pathnames."
3851 msgstr ""
3852 "inotify API では監視対象ディスクリプターを通してイベントが区別される。 (必要"
3853 "であれば) 監視対象ディスクリプターとパス名のマッピングをキャッシュしておくの"
3854 "はアプリケーションの役目である。 ディレクトリの名前変更の場合、キャッシュして"
3855 "いる複数のパス名に影響がある点に注意すること。"
3856
3857 #. type: Plain text
3858 #: build/C/man7/inotify.7:665
3859 msgid ""
3860 "Inotify monitoring of directories is not recursive: to monitor "
3861 "subdirectories under a directory, additional watches must be created.  This "
3862 "can take a significant amount time for large directory trees."
3863 msgstr ""
3864 "inotify によるディレクトリの監視は再帰的に行われない: あるディレクトリ以下"
3865 "の\n"
3866 "サブディレクトリを監視する場合、 監視対象を追加で作成しなければならない。\n"
3867 "大きなディレクトリツリーの場合には、この作業にかなり時間がかかることがある。"
3868
3869 #. type: Plain text
3870 #: build/C/man7/inotify.7:674
3871 msgid ""
3872 "If monitoring an entire directory subtree, and a new subdirectory is created "
3873 "in that tree or an existing directory is renamed into that tree, be aware "
3874 "that by the time you create a watch for the new subdirectory, new files (and "
3875 "subdirectories) may already exist inside the subdirectory.  Therefore, you "
3876 "may want to scan the contents of the subdirectory immediately after adding "
3877 "the watch (and, if desired, recursively add watches for any subdirectories "
3878 "that it contains)."
3879 msgstr ""
3880 "ディレクトリツリー全体を監視していて、 そのツリー内に新しいサブディレクトリが"
3881 "作成されるか、 既存のディレクトリが名前が変更されそのツリー内に移動した場"
3882 "合、 新しいサブディレクトリに対する watch を作成するまでに、 新しいファイル "
3883 "(やサブディレクトリ) がそのサブディレクトリ内にすでに作成されている場合がある"
3884 "点に注意すること。 したがって、watch を追加した直後にサブディレクトリの内容を"
3885 "スキャンしたいと思う場合もあるだろう (必要ならそのサブディレクトリ内のサブ"
3886 "ディレクトリに対する watch も再帰的に追加することもあるだろう)。"
3887
3888 #. type: Plain text
3889 #: build/C/man7/inotify.7:686
3890 msgid ""
3891 "Note that the event queue can overflow.  In this case, events are lost.  "
3892 "Robust applications should handle the possibility of lost events "
3893 "gracefully.  For example, it may be necessary to rebuild part or all of the "
3894 "application cache.  (One simple, but possibly expensive, approach is to "
3895 "close the inotify file descriptor, empty the cache, create a new inotify "
3896 "file descriptor, and then re-create watches and cache entries for the "
3897 "objects to be monitored.)"
3898 msgstr ""
3899 "イベントキューはオーバーフローする場合があることに注意すること。 この場合、イ"
3900 "ベントは失なわれる。 ロバスト性が求められるアプリケーションでは、 イベントが"
3901 "失なわれる可能性も含めて適切に処理を行うべきである。 例えば、アプリケーション"
3902 "内のキャッシュの一部分または全てを再構築する必要があるかもしれない。 (単純だ"
3903 "が、おそらくコストがかかる方法は、 inotify ファイルディスクリプターをクローズ"
3904 "し、 キャッシュを空にし、 新しい inotify ファイルディスクリプターを作成し、 "
3905 "監視しているオブジェクトの監視対象ディスクリプターとキャッシュエントリーの再"
3906 "作成を行う方法である。)"
3907
3908 #. type: SS
3909 #: build/C/man7/inotify.7:686
3910 #, no-wrap
3911 msgid "Dealing with rename() events"
3912 msgstr "rename() イベントの取り扱い"
3913
3914 #. type: Plain text
3915 #: build/C/man7/inotify.7:695
3916 msgid ""
3917 "As noted above, the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair that is "
3918 "generated by B<rename>(2)  can be matched up via their shared cookie value.  "
3919 "However, the task of matching has some challenges."
3920 msgstr ""
3921 "上述の通り、 B<rename>(2) により生成される B<IN_MOVED_FROM> と "
3922 "B<IN_MOVED_TO> イベントの組は、共有される cookie 値によって対応を取ることがで"
3923 "きる。 しかし、対応を取る場合にはいくつか難しい点がある。"
3924
3925 #. type: Plain text
3926 #: build/C/man7/inotify.7:712
3927 msgid ""
3928 "These two events are usually consecutive in the event stream available when "
3929 "reading from the inotify file descriptor.  However, this is not guaranteed.  "
3930 "If multiple processes are triggering events for monitored objects, then (on "
3931 "rare occasions) an arbitrary number of other events may appear between the "
3932 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events.  Furthermore, it is not "
3933 "guaranteed that the event pair is atomically inserted into the queue: there "
3934 "may be a brief interval where the B<IN_MOVED_FROM> has appeared, but the "
3935 "B<IN_MOVED_TO> has not."
3936 msgstr ""
3937 "これらの 2 つのイベントは、 inotify ファイルディスクリプターから読み出しを"
3938 "行った場合に、通常はイベントストリーム内で連続している。 しかしながら、連続し"
3939 "ていることは保証されていない。 複数のプロセスが監視対象オブジェクトでイベント"
3940 "を発生させた場合、 (めったに起こらないことだが) イベント B<IN_MOVED_FROM> と "
3941 "B<IN_MOVED_TO> の間に任意の数の他のイベントがはさまる可能性がある。 さらに、"
3942 "対となるイベントがアトミックにキューに挿入されることも保証されていない。 "
3943 "B<IN_MOVED_FROM> が現れたが B<IN_MOVED_TO> は現れていないという短い期間があり"
3944 "えるということだ。"
3945
3946 #. type: Plain text
3947 #: build/C/man7/inotify.7:737
3948 msgid ""
3949 "Matching up the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair generated by "
3950 "B<rename>(2)  is thus inherently racy.  (Don't forget that if an object is "
3951 "renamed outside of a monitored directory, there may not even be an "
3952 "B<IN_MOVED_TO> event.)  Heuristic approaches (e.g., assume the events are "
3953 "always consecutive)  can be used to ensure a match in most cases, but will "
3954 "inevitably miss some cases, causing the application to perceive the "
3955 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events as being unrelated.  If watch "
3956 "descriptors are destroyed and re-created as a result, then those watch "
3957 "descriptors will be inconsistent with the watch descriptors in any pending "
3958 "events.  (Re-creating the inotify file descriptor and rebuilding the cache "
3959 "may be useful to deal with this scenario.)"
3960 msgstr ""
3961 "したがって、 B<rename>(2) により生成された B<IN_MOVED_FROM> と "
3962 "B<IN_MOVED_TO> のイベントの組の対応を取るのは本質的に難しいことである (監視対"
3963 "象のディレクトリの外へオブジェクトの rename が行われた場合には "
3964 "B<IN_MOVED_TO> イベントは存在しさえしないことを忘れてはならない)。 (イベント"
3965 "は常に連続しているとの仮定を置くといった) 発見的な方法を使うと、ほとんどの場"
3966 "合でイベントの組をうまく見つけることができるが、 いくつかの場合に見逃すことが"
3967 "避けられず、 アプリケーションが B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントが"
3968 "無関係だとみなしてしまう可能性がある。 結果的に、監視対象ディスクリプターが破"
3969 "棄され再作成された場合、これらの監視対象ディスクリプターは、処理待ちイベント"
3970 "の監視対象ディスクリプターと一貫性のないものになってしまう (inotify ファイル"
3971 "ディスクリプタの再作成とキャッシュの再構成はこの状況に対処するのに有用な方法"
3972 "なのだが)。"
3973
3974 #. type: Plain text
3975 #: build/C/man7/inotify.7:754
3976 msgid ""
3977 "Applications should also allow for the possibility that the B<IN_MOVED_FROM> "
3978 "event was the last event that could fit in the buffer returned by the "
3979 "current call to B<read>(2), and the accompanying B<IN_MOVED_TO> event might "
3980 "be fetched only on the next B<read>(2), which should be done with a (small) "
3981 "timeout to allow for the fact that insertion of the B<IN_MOVED_FROM>-"
3982 "B<IN_MOVED_TO> event pair is not atomic, and also the possibility that there "
3983 "may not be any B<IN_MOVED_TO> event."
3984 msgstr ""
3985 "また、アプリケーションは、 B<IN_MOVED_FROM> イベントが今行った B<read>(2) の"
3986 "呼び出しで返されたバッファーのちょうど一番最後のイベントで、 B<IN_MOVED_TO> "
3987 "イベントは次の B<read>(2) を行わないと取得できない可能性も考慮に入れる必要が"
3988 "ある。 2 つ目の B<read>(2) は (短い) タイムアウトで行うべきである。 これは、 "
3989 "B<IN_MOVED_FROM>-B<IN_MOVED_TO> のイベントペアのキューへの挿入はアトミックで"
3990 "はなく、 また B<IN_MOVED_TO> イベントが全く発生しない可能性もあるという事実を"
3991 "考慮に入れておく必要があるからである。"
3992
3993 #. type: Plain text
3994 #: build/C/man7/inotify.7:758
3995 msgid ""
3996 "As of kernel 3.17, calling B<fallocate>(2)  does not create any inotify "
3997 "events."
3998 msgstr ""
3999 "カーネル 3.17 時点では、 B<fallocate>(2) の呼び出しでは inotify イベントが生"
4000 "成されない。"
4001
4002 #.  FIXME . kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321
4003 #.  implies that unmount events were buggy 2.6.11 to 2.6.36
4004 #. type: Plain text
4005 #: build/C/man7/inotify.7:766
4006 msgid "In kernels before 2.6.16, the B<IN_ONESHOT> I<mask> flag does not work."
4007 msgstr "2.6.16 以前のカーネルでは B<IN_ONESHOT> I<mask> フラグが働かない。"
4008
4009 #. type: Plain text
4010 #: build/C/man7/inotify.7:776
4011 msgid ""
4012 "As originally designed and implemented, the B<IN_ONESHOT> flag did not cause "
4013 "an B<IN_IGNORED> event to be generated when the watch was dropped after one "
4014 "event.  However, as an unintended effect of other changes, since Linux "
4015 "2.6.36, an B<IN_IGNORED> event is generated in this case."
4016 msgstr ""
4017 "元々は設計/実装時の意図通り、 イベントが一つ発生し watch が削除された際に "
4018 "B<IN_ONESHOT> フラグでは B<IN_IGNORED> イベントが発生しなかった。 しかし、 別"
4019 "の変更での意図していなかった影響により、 Linux 2.6.36 以降では、 この場合に "
4020 "B<IN_IGNORED> イベントが生成される。"
4021
4022 #.  commit 1c17d18e3775485bf1e0ce79575eb637a94494a2
4023 #. type: Plain text
4024 #: build/C/man7/inotify.7:785
4025 msgid ""
4026 "Before kernel 2.6.25, the kernel code that was intended to coalesce "
4027 "successive identical events (i.e., the two most recent events could "
4028 "potentially be coalesced if the older had not yet been read)  instead "
4029 "checked if the most recent event could be coalesced with the I<oldest> "
4030 "unread event."
4031 msgstr ""
4032 "カーネル 2.6.25 より前では、 連続する同一のイベントを一つにまとめることを意図"
4033 "したコード (古い方のイベントがまだ読み込まれていない場合に、 最新の 2 つのイ"
4034 "ベントを一つにまとめられる可能性がある) が、 最新のイベントが「最も古い」読み"
4035 "込まれていないイベントとまとめられるか をチェックするようになっていた。"
4036
4037 #.  FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=77111
4038 #. type: Plain text
4039 #: build/C/man7/inotify.7:815
4040 msgid ""
4041 "When a watch descriptor is removed by calling B<inotify_rm_watch>(2)  (or "
4042 "because a watch file is deleted or the filesystem that contains it is "
4043 "unmounted), any pending unread events for that watch descriptor remain "
4044 "available to read.  As watch descriptors are subsequently allocated with "
4045 "B<inotify_add_watch>(2), the kernel cycles through the range of possible "
4046 "watch descriptors (0 to B<INT_MAX>)  incrementally.  When allocating a free "
4047 "watch descriptor, no check is made to see whether that watch descriptor "
4048 "number has any pending unread events in the inotify queue.  Thus, it can "
4049 "happen that a watch descriptor is reallocated even when pending unread "
4050 "events exist for a previous incarnation of that watch descriptor number, "
4051 "with the result that the application might then read those events and "
4052 "interpret them as belonging to the file associated with the newly recycled "
4053 "watch descriptor.  In practice, the likelihood of hitting this bug may be "
4054 "extremely low, since it requires that an application cycle through "
4055 "B<INT_MAX> watch descriptors, release a watch descriptor while leaving "
4056 "unread events for that watch descriptor in the queue, and then recycle that "
4057 "watch descriptor.  For this reason, and because there have been no reports "
4058 "of the bug occurring in real-world applications, as of Linux 3.15, no kernel "
4059 "changes have yet been made to eliminate this possible bug."
4060 msgstr ""
4061 "B<inotify_rm_watch>(2) の呼び出しにより監視対象ディスクリプターが削除された場"
4062 "合 (なお、監視対象ファイルの削除や監視対象ファイルが含まれるファイルシステム"
4063 "のアンマウントによっても監視対象ディスクリプターは削除される)、 この監視対象"
4064 "ディスクリプター関連の処理待ちの未読み出しイベントは、 読み出し可能なままとな"
4065 "る。 監視対象ディスクリプターは B<inotify_add_watch>(2) によって後で割り当て"
4066 "られるため、 カーネルは利用可能な監視対象ディスクリプターの範囲 (0 から "
4067 "B<INT_MAX>) から昇順にサイクリックに割り当てを行う。未使用の監視対象ディスク"
4068 "リプターを割り当てる際、 その監視対象ディスクリプター番号に inotify キューで"
4069 "処理待ちの未読み出しイベントがあるかの確認は行われない。 したがって、監視対象"
4070 "ディスクリプターが再割り当てされた際に、 その監視対象ディスクリプターの一つ前"
4071 "の使用時に発生した処理待ちの未読み出しイベントが存在するということが起こりう"
4072 "る。 その結果、アプリケーションはこれらのイベントを読み出す可能性があり、 こ"
4073 "れらのイベントが新しく再利用された監視対象ディスクリプターに関連付けられた"
4074 "ファイルに属するものかを解釈する必要が出て来る。 実際のところ、このバグを踏む"
4075 "可能性は極めて低い。 それは、このバグを踏むためには、アプリケーションが "
4076 "B<INT_MAX> 個の監視対象ディスクリプターが一周させて、 キューに未読み出しイベ"
4077 "ントが残っている監視対象ディスクリプターを解放し、 その監視対象ディスクリプ"
4078 "ターを再利用する必要があるからである。 この理由と、実世界のアプリケーションで"
4079 "発生したというバグ報告がないことから、 Linux 3.15 時点では、この計算上は起こ"
4080 "りうるバグを取り除くためのカーネルの変更は行われていない。"
4081
4082 #. type: Plain text
4083 #: build/C/man7/inotify.7:823
4084 msgid ""
4085 "The following program demonstrates the usage of the inotify API.  It marks "
4086 "the directories passed as a command-line arguments and waits for events of "
4087 "type B<IN_OPEN>, B<IN_CLOSE_NOWRITE> and B<IN_CLOSE_WRITE>."
4088 msgstr ""
4089 "以下のプログラムは inotify API の使用例を示したものである。 コマンドライン引"
4090 "き数で渡されたディレクトリに印を付け、 タイプが B<IN_OPEN>, "
4091 "B<IN_CLOSE_NOWRITE> B<IN_CLOSE_WRITE> のイベントを待つ。"
4092
4093 #. type: Plain text
4094 #: build/C/man7/inotify.7:838
4095 msgid ""
4096 "The following output was recorded while editing the file I</home/user/temp/"
4097 "foo> and listing directory I</tmp>.  Before the file and the directory were "
4098 "opened, B<IN_OPEN> events occurred.  After the file was closed, an "
4099 "B<IN_CLOSE_WRITE> event occurred.  After the directory was closed, an "
4100 "B<IN_CLOSE_NOWRITE> event occurred.  Execution of the program ended when the "
4101 "user pressed the ENTER key."
4102 msgstr ""
4103 "以下は、 ファイル I</home/user/temp/foo> を編集し、 ディレクトリ I</tmp> の一"
4104 "覧表示を行った場合の出力である。 対象のファイルとディレクトリがオープンされる"
4105 "前に、イベント B<IN_OPEN> が発生している。 対象ファイルがクローズされた後にイ"
4106 "ベント B<IN_CLOSE_WRITE> が発生している。 対象ディレクトリがクローズされた後"
4107 "にイベント B<IN_CLOSE_NOWRITE> が発生している。 ユーザーが ENTER キーを押する"
4108 "と、プログラムの実行は終了する。"
4109
4110 #. type: Plain text
4111 #: build/C/man7/inotify.7:848
4112 #, no-wrap
4113 msgid ""
4114 "$ B<./a.out /tmp /home/user/temp>\n"
4115 "Press enter key to terminate.\n"
4116 "Listening for events.\n"
4117 "IN_OPEN: /home/user/temp/foo [file]\n"
4118 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
4119 "IN_OPEN: /tmp/ [directory]\n"
4120 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
4121 msgstr ""
4122 "$ B<./a.out /tmp /home/user/temp>\n"
4123 "Press enter key to terminate.\n"
4124 "Listening for events.\n"
4125 "IN_OPEN: /home/user/temp/foo [file]\n"
4126 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
4127 "IN_OPEN: /tmp/ [directory]\n"
4128 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
4129
4130 #. type: Plain text
4131 #: build/C/man7/inotify.7:860
4132 #, no-wrap
4133 msgid ""
4134 "#include E<lt>errno.hE<gt>\n"
4135 "#include E<lt>poll.hE<gt>\n"
4136 "#include E<lt>stdio.hE<gt>\n"
4137 "#include E<lt>stdlib.hE<gt>\n"
4138 "#include E<lt>sys/inotify.hE<gt>\n"
4139 "#include E<lt>unistd.hE<gt>\n"
4140 msgstr ""
4141 "#include E<lt>errno.hE<gt>\n"
4142 "#include E<lt>poll.hE<gt>\n"
4143 "#include E<lt>stdio.hE<gt>\n"
4144 "#include E<lt>stdlib.hE<gt>\n"
4145 "#include E<lt>sys/inotify.hE<gt>\n"
4146 "#include E<lt>unistd.hE<gt>\n"
4147
4148 #. type: Plain text
4149 #: build/C/man7/inotify.7:866
4150 #, no-wrap
4151 msgid ""
4152 "/* Read all available inotify events from the file descriptor 'fd'.\n"
4153 "   wd is the table of watch descriptors for the directories in argv.\n"
4154 "   argc is the length of wd and argv.\n"
4155 "   argv is the list of watched directories.\n"
4156 "   Entry 0 of wd and argv is unused. */\n"
4157 msgstr ""
4158 "/* Read all available inotify events from the file descriptor 'fd'.\n"
4159 "   wd is the table of watch descriptors for the directories in argv.\n"
4160 "   argc is the length of wd and argv.\n"
4161 "   argv is the list of watched directories.\n"
4162 "   Entry 0 of wd and argv is unused. */\n"
4163
4164 #. type: Plain text
4165 #: build/C/man7/inotify.7:875
4166 #, no-wrap
4167 msgid ""
4168 "static void\n"
4169 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
4170 "{\n"
4171 "    /* Some systems cannot read integer variables if they are not\n"
4172 "       properly aligned. On other systems, incorrect alignment may\n"
4173 "       decrease performance. Hence, the buffer used for reading from\n"
4174 "       the inotify file descriptor should have the same alignment as\n"
4175 "       struct inotify_event. */\n"
4176 msgstr ""
4177 "static void\n"
4178 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
4179 "{\n"
4180 "    /* Some systems cannot read integer variables if they are not\n"
4181 "       properly aligned. On other systems, incorrect alignment may\n"
4182 "       decrease performance. Hence, the buffer used for reading from\n"
4183 "       the inotify file descriptor should have the same alignment as\n"
4184 "       struct inotify_event. */\n"
4185
4186 #. type: Plain text
4187 #: build/C/man7/inotify.7:882
4188 #, no-wrap
4189 msgid ""
4190 "    char buf[4096]\n"
4191 "        __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
4192 "    const struct inotify_event *event;\n"
4193 "    int i;\n"
4194 "    ssize_t len;\n"
4195 "    char *ptr;\n"
4196 msgstr ""
4197 "    char buf[4096]\n"
4198 "        __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
4199 "    const struct inotify_event *event;\n"
4200 "    int i;\n"
4201 "    ssize_t len;\n"
4202 "    char *ptr;\n"
4203
4204 #. type: Plain text
4205 #: build/C/man7/inotify.7:884
4206 #, no-wrap
4207 msgid "    /* Loop while events can be read from inotify file descriptor. */\n"
4208 msgstr "    /* Loop while events can be read from inotify file descriptor. */\n"
4209
4210 #. type: Plain text
4211 #: build/C/man7/inotify.7:886
4212 #, no-wrap
4213 msgid "    for (;;) {\n"
4214 msgstr "    for (;;) {\n"
4215
4216 #. type: Plain text
4217 #: build/C/man7/inotify.7:888
4218 #, no-wrap
4219 msgid "        /* Read some events. */\n"
4220 msgstr "        /* Read some events. */\n"
4221
4222 #. type: Plain text
4223 #: build/C/man7/inotify.7:894
4224 #, no-wrap
4225 msgid ""
4226 "        len = read(fd, buf, sizeof buf);\n"
4227 "        if (len == -1 && errno != EAGAIN) {\n"
4228 "            perror(\"read\");\n"
4229 "            exit(EXIT_FAILURE);\n"
4230 "        }\n"
4231 msgstr ""
4232 "        len = read(fd, buf, sizeof buf);\n"
4233 "        if (len == -1 && errno != EAGAIN) {\n"
4234 "            perror(\"read\");\n"
4235 "            exit(EXIT_FAILURE);\n"
4236 "        }\n"
4237
4238 #. type: Plain text
4239 #: build/C/man7/inotify.7:898
4240 #, no-wrap
4241 msgid ""
4242 "        /* If the nonblocking read() found no events to read, then\n"
4243 "           it returns -1 with errno set to EAGAIN. In that case,\n"
4244 "           we exit the loop. */\n"
4245 msgstr ""
4246 "        /* If the nonblocking read() found no events to read, then\n"
4247 "           it returns -1 with errno set to EAGAIN. In that case,\n"
4248 "           we exit the loop. */\n"
4249
4250 #. type: Plain text
4251 #: build/C/man7/inotify.7:906
4252 #, no-wrap
4253 msgid ""
4254 "        for (ptr = buf; ptr E<lt> buf + len;\n"
4255 "                ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
4256 msgstr ""
4257 "        for (ptr = buf; ptr E<lt> buf + len;\n"
4258 "                ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
4259
4260 #. type: Plain text
4261 #: build/C/man7/inotify.7:908
4262 #, no-wrap
4263 msgid "            event = (const struct inotify_event *) ptr;\n"
4264 msgstr "            event = (const struct inotify_event *) ptr;\n"
4265
4266 #. type: Plain text
4267 #: build/C/man7/inotify.7:910
4268 #, no-wrap
4269 msgid "            /* Print event type */\n"
4270 msgstr "            /* Print event type */\n"
4271
4272 #. type: Plain text
4273 #: build/C/man7/inotify.7:917
4274 #, no-wrap
4275 msgid ""
4276 "            if (event-E<gt>mask & IN_OPEN)\n"
4277 "                printf(\"IN_OPEN: \");\n"
4278 "            if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
4279 "                printf(\"IN_CLOSE_NOWRITE: \");\n"
4280 "            if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
4281 "                printf(\"IN_CLOSE_WRITE: \");\n"
4282 msgstr ""
4283 "            if (event-E<gt>mask & IN_OPEN)\n"
4284 "                printf(\"IN_OPEN: \");\n"
4285 "            if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
4286 "                printf(\"IN_CLOSE_NOWRITE: \");\n"
4287 "            if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
4288 "                printf(\"IN_CLOSE_WRITE: \");\n"
4289
4290 #. type: Plain text
4291 #: build/C/man7/inotify.7:919
4292 #, no-wrap
4293 msgid "            /* Print the name of the watched directory */\n"
4294 msgstr "            /* Print the name of the watched directory */\n"
4295
4296 #. type: Plain text
4297 #: build/C/man7/inotify.7:926
4298 #, no-wrap
4299 msgid ""
4300 "            for (i = 1; i E<lt> argc; ++i) {\n"
4301 "                if (wd[i] == event-E<gt>wd) {\n"
4302 "                    printf(\"%s/\", argv[i]);\n"
4303 "                    break;\n"
4304 "                }\n"
4305 "            }\n"
4306 msgstr ""
4307 "            for (i = 1; i E<lt> argc; ++i) {\n"
4308 "                if (wd[i] == event-E<gt>wd) {\n"
4309 "                    printf(\"%s/\", argv[i]);\n"
4310 "                    break;\n"
4311 "                }\n"
4312 "            }\n"
4313
4314 #. type: Plain text
4315 #: build/C/man7/inotify.7:928
4316 #, no-wrap
4317 msgid "            /* Print the name of the file */\n"
4318 msgstr "            /* Print the name of the file */\n"
4319
4320 #. type: Plain text
4321 #: build/C/man7/inotify.7:931
4322 #, no-wrap
4323 msgid ""
4324 "            if (event-E<gt>len)\n"
4325 "                printf(\"%s\", event-E<gt>name);\n"
4326 msgstr ""
4327 "            if (event-E<gt>len)\n"
4328 "                printf(\"%s\", event-E<gt>name);\n"
4329
4330 #. type: Plain text
4331 #: build/C/man7/inotify.7:933
4332 #, no-wrap
4333 msgid "            /* Print type of filesystem object */\n"
4334 msgstr "            /* Print type of filesystem object */\n"
4335
4336 #. type: Plain text
4337 #: build/C/man7/inotify.7:941
4338 #, no-wrap
4339 msgid ""
4340 "            if (event-E<gt>mask & IN_ISDIR)\n"
4341 "                printf(\" [directory]\\en\");\n"
4342 "            else\n"
4343 "                printf(\" [file]\\en\");\n"
4344 "        }\n"
4345 "    }\n"
4346 "}\n"
4347 msgstr ""
4348 "            if (event-E<gt>mask & IN_ISDIR)\n"
4349 "                printf(\" [directory]\\en\");\n"
4350 "            else\n"
4351 "                printf(\" [file]\\en\");\n"
4352 "        }\n"
4353 "    }\n"
4354 "}\n"
4355
4356 #. type: Plain text
4357 #: build/C/man7/inotify.7:950
4358 #, no-wrap
4359 msgid ""
4360 "int\n"
4361 "main(int argc, char* argv[])\n"
4362 "{\n"
4363 "    char buf;\n"
4364 "    int fd, i, poll_num;\n"
4365 "    int *wd;\n"
4366 "    nfds_t nfds;\n"
4367 "    struct pollfd fds[2];\n"
4368 msgstr ""
4369 "int\n"
4370 "main(int argc, char* argv[])\n"
4371 "{\n"
4372 "    char buf;\n"
4373 "    int fd, i, poll_num;\n"
4374 "    int *wd;\n"
4375 "    nfds_t nfds;\n"
4376 "    struct pollfd fds[2];\n"
4377
4378 #. type: Plain text
4379 #: build/C/man7/inotify.7:955
4380 #, no-wrap
4381 msgid ""
4382 "    if (argc E<lt> 2) {\n"
4383 "        printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
4384 "        exit(EXIT_FAILURE);\n"
4385 "    }\n"
4386 msgstr ""
4387 "    if (argc E<lt> 2) {\n"
4388 "        printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
4389 "        exit(EXIT_FAILURE);\n"
4390 "    }\n"
4391
4392 #. type: Plain text
4393 #: build/C/man7/inotify.7:957
4394 #, no-wrap
4395 msgid "    printf(\"Press ENTER key to terminate.\\en\");\n"
4396 msgstr "    printf(\"Press ENTER key to terminate.\\en\");\n"
4397
4398 #. type: Plain text
4399 #: build/C/man7/inotify.7:959
4400 #, no-wrap
4401 msgid "    /* Create the file descriptor for accessing the inotify API */\n"
4402 msgstr "    /* Create the file descriptor for accessing the inotify API */\n"
4403
4404 #. type: Plain text
4405 #: build/C/man7/inotify.7:965
4406 #, no-wrap
4407 msgid ""
4408 "    fd = inotify_init1(IN_NONBLOCK);\n"
4409 "    if (fd == -1) {\n"
4410 "        perror(\"inotify_init1\");\n"
4411 "        exit(EXIT_FAILURE);\n"
4412 "    }\n"
4413 msgstr ""
4414 "    fd = inotify_init1(IN_NONBLOCK);\n"
4415 "    if (fd == -1) {\n"
4416 "        perror(\"inotify_init1\");\n"
4417 "        exit(EXIT_FAILURE);\n"
4418 "    }\n"
4419
4420 #. type: Plain text
4421 #: build/C/man7/inotify.7:967
4422 #, no-wrap
4423 msgid "    /* Allocate memory for watch descriptors */\n"
4424 msgstr "    /* Allocate memory for watch descriptors */\n"
4425
4426 #. type: Plain text
4427 #: build/C/man7/inotify.7:973
4428 #, no-wrap
4429 msgid ""
4430 "    wd = calloc(argc, sizeof(int));\n"
4431 "    if (wd == NULL) {\n"
4432 "        perror(\"calloc\");\n"
4433 "        exit(EXIT_FAILURE);\n"
4434 "    }\n"
4435 msgstr ""
4436 "    wd = calloc(argc, sizeof(int));\n"
4437 "    if (wd == NULL) {\n"
4438 "        perror(\"calloc\");\n"
4439 "        exit(EXIT_FAILURE);\n"
4440 "    }\n"
4441
4442 #. type: Plain text
4443 #: build/C/man7/inotify.7:977
4444 #, no-wrap
4445 msgid ""
4446 "    /* Mark directories for events\n"
4447 "       - file was opened\n"
4448 "       - file was closed */\n"
4449 msgstr ""
4450 "    /* Mark directories for events\n"
4451 "       - file was opened\n"
4452 "       - file was closed */\n"
4453
4454 #. type: Plain text
4455 #: build/C/man7/inotify.7:987
4456 #, no-wrap
4457 msgid ""
4458 "    for (i = 1; i E<lt> argc; i++) {\n"
4459 "        wd[i] = inotify_add_watch(fd, argv[i],\n"
4460 "                                  IN_OPEN | IN_CLOSE);\n"
4461 "        if (wd[i] == -1) {\n"
4462 "            fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4463 "            perror(\"inotify_add_watch\");\n"
4464 "            exit(EXIT_FAILURE);\n"
4465 "        }\n"
4466 "    }\n"
4467 msgstr ""
4468 "    for (i = 1; i E<lt> argc; i++) {\n"
4469 "        wd[i] = inotify_add_watch(fd, argv[i],\n"
4470 "                                  IN_OPEN | IN_CLOSE);\n"
4471 "        if (wd[i] == -1) {\n"
4472 "            fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4473 "            perror(\"inotify_add_watch\");\n"
4474 "            exit(EXIT_FAILURE);\n"
4475 "        }\n"
4476 "    }\n"
4477
4478 #. type: Plain text
4479 #: build/C/man7/inotify.7:998
4480 #, no-wrap
4481 msgid "    /* Inotify input */\n"
4482 msgstr "    /* Inotify input */\n"
4483
4484 #. type: Plain text
4485 #: build/C/man7/inotify.7:1003
4486 #, no-wrap
4487 msgid "    /* Wait for events and/or terminal input */\n"
4488 msgstr "    /* Wait for events and/or terminal input */\n"
4489
4490 #. type: Plain text
4491 #: build/C/man7/inotify.7:1013
4492 #, no-wrap
4493 msgid ""
4494 "    printf(\"Listening for events.\\en\");\n"
4495 "    while (1) {\n"
4496 "        poll_num = poll(fds, nfds, -1);\n"
4497 "        if (poll_num == -1) {\n"
4498 "            if (errno == EINTR)\n"
4499 "                continue;\n"
4500 "            perror(\"poll\");\n"
4501 "            exit(EXIT_FAILURE);\n"
4502 "        }\n"
4503 msgstr ""
4504 "    printf(\"Listening for events.\\en\");\n"
4505 "    while (1) {\n"
4506 "        poll_num = poll(fds, nfds, -1);\n"
4507 "        if (poll_num == -1) {\n"
4508 "            if (errno == EINTR)\n"
4509 "                continue;\n"
4510 "            perror(\"poll\");\n"
4511 "            exit(EXIT_FAILURE);\n"
4512 "        }\n"
4513
4514 #. type: Plain text
4515 #: build/C/man7/inotify.7:1015
4516 #, no-wrap
4517 msgid "        if (poll_num E<gt> 0) {\n"
4518 msgstr "        if (poll_num E<gt> 0) {\n"
4519
4520 #. type: Plain text
4521 #: build/C/man7/inotify.7:1017
4522 #, no-wrap
4523 msgid "            if (fds[0].revents & POLLIN) {\n"
4524 msgstr "            if (fds[0].revents & POLLIN) {\n"
4525
4526 #. type: Plain text
4527 #: build/C/man7/inotify.7:1019
4528 #, no-wrap
4529 msgid "                /* Console input is available. Empty stdin and quit */\n"
4530 msgstr "                /* Console input is available. Empty stdin and quit */\n"
4531
4532 #. type: Plain text
4533 #: build/C/man7/inotify.7:1028
4534 #, no-wrap
4535 msgid "                /* Inotify events are available */\n"
4536 msgstr "                /* Inotify events are available */\n"
4537
4538 #. type: Plain text
4539 #: build/C/man7/inotify.7:1033
4540 #, no-wrap
4541 msgid ""
4542 "                handle_events(fd, wd, argc, argv);\n"
4543 "            }\n"
4544 "        }\n"
4545 "    }\n"
4546 msgstr ""
4547 "                handle_events(fd, wd, argc, argv);\n"
4548 "            }\n"
4549 "        }\n"
4550 "    }\n"
4551
4552 #. type: Plain text
4553 #: build/C/man7/inotify.7:1035
4554 #, no-wrap
4555 msgid "    printf(\"Listening for events stopped.\\en\");\n"
4556 msgstr "    printf(\"Listening for events stopped.\\en\");\n"
4557
4558 #. type: Plain text
4559 #: build/C/man7/inotify.7:1037
4560 #, no-wrap
4561 msgid "    /* Close inotify file descriptor */\n"
4562 msgstr "    /* Close inotify file descriptor */\n"
4563
4564 #. type: Plain text
4565 #: build/C/man7/inotify.7:1039
4566 #, no-wrap
4567 msgid "    close(fd);\n"
4568 msgstr "    close(fd);\n"
4569
4570 #. type: Plain text
4571 #: build/C/man7/inotify.7:1043
4572 #, no-wrap
4573 msgid ""
4574 "    free(wd);\n"
4575 "    exit(EXIT_SUCCESS);\n"
4576 "}\n"
4577 msgstr ""
4578 "    free(wd);\n"
4579 "    exit(EXIT_SUCCESS);\n"
4580 "}\n"
4581
4582 #. type: Plain text
4583 #: build/C/man7/inotify.7:1054
4584 msgid ""
4585 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4586 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4587 "B<stat>(2), B<fanotify>(7)"
4588 msgstr ""
4589 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4590 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4591 "B<stat>(2), B<fanotify>(7)"
4592
4593 #. type: Plain text
4594 #: build/C/man7/inotify.7:1057
4595 msgid ""
4596 "I<Documentation/filesystems/inotify.txt> in the Linux kernel source tree"
4597 msgstr "Linux カーネルソース内の I<Documentation/filesystems/inotify.txt>"
4598
4599 #. type: TH
4600 #: build/C/man2/inotify_add_watch.2:28
4601 #, no-wrap
4602 msgid "INOTIFY_ADD_WATCH"
4603 msgstr "INOTIFY_ADD_WATCH"
4604
4605 #. type: TH
4606 #: build/C/man2/inotify_add_watch.2:28
4607 #, no-wrap
4608 msgid "2014-07-08"
4609 msgstr "2014-07-08"
4610
4611 #. type: Plain text
4612 #: build/C/man2/inotify_add_watch.2:31
4613 msgid "inotify_add_watch - add a watch to an initialized inotify instance"
4614 msgstr ""
4615 "inotify_add_watch - 初期化済み inotify インスタンスに監視対象を追加する"
4616
4617 #. type: Plain text
4618 #: build/C/man2/inotify_add_watch.2:33 build/C/man2/inotify_rm_watch.2:32
4619 msgid "B<#include E<lt>sys/inotify.hE<gt>>"
4620 msgstr "B<#include E<lt>sys/inotify.hE<gt>>"
4621
4622 #. type: Plain text
4623 #: build/C/man2/inotify_add_watch.2:35
4624 msgid ""
4625 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4626 ">I<mask>B<);>"
4627 msgstr ""
4628 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4629 ">I<mask>B<);>"
4630
4631 #. type: Plain text
4632 #: build/C/man2/inotify_add_watch.2:54
4633 msgid ""
4634 "B<inotify_add_watch>()  adds a new watch, or modifies an existing watch, for "
4635 "the file whose location is specified in I<pathname>; the caller must have "
4636 "read permission for this file.  The I<fd> argument is a file descriptor "
4637 "referring to the inotify instance whose watch list is to be modified.  The "
4638 "events to be monitored for I<pathname> are specified in the I<mask> bit-mask "
4639 "argument.  See B<inotify>(7)  for a description of the bits that can be set "
4640 "in I<mask>."
4641 msgstr ""
4642 "B<inotify_add_watch>()  は、 I<pathname> で指定された位置にあるファイルを監視"
4643 "する監視アイテム (watch) の新規追加、 または既存の監視アイテムの変更を行う。 "
4644 "呼び出し元は、監視対象のファイルに対する読み出し許可を 持っていなければならな"
4645 "い。 I<fd> 引き数は、変更を行う監視対象リスト (watch list) を持つ inotify イ"
4646 "ンスタンスを参照するファイルディスクリプターである。 I<pathname> のどのイベン"
4647 "トを監視するかは、引き数のビットマスク I<mask> で指定する。 I<mask> に設定で"
4648 "きるビットの説明については B<inotify>(7)  を参照のこと。"
4649
4650 #. type: Plain text
4651 #: build/C/man2/inotify_add_watch.2:66
4652 msgid ""
4653 "A successful call to B<inotify_add_watch>()  returns a unique watch "
4654 "descriptor for this inotify instance, for the filesystem object that "
4655 "corresponds to I<pathname>.  If the filesystem object was not previously "
4656 "being watched by this inotify instance, then the watch descriptor is newly "
4657 "allocated.  If the filesystem object was already being watched (perhaps via "
4658 "a different link to the same object), then the descriptor for the existing "
4659 "watch is returned."
4660 msgstr ""
4661 "B<inotify_add_watch>() の呼び出しが成功すると、 I<pathname> に対応するファイ"
4662 "ルシステムオブジェクトに対する、 一意な監視対象ディスクリプター (watch "
4663 "descriptor) を、 対象の inotify インスタンスに対して返す。 そのファイルシステ"
4664 "ムオブジェクトが対象の inotify インスタンスによって以前に監視されていない場合"
4665 "には、 監視対象ディスクリプターは新規に割り当てられる。 ファイルシステムオブ"
4666 "ジェクトが (おそらく同じオブジェクトに対する異なるリンク経由で) すでに監視さ"
4667 "れている場合には、 既存の監視に対するディスクリプターが返される。"
4668
4669 #. type: Plain text
4670 #: build/C/man2/inotify_add_watch.2:77
4671 msgid ""
4672 "The watch descriptor is returned by later B<read>(2)s from the inotify file "
4673 "descriptor.  These reads fetch I<inotify_event> structures (see "
4674 "B<inotify>(7))  indicating filesystem events; the watch descriptor inside "
4675 "this structure identifies the object for which the event occurred."
4676 msgstr ""
4677 "これ以降に inotify ファイルディスクリプターから B<read>(2)  を行うと、監視対"
4678 "象ディスクリプターが返される。 これらの B<read>()  を行うと、ファイルシステム"
4679 "イベントを示す I<inotify_event> 構造体が読み出される (B<inotify>(7)  参照)。"
4680 "この構造体内の監視対象ディスクリプターにより、 どのオブジェクトでそのイベント"
4681 "が発生したかを特定できる。"
4682
4683 #. type: Plain text
4684 #: build/C/man2/inotify_add_watch.2:84
4685 msgid ""
4686 "On success, B<inotify_add_watch>()  returns a nonnegative watch descriptor.  "
4687 "On error, -1 is returned and I<errno> is set appropriately."
4688 msgstr ""
4689 "成功すると、 B<inotify_add_watch>()  は非負の監視対象ディスクリプターを返"
4690 "す。 エラーの場合、-1 を返し、 I<errno> を適切に設定する。"
4691
4692 #. type: TP
4693 #: build/C/man2/inotify_add_watch.2:85
4694 #, no-wrap
4695 msgid "B<EACCES>"
4696 msgstr "B<EACCES>"
4697
4698 #. type: Plain text
4699 #: build/C/man2/inotify_add_watch.2:88
4700 msgid "Read access to the given file is not permitted."
4701 msgstr "指定されたファイルに対する読み出しアクセスが許可されていない。"
4702
4703 #. type: Plain text
4704 #: build/C/man2/inotify_add_watch.2:91
4705 msgid "The given file descriptor is not valid."
4706 msgstr "指定されたファイルディスクリプターが有効ではない。"
4707
4708 #. type: TP
4709 #: build/C/man2/inotify_add_watch.2:91
4710 #, no-wrap
4711 msgid "B<EFAULT>"
4712 msgstr "B<EFAULT>"
4713
4714 #. type: Plain text
4715 #: build/C/man2/inotify_add_watch.2:95
4716 msgid "I<pathname> points outside of the process's accessible address space."
4717 msgstr ""
4718 "I<pathname> が指すアドレスがプロセスがアクセスできるアドレス空間外である。"
4719
4720 #. type: Plain text
4721 #: build/C/man2/inotify_add_watch.2:100
4722 msgid ""
4723 "The given event mask contains no valid events; or I<fd> is not an inotify "
4724 "file descriptor."
4725 msgstr ""
4726 "指定されたイベントマスクに有効なイベントが含まれていない。 もしくは I<fd> が "
4727 "inotify ファイルディスクリプターではない。"
4728
4729 #. type: TP
4730 #: build/C/man2/inotify_add_watch.2:100
4731 #, no-wrap
4732 msgid "B<ENAMETOOLONG>"
4733 msgstr "B<ENAMETOOLONG>"
4734
4735 #. type: Plain text
4736 #: build/C/man2/inotify_add_watch.2:104
4737 msgid "I<pathname> is too long."
4738 msgstr "I<pathname> が長過ぎる。"
4739
4740 #. type: Plain text
4741 #: build/C/man2/inotify_add_watch.2:109
4742 msgid ""
4743 "A directory component in I<pathname> does not exist or is a dangling "
4744 "symbolic link."
4745 msgstr ""
4746 "I<pathname> のディレクトリ部分の構成要素が、存在しないか、\n"
4747 "リンク切れのシンボリックリンクである。"
4748
4749 #. type: Plain text
4750 #: build/C/man2/inotify_add_watch.2:112
4751 msgid "Insufficient kernel memory was available."
4752 msgstr "カーネルメモリが十分になかった。"
4753
4754 #. type: Plain text
4755 #: build/C/man2/inotify_add_watch.2:116
4756 msgid ""
4757 "The user limit on the total number of inotify watches was reached or the "
4758 "kernel failed to allocate a needed resource."
4759 msgstr ""
4760 "inotify 監視対象の総数がユーザが追加できる上限に達していた。 もしくは、必要な"
4761 "資源の割り当てにカーネルが失敗した。"
4762
4763 #. type: Plain text
4764 #: build/C/man2/inotify_add_watch.2:118 build/C/man2/inotify_rm_watch.2:69
4765 msgid "Inotify was merged into the 2.6.13 Linux kernel."
4766 msgstr "inotify は Linux カーネル 2.6.13 に組み込まれた。"
4767
4768 #. type: Plain text
4769 #: build/C/man2/inotify_add_watch.2:124
4770 msgid "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4771 msgstr "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4772
4773 #. type: TH
4774 #: build/C/man2/inotify_init.2:29
4775 #, no-wrap
4776 msgid "INOTIFY_INIT"
4777 msgstr "INOTIFY_INIT"
4778
4779 #. type: TH
4780 #: build/C/man2/inotify_init.2:29
4781 #, no-wrap
4782 msgid "2014-03-28"
4783 msgstr "2014-03-28"
4784
4785 #. type: Plain text
4786 #: build/C/man2/inotify_init.2:32
4787 msgid "inotify_init, inotify_init1 - initialize an inotify instance"
4788 msgstr "inotify_init, inotify_init1 - inotify インスタンスを初期化する"
4789
4790 #. type: Plain text
4791 #: build/C/man2/inotify_init.2:35
4792 #, no-wrap
4793 msgid "B<#include E<lt>sys/inotify.hE<gt>>\n"
4794 msgstr "B<#include E<lt>sys/inotify.hE<gt>>\n"
4795
4796 #. type: Plain text
4797 #: build/C/man2/inotify_init.2:38
4798 #, no-wrap
4799 msgid ""
4800 "B<int inotify_init(void);>\n"
4801 "B<int inotify_init1(int >I<flags>B<);>\n"
4802 msgstr ""
4803 "B<int inotify_init(void);>\n"
4804 "B<int inotify_init1(int >I<flags>B<);>\n"
4805
4806 #. type: Plain text
4807 #: build/C/man2/inotify_init.2:42
4808 msgid "For an overview of the inotify API, see B<inotify>(7)."
4809 msgstr "inotify API の概要については B<inotify>(7) を参照。"
4810
4811 #. type: Plain text
4812 #: build/C/man2/inotify_init.2:46
4813 msgid ""
4814 "B<inotify_init>()  initializes a new inotify instance and returns a file "
4815 "descriptor associated with a new inotify event queue."
4816 msgstr ""
4817 "B<inotify_init>()  は、新規の inotify インスタンスを初期化し、作成された "
4818 "inotify イベントキュー に対応するファイルディスクリプターを返す。"
4819
4820 #. type: Plain text
4821 #: build/C/man2/inotify_init.2:56
4822 msgid ""
4823 "If I<flags> is 0, then B<inotify_init1>()  is the same as "
4824 "B<inotify_init>().  The following values can be bitwise ORed in I<flags> to "
4825 "obtain different behavior:"
4826 msgstr ""
4827 "B<inotify_init1>()  は、 I<flags> が 0 の場合、 B<inotify_init>()  と同じであ"
4828 "る。 I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作"
4829 "をさせることができる。"
4830
4831 #. type: TP
4832 #: build/C/man2/inotify_init.2:56
4833 #, no-wrap
4834 msgid "B<IN_NONBLOCK>"
4835 msgstr "B<IN_NONBLOCK>"
4836
4837 #. type: Plain text
4838 #: build/C/man2/inotify_init.2:64
4839 msgid ""
4840 "Set the B<O_NONBLOCK> file status flag on the new open file description.  "
4841 "Using this flag saves extra calls to B<fcntl>(2)  to achieve the same result."
4842 msgstr ""
4843 "新しく生成されるオープンファイル記述 (open file description) の BR "
4844 "O_NONBLOCK ファイルステータスフラグをセットする。 このフラグを使うことで、 "
4845 "B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなくな"
4846 "る。"
4847
4848 #. type: TP
4849 #: build/C/man2/inotify_init.2:64
4850 #, no-wrap
4851 msgid "B<IN_CLOEXEC>"
4852 msgstr "B<IN_CLOEXEC>"
4853
4854 #. type: Plain text
4855 #: build/C/man2/inotify_init.2:74
4856 msgid ""
4857 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
4858 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
4859 "may be useful."
4860 msgstr ""
4861 "新しいファイルディスクリプターに対して close-on-exec (B<FD_CLOEXEC>)  フラグ"
4862 "をセットする。 このフラグが役に立つ理由については、 B<open>(2)  の "
4863 "B<O_CLOEXEC> フラグの説明を参照のこと。"
4864
4865 #. type: Plain text
4866 #: build/C/man2/inotify_init.2:79
4867 msgid ""
4868 "On success, these system calls return a new file descriptor.  On error, -1 "
4869 "is returned, and I<errno> is set to indicate the error."
4870 msgstr ""
4871 "成功すると、これらのシステムコールは新しいファイルディスクリプターを返す。 エ"
4872 "ラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
4873
4874 #. type: Plain text
4875 #: build/C/man2/inotify_init.2:85
4876 msgid "(B<inotify_init1>())  An invalid value was specified in I<flags>."
4877 msgstr "(B<inotify_init1>())  無効な値が I<flags> に指定された。"
4878
4879 #. type: Plain text
4880 #: build/C/man2/inotify_init.2:88
4881 msgid ""
4882 "The user limit on the total number of inotify instances has been reached."
4883 msgstr "inotify インスタンスの総数がユーザ単位の上限に達していた。"
4884
4885 #. type: Plain text
4886 #: build/C/man2/inotify_init.2:91
4887 msgid ""
4888 "The system limit on the total number of file descriptors has been reached."
4889 msgstr "inotify ファイルディスクリプターの総数がシステムの上限に達していた。"
4890
4891 #. type: Plain text
4892 #: build/C/man2/inotify_init.2:94
4893 msgid "Insufficient kernel memory is available."
4894 msgstr "カーネルメモリが十分になかった。"
4895
4896 #. type: Plain text
4897 #: build/C/man2/inotify_init.2:101
4898 msgid ""
4899 "B<inotify_init>()  first appeared in Linux 2.6.13; library support was added "
4900 "to glibc in version 2.4.  B<inotify_init1>()  was added in Linux 2.6.27; "
4901 "library support was added to glibc in version 2.9."
4902 msgstr ""
4903 "B<inotify_init>()  は Linux 2.6.13 で初めて登場し、\n"
4904 "ライブラリによるサポートは glibc バージョン 2.4 で追加された。\n"
4905 "B<inotify_init1>()  は Linux 2.6.27 で追加され、\n"
4906 "ライブラリによるサポートは glibc バージョン 2.9 で追加された。"
4907
4908 #. type: Plain text
4909 #: build/C/man2/inotify_init.2:103
4910 msgid "These system calls are Linux-specific."
4911 msgstr "これらのシステムコールは Linux 独自である。"
4912
4913 #. type: Plain text
4914 #: build/C/man2/inotify_init.2:107
4915 msgid "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4916 msgstr "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4917
4918 #. type: TH
4919 #: build/C/man2/inotify_rm_watch.2:27
4920 #, no-wrap
4921 msgid "INOTIFY_RM_WATCH"
4922 msgstr "INOTIFY_RM_WATCH"
4923
4924 #. type: TH
4925 #: build/C/man2/inotify_rm_watch.2:27
4926 #, no-wrap
4927 msgid "2010-10-15"
4928 msgstr "2010-10-15"
4929
4930 #. type: Plain text
4931 #: build/C/man2/inotify_rm_watch.2:30
4932 msgid "inotify_rm_watch - remove an existing watch from an inotify instance"
4933 msgstr ""
4934 "inotify_rm_watch - inotify インスタンスから既存の監視アイテムを削除する"
4935
4936 #.  Before glibc 2.10, the second argument was types as uint32_t.
4937 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
4938 #. type: Plain text
4939 #: build/C/man2/inotify_rm_watch.2:36
4940 msgid "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4941 msgstr "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4942
4943 #. type: Plain text
4944 #: build/C/man2/inotify_rm_watch.2:42
4945 msgid ""
4946 "B<inotify_rm_watch>()  removes the watch associated with the watch "
4947 "descriptor I<wd> from the inotify instance associated with the file "
4948 "descriptor I<fd>."
4949 msgstr ""
4950 "B<inotify_rm_watch>()  は、監視対象ディスクリプター (watch descriptor)  "
4951 "I<wd> に対応する監視アイテムを、 ファイルディスクリプター I<fd> に対応する "
4952 "inotify インスタンスから削除する。"
4953
4954 #. type: Plain text
4955 #: build/C/man2/inotify_rm_watch.2:48
4956 msgid ""
4957 "Removing a watch causes an B<IN_IGNORED> event to be generated for this "
4958 "watch descriptor.  (See B<inotify>(7).)"
4959 msgstr ""
4960 "監視対象を削除すると、 この監視対象ディスクリプターに対して B<IN_IGNORED> イ"
4961 "ベントが生成される (B<inotify>(7)  参照)。"
4962
4963 #. type: Plain text
4964 #: build/C/man2/inotify_rm_watch.2:55
4965 msgid ""
4966 "On success, B<inotify_rm_watch>()  returns zero.  On error, -1 is returned "
4967 "and I<errno> is set to indicate the cause of the error."
4968 msgstr ""
4969 "成功すると、B<inotify_rm_watch>() は 0 を返す。 エラーの場合、-1 を返し、 "
4970 "I<errno> をエラーの原因を示す値に設定する。"
4971
4972 #. type: Plain text
4973 #: build/C/man2/inotify_rm_watch.2:60
4974 msgid "I<fd> is not a valid file descriptor."
4975 msgstr "I<fd> が有効なファイルディスクリプターではない。"
4976
4977 #. type: Plain text
4978 #: build/C/man2/inotify_rm_watch.2:67
4979 msgid ""
4980 "The watch descriptor I<wd> is not valid; or I<fd> is not an inotify file "
4981 "descriptor."
4982 msgstr ""
4983 "監視対象ディスクリプター I<wd> が有効でない。もしくは、 I<fd> が inotify ファ"
4984 "イルディスクリプターではない。"
4985
4986 #. type: Plain text
4987 #: build/C/man2/inotify_rm_watch.2:75
4988 msgid "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"
4989 msgstr "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"