OSDN Git Service

LDP: Update POT and ja.po to LDP v3.79
[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-02-04 23:30+0900\n"
10 "PO-Revision-Date: 2015-01-25 07:22+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 #, fuzzy
1767 #| msgid ""
1768 #| "This page is part of release 3.78 of the Linux I<man-pages> project.  A "
1769 #| "description of the project, information about reporting bugs, and the "
1770 #| "latest version of this page, can be found at \\%http://www.kernel.org/doc/"
1771 #| "man-pages/."
1772 msgid ""
1773 "This page is part of release 3.79 of the Linux I<man-pages> project.  A "
1774 "description of the project, information about reporting bugs, and the latest "
1775 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
1776 "pages/."
1777 msgstr ""
1778 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
1779 "である。プロジェクトの説明とバグ報告に関する情報は\n"
1780 "http://www.kernel.org/doc/man-pages/ に書かれている。"
1781
1782 #. type: TH
1783 #: build/C/man2/fanotify_init.2:24
1784 #, no-wrap
1785 msgid "FANOTIFY_INIT"
1786 msgstr "FANOTIFY_INIT"
1787
1788 #. type: TH
1789 #: build/C/man2/fanotify_init.2:24 build/C/man2/fanotify_mark.2:24
1790 #, no-wrap
1791 msgid "2014-10-02"
1792 msgstr "2014-10-02"
1793
1794 #. type: Plain text
1795 #: build/C/man2/fanotify_init.2:27
1796 msgid "fanotify_init - create and initialize fanotify group"
1797 msgstr "fanotify_init - fanotify グループを作成し、初期化する"
1798
1799 #. type: SH
1800 #: build/C/man2/fanotify_init.2:27 build/C/man2/fanotify_mark.2:28
1801 #: build/C/man2/inotify_add_watch.2:31 build/C/man2/inotify_init.2:32
1802 #: build/C/man2/inotify_rm_watch.2:30
1803 #, no-wrap
1804 msgid "SYNOPSIS"
1805 msgstr "書式"
1806
1807 #. type: Plain text
1808 #: build/C/man2/fanotify_init.2:29
1809 msgid "B<#include E<lt>fcntl.hE<gt>>"
1810 msgstr "B<#include E<lt>fcntl.hE<gt>>"
1811
1812 #. type: Plain text
1813 #: build/C/man2/fanotify_init.2:31
1814 msgid "B<#include E<lt>sys/fanotify.hE<gt>>"
1815 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>"
1816
1817 #. type: Plain text
1818 #: build/C/man2/fanotify_init.2:33
1819 msgid ""
1820 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1821 ">I<event_f_flags>B<);>"
1822 msgstr ""
1823 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1824 ">I<event_f_flags>B<);>"
1825
1826 #. type: Plain text
1827 #: build/C/man2/fanotify_init.2:36 build/C/man2/fanotify_mark.2:39
1828 msgid "For an overview of the fanotify API, see B<fanotify>(7)."
1829 msgstr "fanotify API の概要については B<fanotify>(7) を参照。"
1830
1831 #. type: Plain text
1832 #: build/C/man2/fanotify_init.2:40
1833 msgid ""
1834 "B<fanotify_init>()  initializes a new fanotify group and returns a file "
1835 "descriptor for the event queue associated with the group."
1836 msgstr ""
1837 "B<fanotify_init>() は新しい fanotify グループを初期化し、 このグループに関連"
1838 "付けられたイベントキューに対するファイルディスクリプターを返す。"
1839
1840 #. type: Plain text
1841 #: build/C/man2/fanotify_init.2:51
1842 msgid ""
1843 "The file descriptor is used in calls to B<fanotify_mark>(2)  to specify the "
1844 "files, directories, and mounts for which fanotify events shall be created.  "
1845 "These events are received by reading from the file descriptor.  Some events "
1846 "are only informative, indicating that a file has been accessed.  Other "
1847 "events can be used to determine whether another application is permitted to "
1848 "access a file or directory.  Permission to access filesystem objects is "
1849 "granted by writing to the file descriptor."
1850 msgstr ""
1851 "このファイルディスクリプターは、 B<fanotify_mark>(2) の呼び出しで fanotify イ"
1852 "ベントが作成されるファイル、 ディレクトリ、 マウントを指定するのに使用でき"
1853 "る。 B<fanotify_mark>(2) で指定したファイル、 これらのイベントは、 このファイ"
1854 "ルディスクリプターからの読み出しで受信する。 いくつかのイベントは、 ファイル"
1855 "がアクセスされたことを示す単なる情報である。 他のいくつかのイベントは、 別の"
1856 "アプリケーションがファイルやディレクトリにアクセスする許可を与えるかを判定す"
1857 "るのに使用される。 ファイルシステムオブジェクトへのアクセス許可イベントについ"
1858 "ては、 承認結果をこのファイルディスクリプターに書き込む。"
1859
1860 #. type: Plain text
1861 #: build/C/man2/fanotify_init.2:54
1862 msgid ""
1863 "Multiple programs may be using the fanotify interface at the same time to "
1864 "monitor the same files."
1865 msgstr ""
1866 "複数のプログラムが同時に fanotify インターフェースを使って同じファイルを同時"
1867 "に監視することができる。"
1868
1869 #. type: Plain text
1870 #: build/C/man2/fanotify_init.2:58
1871 msgid ""
1872 "In the current implementation, the number of fanotify groups per user is "
1873 "limited to 128.  This limit cannot be overridden."
1874 msgstr ""
1875 "現在の実装では、 ユーザーあたりの fanotify グループ数は 128 に制限されてい"
1876 "る。 この制限は上書きすることができない。"
1877
1878 #. type: Plain text
1879 #: build/C/man2/fanotify_init.2:67
1880 msgid ""
1881 "Calling B<fanotify_init>()  requires the B<CAP_SYS_ADMIN> capability.  This "
1882 "constraint might be relaxed in future versions of the API.  Therefore, "
1883 "certain additional capability checks have been implemented as indicated "
1884 "below."
1885 msgstr ""
1886 "B<fanotify_init>() を呼び出すには B<CAP_SYS_ADMIN> ケーパビリティーが必要であ"
1887 "る。 この制約は将来のバージョンの API で緩和される可能性がある。 そのため、 "
1888 "以下に示すケーパビリティーチェックのいくつかが実装されている。"
1889
1890 #. type: Plain text
1891 #: build/C/man2/fanotify_init.2:73
1892 msgid ""
1893 "The I<flags> argument contains a multi-bit field defining the notification "
1894 "class of the listening application and further single bit fields specifying "
1895 "the behavior of the file descriptor."
1896 msgstr ""
1897 "I<flags> 引き数は、 イベントを待つアプリケーションの通知クラスを定義する複数"
1898 "ビットのフィールドである。 これに加えて、 このファイルディスクリプターの動作"
1899 "を示す 1 ビットのフィールドがある。"
1900
1901 #. type: Plain text
1902 #: build/C/man2/fanotify_init.2:77
1903 msgid ""
1904 "If multiple listeners for permission events exist, the notification class is "
1905 "used to establish the sequence in which the listeners receive the events."
1906 msgstr ""
1907 "アクセス許可イベントを監視しているプログラムが複数いる場合、 通知クラスを使っ"
1908 "て監視するプログラムのイベント受信順序が管理される。"
1909
1910 #. type: Plain text
1911 #: build/C/man2/fanotify_init.2:80
1912 msgid ""
1913 "Only one of the following notification classes may be specified in I<flags>:"
1914 msgstr "以下の通知クラスのいずれか一つだけを I<flags> に指定できる。"
1915
1916 #. type: TP
1917 #: build/C/man2/fanotify_init.2:80
1918 #, no-wrap
1919 msgid "B<FAN_CLASS_PRE_CONTENT>"
1920 msgstr "B<FAN_CLASS_PRE_CONTENT>"
1921
1922 #. type: Plain text
1923 #: build/C/man2/fanotify_init.2:88
1924 msgid ""
1925 "This value allows the receipt of events notifying that a file has been "
1926 "accessed and events for permission decisions if a file may be accessed.  It "
1927 "is intended for event listeners that need to access files before they "
1928 "contain their final data.  This notification class might be used by "
1929 "hierarchical storage managers, for example."
1930 msgstr ""
1931 "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのア"
1932 "クセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント"
1933 "受信者がファイルが最終的なデータを格納する前にそのファイルにアクセスする必要"
1934 "がある場合に使用される。 この通知クラスは例えば階層型ストレージ管理などで使用"
1935 "される。"
1936
1937 #. type: TP
1938 #: build/C/man2/fanotify_init.2:88
1939 #, no-wrap
1940 msgid "B<FAN_CLASS_CONTENT>"
1941 msgstr "B<FAN_CLASS_CONTENT>"
1942
1943 #. type: Plain text
1944 #: build/C/man2/fanotify_init.2:96
1945 msgid ""
1946 "This value allows the receipt of events notifying that a file has been "
1947 "accessed and events for permission decisions if a file may be accessed.  It "
1948 "is intended for event listeners that need to access files when they already "
1949 "contain their final content.  This notification class might be used by "
1950 "malware detection programs, for example."
1951 msgstr ""
1952 "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのア"
1953 "クセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント"
1954 "受信者がファイルに最終的なデータが格納された際にそのファイルにアクセスする必"
1955 "要がある場合に使用される。 この通知クラスは例えばウイルス検知プログラムなどで"
1956 "使用される。"
1957
1958 #. type: TP
1959 #: build/C/man2/fanotify_init.2:96
1960 #, no-wrap
1961 msgid "B<FAN_CLASS_NOTIF>"
1962 msgstr "B<FAN_CLASS_NOTIF>"
1963
1964 #. type: Plain text
1965 #: build/C/man2/fanotify_init.2:103
1966 msgid ""
1967 "This is the default value.  It does not need to be specified.  This value "
1968 "only allows the receipt of events notifying that a file has been accessed.  "
1969 "Permission decisions before the file is accessed are not possible."
1970 msgstr ""
1971 "これはデフォルト値である。 この値を指定する必要はない。 この値は、 ファイルが"
1972 "アクセスされたことを通知するイベントの受信だけを行うことを意味する。 ファイル"
1973 "がアクセスする前にアクセス許可の判定を行うことはできない。"
1974
1975 #. type: Plain text
1976 #: build/C/man2/fanotify_init.2:111
1977 msgid ""
1978 "Listeners with different notification classes will receive events in the "
1979 "order B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, B<FAN_CLASS_NOTIF>.  "
1980 "The order of notification for listeners in the same notification class is "
1981 "undefined."
1982 msgstr ""
1983 "異なる通知クラスの受信者は B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, "
1984 "B<FAN_CLASS_NOTIF> の順序でイベントを受信する。 同じ通知クラスの受信者での通"
1985 "知順序は不定である。"
1986
1987 #. type: Plain text
1988 #: build/C/man2/fanotify_init.2:114
1989 msgid "The following bits can additionally be set in I<flags>:"
1990 msgstr "I<flags> には以下のビットを追加でセットすることができる。"
1991
1992 #. type: TP
1993 #: build/C/man2/fanotify_init.2:114
1994 #, no-wrap
1995 msgid "B<FAN_CLOEXEC>"
1996 msgstr "B<FAN_CLOEXEC>"
1997
1998 #. type: Plain text
1999 #: build/C/man2/fanotify_init.2:123
2000 msgid ""
2001 "Set the close-on-exec flag (B<FD_CLOEXEC>)  on the new file descriptor.  See "
2002 "the description of the B<O_CLOEXEC> flag in B<open>(2)."
2003 msgstr ""
2004 "close-on-exec フラグ (B<FD_CLOEXEC>) を新しいファイルディスクリプターにセット"
2005 "する。 B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
2006
2007 #. type: TP
2008 #: build/C/man2/fanotify_init.2:123
2009 #, no-wrap
2010 msgid "B<FAN_NONBLOCK>"
2011 msgstr "B<FAN_NONBLOCK>"
2012
2013 #. type: Plain text
2014 #: build/C/man2/fanotify_init.2:133
2015 msgid ""
2016 "Enable the nonblocking flag (B<O_NONBLOCK>)  for the file descriptor.  "
2017 "Reading from the file descriptor will not block.  Instead, if no data is "
2018 "available, B<read>(2)  will fail with the error B<EAGAIN>."
2019 msgstr ""
2020 "ノンブロッキングフラグ (B<O_NONBLOCK>) をそのファイルディスクリプターで有効に"
2021 "する。 このファイルディスクリプターからの読み出しは停止しない。 その代わり、 "
2022 "読みだし可能なデータが何もない場合、 B<read>(2) はエラー B<EAGAIN> で失敗す"
2023 "る。"
2024
2025 #. type: TP
2026 #: build/C/man2/fanotify_init.2:133
2027 #, no-wrap
2028 msgid "B<FAN_UNLIMITED_QUEUE>"
2029 msgstr "B<FAN_UNLIMITED_QUEUE>"
2030
2031 #. type: Plain text
2032 #: build/C/man2/fanotify_init.2:139
2033 msgid ""
2034 "Remove the limit of 16384 events for the event queue.  Use of this flag "
2035 "requires the B<CAP_SYS_ADMIN> capability."
2036 msgstr ""
2037 "そのイベントキューの 16384 イベントの上限を削除する。 このフラグを使用するに"
2038 "は B<CAP_SYS_ADMIN> ケーパビリティーが必要である。"
2039
2040 #. type: TP
2041 #: build/C/man2/fanotify_init.2:139
2042 #, no-wrap
2043 msgid "B<FAN_UNLIMITED_MARKS>"
2044 msgstr "B<FAN_UNLIMITED_MARKS>"
2045
2046 #. type: Plain text
2047 #: build/C/man2/fanotify_init.2:145
2048 msgid ""
2049 "Remove the limit of 8192 marks.  Use of this flag requires the "
2050 "B<CAP_SYS_ADMIN> capability."
2051 msgstr ""
2052 "8192 マークの上限を削除する。 このフラグを使用するには B<CAP_SYS_ADMIN> ケー"
2053 "パビリティーが必要である。"
2054
2055 #. type: Plain text
2056 #: build/C/man2/fanotify_init.2:158
2057 msgid ""
2058 "The I<event_f_flags> argument defines the file status flags that will be set "
2059 "on the open file descriptions that are created for fanotify events.  For "
2060 "details of these flags, see the description of the I<flags> values in "
2061 "B<open>(2).  I<event_f_flags> includes a multi-bit field for the access "
2062 "mode.  This field can take the following values:"
2063 msgstr ""
2064 "I<event_f_flags> 引き数は fanotify イベントが作成されるオープンファイル記述に"
2065 "セットされるファイル状態フラグを定義する。 これらのフラグの詳細については "
2066 "B<open>(2) の I<flags> 値の説明を参照のこと。 I<event_f_flags> にはアクセス"
2067 "モードのビットを複数入れることができる。 このフィールドには以下の値も指定する"
2068 "ことができる。"
2069
2070 #. type: TP
2071 #: build/C/man2/fanotify_init.2:158
2072 #, no-wrap
2073 msgid "B<O_RDONLY>"
2074 msgstr "B<O_RDONLY>"
2075
2076 #. type: Plain text
2077 #: build/C/man2/fanotify_init.2:161
2078 msgid "This value allows only read access."
2079 msgstr "読み出しアクセスのみを許可する。"
2080
2081 #. type: TP
2082 #: build/C/man2/fanotify_init.2:161
2083 #, no-wrap
2084 msgid "B<O_WRONLY>"
2085 msgstr "B<O_WRONLY>"
2086
2087 #. type: Plain text
2088 #: build/C/man2/fanotify_init.2:164
2089 msgid "This value allows only write access."
2090 msgstr "書き込みアクセスのみを許可する。"
2091
2092 #. type: TP
2093 #: build/C/man2/fanotify_init.2:164
2094 #, no-wrap
2095 msgid "B<O_RDWR>"
2096 msgstr "B<O_RDWR>"
2097
2098 #. type: Plain text
2099 #: build/C/man2/fanotify_init.2:167
2100 msgid "This value allows read and write access."
2101 msgstr "読み出しと書き込みの両方を許可する。"
2102
2103 #. type: Plain text
2104 #: build/C/man2/fanotify_init.2:171
2105 msgid ""
2106 "Additional bits can be set in I<event_f_flags>.  The most useful values are:"
2107 msgstr ""
2108 "他のビットも I<event_f_flags> もセットすることができる。 役立つであろう値は以"
2109 "下である。"
2110
2111 #. type: TP
2112 #: build/C/man2/fanotify_init.2:171
2113 #, no-wrap
2114 msgid "B<O_LARGEFILE>"
2115 msgstr "B<O_LARGEFILE>"
2116
2117 #. type: Plain text
2118 #: build/C/man2/fanotify_init.2:178
2119 msgid ""
2120 "Enable support for files exceeding 2 GB.  Failing to set this flag will "
2121 "result in an B<EOVERFLOW> error when trying to open a large file which is "
2122 "monitored by an fanotify group on a 32-bit system."
2123 msgstr ""
2124 "2 GB を超えるファイルのサポートを有効にする。 このフラグのセットに失敗する"
2125 "と、 32 ビットシステムで fanotify グループが監視するラージファイルをオープン"
2126 "しようとした際に B<EOVERFLOW> エラーとなる。"
2127
2128 #. type: TP
2129 #: build/C/man2/fanotify_init.2:178
2130 #, no-wrap
2131 msgid "B<O_CLOEXEC>"
2132 msgstr "B<O_CLOEXEC>"
2133
2134 #. type: Plain text
2135 #: build/C/man2/fanotify_init.2:186
2136 msgid ""
2137 "Enable the close-on-exec flag for the file descriptor.  See the description "
2138 "of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this may be useful."
2139 msgstr ""
2140 "このファイルディスクリプターで close-on-exec フラグを有効にする。 このフラグ"
2141 "が役立つ理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
2142
2143 #. type: Plain text
2144 #: build/C/man2/fanotify_init.2:199
2145 msgid ""
2146 "The following are also allowable: B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, "
2147 "B<O_NONBLOCK>, and B<O_SYNC>.  Specifying any other flag in I<event_f_flags> "
2148 "yields the error B<EINVAL> (but see BUGS)."
2149 msgstr ""
2150 "B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, B<O_NONBLOCK>, B<O_SYNC> も指定するこ"
2151 "とができる。 I<event_f_flags> にこれ以外のフラグを指定すると、 エラー "
2152 "B<EINVAL> が起こる (ただし、バグを参照)。"
2153
2154 #. type: SH
2155 #: build/C/man2/fanotify_init.2:199 build/C/man2/fanotify_mark.2:236
2156 #: build/C/man2/inotify_add_watch.2:77 build/C/man2/inotify_init.2:74
2157 #: build/C/man2/inotify_rm_watch.2:48
2158 #, no-wrap
2159 msgid "RETURN VALUE"
2160 msgstr "返り値"
2161
2162 #. type: Plain text
2163 #: build/C/man2/fanotify_init.2:206
2164 msgid ""
2165 "On success, B<fanotify_init>()  returns a new file descriptor.  On error, -1 "
2166 "is returned, and I<errno> is set to indicate the error."
2167 msgstr ""
2168 "成功すると B<fanotify_init>() は新しいファイルディスクリプターを返す。 エラー"
2169 "の場合、 -1 を返し、 I<errno> にエラーを示す値を設定する。"
2170
2171 #. type: Plain text
2172 #: build/C/man2/fanotify_init.2:216
2173 msgid ""
2174 "An invalid value was passed in I<flags> or I<event_f_flags>.  "
2175 "B<FAN_ALL_INIT_FLAGS> defines all allowable bits for I<flags>."
2176 msgstr ""
2177 "I<flags> か I<event_f_flags> に無効な値が渡された。 B<FAN_ALL_INIT_FLAGS> で "
2178 "I<flags> に指定できる全ビットが定義されている。"
2179
2180 #. type: Plain text
2181 #: build/C/man2/fanotify_init.2:219
2182 msgid "The number of fanotify groups for this user exceeds 128."
2183 msgstr "このユーザーの fanotify グループ数が 128 を超過した。"
2184
2185 #. type: TP
2186 #: build/C/man2/fanotify_init.2:219 build/C/man2/fanotify_mark.2:274
2187 #: build/C/man2/inotify_add_watch.2:109 build/C/man2/inotify_init.2:91
2188 #, no-wrap
2189 msgid "B<ENOMEM>"
2190 msgstr "B<ENOMEM>"
2191
2192 #. type: Plain text
2193 #: build/C/man2/fanotify_init.2:222
2194 msgid "The allocation of memory for the notification group failed."
2195 msgstr "通知グループへのメモリー割り当てが失敗した。"
2196
2197 #. type: TP
2198 #: build/C/man2/fanotify_init.2:222 build/C/man2/fanotify_mark.2:283
2199 #, no-wrap
2200 msgid "B<ENOSYS>"
2201 msgstr "B<ENOSYS>"
2202
2203 #. type: Plain text
2204 #: build/C/man2/fanotify_init.2:228
2205 msgid ""
2206 "This kernel does not implement B<fanotify_init>().  The fanotify API is "
2207 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
2208 msgstr ""
2209 "このカーネルは B<fanotify_init>() を実装していない。 fanotify API が利用でき"
2210 "るのは、 カーネルが B<CONFIG_FANOTIFY> を有効にして作成されている場合だけであ"
2211 "る。"
2212
2213 #. type: TP
2214 #: build/C/man2/fanotify_init.2:228
2215 #, no-wrap
2216 msgid "B<EPERM>"
2217 msgstr "B<EPERM>"
2218
2219 #. type: Plain text
2220 #: build/C/man2/fanotify_init.2:233
2221 msgid ""
2222 "The operation is not permitted because the caller lacks the B<CAP_SYS_ADMIN> "
2223 "capability."
2224 msgstr ""
2225 "呼び出し元が B<CAP_SYS_ADMIN> ケーパビリティーを持っていないので、操作が許可"
2226 "されない。"
2227
2228 #. type: Plain text
2229 #: build/C/man2/fanotify_init.2:237
2230 msgid ""
2231 "B<fanotify_init>()  was introduced in version 2.6.36 of the Linux kernel and "
2232 "enabled in version 2.6.37."
2233 msgstr ""
2234 "B<fanotify_init>() は Linux カーネルのバージョン 2.6.36 で導入され、 バージョ"
2235 "ン 2.6.37 で有効になった。"
2236
2237 #. type: Plain text
2238 #: build/C/man2/fanotify_init.2:239 build/C/man2/fanotify_mark.2:305
2239 #: build/C/man2/inotify_add_watch.2:120 build/C/man2/inotify_rm_watch.2:71
2240 msgid "This system call is Linux-specific."
2241 msgstr "このシステムコールは Linux 独自である。"
2242
2243 #. type: Plain text
2244 #: build/C/man2/fanotify_init.2:242
2245 msgid "As of Linux 3.17, the following bug exists:"
2246 msgstr "Linux 3.17 時点では、 以下のバグが存在する。"
2247
2248 #.  FIXME . Patch proposed: https://lkml.org/lkml/2014/9/24/967
2249 #. type: Plain text
2250 #: build/C/man2/fanotify_init.2:248
2251 msgid "The B<O_CLOEXEC> is ignored when passed in I<event_f_flags>."
2252 msgstr "B<O_CLOEXEC> が I<event_f_flags> に指定された場合、 無視される。"
2253
2254 #. type: Plain text
2255 #: build/C/man2/fanotify_init.2:250
2256 msgid "The following bug was present in Linux kernels before version 3.14:"
2257 msgstr "バージョン 3.14 より前の Linux カーネルには以下のバグが存在する。"
2258
2259 #.  Fixed by commit 48149e9d3a7e924010a0daab30a6197b7d7b6580
2260 #. type: Plain text
2261 #: build/C/man2/fanotify_init.2:260
2262 msgid ""
2263 "The I<event_f_flags> argument is not checked for invalid flags.  Flags that "
2264 "are intended only for internal use, such as B<FMODE_EXEC>, can be set, and "
2265 "will consequently be set for the file descriptors returned when reading from "
2266 "the fanotify file descriptor."
2267 msgstr ""
2268 "I<event_f_flags> 引き数に無効なフラグがないかのチェックが行われない。 "
2269 "B<FMODE_EXEC> などの内部での使用のみが意図されたフラグを指定することができ、 "
2270 "その場合 fanotify ファイルディスクリプターからの読み出し時に返されるファイル"
2271 "ディスクリプターにそのフラグがセットされる。"
2272
2273 #. type: Plain text
2274 #: build/C/man2/fanotify_init.2:263
2275 msgid "B<fanotify_mark>(2), B<fanotify>(7)"
2276 msgstr "B<fanotify_mark>(2), B<fanotify>(7)"
2277
2278 #. type: TH
2279 #: build/C/man2/fanotify_mark.2:24
2280 #, no-wrap
2281 msgid "FANOTIFY_MARK"
2282 msgstr "FANOTIFY_MARK"
2283
2284 #. type: Plain text
2285 #: build/C/man2/fanotify_mark.2:28
2286 msgid ""
2287 "fanotify_mark - add, remove, or modify an fanotify mark on a filesystem "
2288 "object"
2289 msgstr ""
2290 "fanotify_mark - ファイルシステムオブジェクトへの fanotify マークの追加、削"
2291 "除、変更"
2292
2293 #. type: Plain text
2294 #: build/C/man2/fanotify_mark.2:31
2295 #, no-wrap
2296 msgid "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2297 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2298
2299 #. type: Plain text
2300 #: build/C/man2/fanotify_mark.2:35
2301 #, no-wrap
2302 msgid ""
2303 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2304 "B<                  uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2305 msgstr ""
2306 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2307 "B<                  uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2308
2309 #. type: Plain text
2310 #: build/C/man2/fanotify_mark.2:44
2311 msgid ""
2312 "B<fanotify_mark>(2)  adds, removes, or modifies an fanotify mark on a "
2313 "filesystem object.  The caller must have read permission on the filesystem "
2314 "object that is to be marked."
2315 msgstr ""
2316 "B<fanotify_mark>(2) はファイルシステムオブジェクトに対する fanotify マークの"
2317 "追加、削除、変更を行う。 呼び出し元はマークを付けるファイルシステムオブジェク"
2318 "トに対する読み出し許可を持っていなければならない。"
2319
2320 #. type: Plain text
2321 #: build/C/man2/fanotify_mark.2:49
2322 msgid ""
2323 "The I<fanotify_fd> argument is a file descriptor returned by "
2324 "B<fanotify_init>(2)."
2325 msgstr ""
2326 "I<fanotify_fd> 引き数は B<fanotify_init>(2) で返されたファイルディスクリプ"
2327 "ターである。"
2328
2329 #. type: Plain text
2330 #: build/C/man2/fanotify_mark.2:53
2331 msgid ""
2332 "I<flags> is a bit mask describing the modification to perform.  It must "
2333 "include exactly one of the following values:"
2334 msgstr ""
2335 "I<flags> は実行する操作内容を示すビットマスクである。 以下の値のいずれか一つ"
2336 "だけを指定しなければならない。"
2337
2338 #. type: TP
2339 #: build/C/man2/fanotify_mark.2:53
2340 #, no-wrap
2341 msgid "B<FAN_MARK_ADD>"
2342 msgstr "B<FAN_MARK_ADD>"
2343
2344 #. type: Plain text
2345 #: build/C/man2/fanotify_mark.2:62
2346 msgid ""
2347 "The events in I<mask> will be added to the mark mask (or to the ignore "
2348 "mask).  I<mask> must be nonempty or the error B<EINVAL> will occur."
2349 msgstr ""
2350 "I<mask> のイベントを mark マスク (もしくは ignore マスク) に追加する。 "
2351 "I<mask> は空であってはいけない。 空の場合はエラー B<EINVAL> が発生する。"
2352
2353 #. type: TP
2354 #: build/C/man2/fanotify_mark.2:62
2355 #, no-wrap
2356 msgid "B<FAN_MARK_REMOVE>"
2357 msgstr "B<FAN_MARK_REMOVE>"
2358
2359 #. type: Plain text
2360 #: build/C/man2/fanotify_mark.2:71
2361 msgid ""
2362 "The events in argument I<mask> will be removed from the mark mask (or from "
2363 "the ignore mask).  I<mask> must be nonempty or the error B<EINVAL> will "
2364 "occur."
2365 msgstr ""
2366 "引き数 I<mask> のイベントを mark マスク (もしくは ignore マスク) から削除す"
2367 "る。 I<mask> は空であってはいけない。 空の場合はエラー B<EINVAL>が発生する。"
2368
2369 #. type: TP
2370 #: build/C/man2/fanotify_mark.2:71
2371 #, no-wrap
2372 msgid "B<FAN_MARK_FLUSH>"
2373 msgstr "B<FAN_MARK_FLUSH>"
2374
2375 #. type: Plain text
2376 #: build/C/man2/fanotify_mark.2:86
2377 msgid ""
2378 "Remove either all mount or all non-mount marks from the fanotify group.  If "
2379 "I<flags> contains B<FAN_MARK_MOUNT>, all marks for mounts are removed from "
2380 "the group.  Otherwise, all marks for directories and files are removed.  No "
2381 "flag other than B<FAN_MARK_MOUNT> can be used in conjunction with "
2382 "B<FAN_MARK_FLUSH>.  I<mask> is ignored."
2383 msgstr ""
2384 "fanotify グループから全てのマウント mark か全てのマウント以外の mark を削除す"
2385 "る。 I<flag> に B<FAN_MARK_MOUNT> が含まれる場合、 マウントに対する全ての "
2386 "mark がそのグループから削除される。 含まれない場合は、 ディレクトリとファイル"
2387 "に対する全ての mark が削除される。 B<FAN_MARK_MOUNT> 以外のフラグを "
2388 "B<FAN_MARK_FLUSH> と組み合わせて使うことはできない。 I<mask> は無視される。"
2389
2390 #. type: Plain text
2391 #: build/C/man2/fanotify_mark.2:90
2392 msgid ""
2393 "If none of the values above is specified, or more than one is specified, the "
2394 "call fails with the error B<EINVAL>."
2395 msgstr ""
2396 "上記のどの値も指定されなかった場合、 または 2 つ以上の値が指定された場合、 呼"
2397 "び出しはエラー B<EINVAL> で失敗する。"
2398
2399 #. type: Plain text
2400 #: build/C/man2/fanotify_mark.2:94
2401 msgid ""
2402 "In addition, zero or more of the following values may be ORed into I<flags>:"
2403 msgstr ""
2404 "これに加えて、 I<flags> に以下の値を 0 個以上ビット単位の論理和 (OR) で指定で"
2405 "きる。"
2406
2407 #. type: TP
2408 #: build/C/man2/fanotify_mark.2:94
2409 #, no-wrap
2410 msgid "B<FAN_MARK_DONT_FOLLOW>"
2411 msgstr "B<FAN_MARK_DONT_FOLLOW>"
2412
2413 #. type: Plain text
2414 #: build/C/man2/fanotify_mark.2:105
2415 msgid ""
2416 "If I<pathname> is a symbolic link, mark the link itself, rather than the "
2417 "file to which it refers.  (By default, B<fanotify_mark>()  dereferences "
2418 "I<pathname> if it is a symbolic link.)"
2419 msgstr ""
2420 "I<pathname> がシンボリックリンクの場合、 リンクが参照するファイルではなく、 "
2421 "リンク自身にマークを付ける (デフォルトでは B<fanotify_mark>() は I<pathname> "
2422 "がシンボリックリンクの場合シンボリックリンクの展開を行う)。"
2423
2424 #. type: TP
2425 #: build/C/man2/fanotify_mark.2:105
2426 #, no-wrap
2427 msgid "B<FAN_MARK_ONLYDIR>"
2428 msgstr "B<FAN_MARK_ONLYDIR>"
2429
2430 #. type: Plain text
2431 #: build/C/man2/fanotify_mark.2:110
2432 msgid ""
2433 "If the filesystem object to be marked is not a directory, the error "
2434 "B<ENOTDIR> shall be raised."
2435 msgstr ""
2436 "マークが付けられたファイルシステムオブジェクトがディレクトリでない場合、 エ"
2437 "ラー B<ENOTDIR> が発生する。"
2438
2439 #. type: TP
2440 #: build/C/man2/fanotify_mark.2:110
2441 #, no-wrap
2442 msgid "B<FAN_MARK_MOUNT>"
2443 msgstr "B<FAN_MARK_MOUNT>"
2444
2445 #. type: Plain text
2446 #: build/C/man2/fanotify_mark.2:121
2447 msgid ""
2448 "Mark the mount point specified by I<pathname>.  If I<pathname> is not itself "
2449 "a mount point, the mount point containing I<pathname> will be marked.  All "
2450 "directories, subdirectories, and the contained files of the mount point will "
2451 "be monitored."
2452 msgstr ""
2453 "I<pathname> で指定されたマウントポイントにマークを付ける。 I<pathname> がマウ"
2454 "ントポイント自身ではない場合、 I<pathname> を含むマウントポイントがマークされ"
2455 "る。 マウントポイントに含まれる全てのディレクトリ、 サブディレクトリ、 その中"
2456 "のファイルが監視される。"
2457
2458 #. type: TP
2459 #: build/C/man2/fanotify_mark.2:121
2460 #, no-wrap
2461 msgid "B<FAN_MARK_IGNORED_MASK>"
2462 msgstr "B<FAN_MARK_IGNORED_MASK>"
2463
2464 #. type: Plain text
2465 #: build/C/man2/fanotify_mark.2:126
2466 msgid ""
2467 "The events in I<mask> shall be added to or removed from the ignore mask."
2468 msgstr "I<mask> のイベントの ignore マスクへの追加、もしくは削除を行う。"
2469
2470 #. type: TP
2471 #: build/C/man2/fanotify_mark.2:126
2472 #, no-wrap
2473 msgid "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2474 msgstr "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2475
2476 #. type: Plain text
2477 #: build/C/man2/fanotify_mark.2:132
2478 msgid ""
2479 "The ignore mask shall survive modify events.  If this flag is not set, the "
2480 "ignore mask is cleared when a modify event occurs for the ignored file or "
2481 "directory."
2482 msgstr ""
2483 "ignore マスクは変更イベントが発生しても残り続ける。 このフラグがセットされて"
2484 "いない場合、 無視するファイルやディレクトリに対して変更イベントが発生した際"
2485 "に ignore マスクはクリアされる。"
2486
2487 #. type: Plain text
2488 #: build/C/man2/fanotify_mark.2:136
2489 msgid ""
2490 "I<mask> defines which events shall be listened for (or which shall be "
2491 "ignored).  It is a bit mask composed of the following values:"
2492 msgstr ""
2493 "I<mask> はどのイベントに対して通知を受けるか (もしくはどのイベントを無視する"
2494 "か) を定義する。  以下の値から構成されるビットマスクである。"
2495
2496 #. type: Plain text
2497 #: build/C/man2/fanotify_mark.2:139
2498 msgid ""
2499 "Create an event when a file or directory (but see BUGS) is accessed (read)."
2500 msgstr ""
2501 "ファイルやディレクトリへのアクセス (読み出し) があった際にイベントを作成する "
2502 "(「バグ」も参照)。"
2503
2504 #. type: Plain text
2505 #: build/C/man2/fanotify_mark.2:142
2506 msgid "Create an event when a file is modified (write)."
2507 msgstr "ファイルが変更された (書き込み) 際にイベントを作成する。"
2508
2509 #. type: Plain text
2510 #: build/C/man2/fanotify_mark.2:145
2511 msgid "Create an event when a writable file is closed."
2512 msgstr "書き込み可能ファイルがクローズされた際にイベントを作成する。"
2513
2514 #. type: Plain text
2515 #: build/C/man2/fanotify_mark.2:148
2516 msgid "Create an event when a read-only file or directory is closed."
2517 msgstr ""
2518 "読み出し専用のファイルやディレクトリがクローズされた際にイベントを作成する。"
2519
2520 #. type: Plain text
2521 #: build/C/man2/fanotify_mark.2:151
2522 msgid "Create an event when a file or directory is opened."
2523 msgstr "ファイルやディレクトリがオープンされた際にイベントを作成する。"
2524
2525 #. type: Plain text
2526 #: build/C/man2/fanotify_mark.2:159
2527 msgid ""
2528 "Create an event when a permission to open a file or directory is requested.  "
2529 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2530 "B<FAN_CLASS_CONTENT> is required."
2531 msgstr ""
2532 "ファイルやディレクトリをオープンするアクセス許可が要求された際にイベントを作"
2533 "成する。 fanotify ファイルディスクリプターが B<FAN_CLASS_PRE_CONTENT> か "
2534 "B<FAN_CLASS_CONTENT> を指定されて作成されている必要がある。"
2535
2536 #. type: Plain text
2537 #: build/C/man2/fanotify_mark.2:167
2538 msgid ""
2539 "Create an event when a permission to read a file or directory is requested.  "
2540 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2541 "B<FAN_CLASS_CONTENT> is required."
2542 msgstr ""
2543 "ファイルやディレクトリを読み出すアクセス許可が要求された際にイベントを作成す"
2544 "る。 fanotify ファイルディスクリプターが B<FAN_CLASS_PRE_CONTENT> か "
2545 "B<FAN_CLASS_CONTENT> を指定されて作成されている必要がある。"
2546
2547 #. type: TP
2548 #: build/C/man2/fanotify_mark.2:167
2549 #, no-wrap
2550 msgid "B<FAN_ONDIR>"
2551 msgstr "B<FAN_ONDIR>"
2552
2553 #. type: Plain text
2554 #: build/C/man2/fanotify_mark.2:176
2555 msgid ""
2556 "Create events for directories\\(emfor example, when B<opendir>(3), "
2557 "B<readdir>(3)  (but see BUGS), and B<closedir>(3)  are called.  Without this "
2558 "flag, only events for files are created."
2559 msgstr ""
2560 "ディレクトリに対するイベントを作成する。 例えば B<opendir>(3)、 "
2561 "B<readdir>(3) (ただし「バグ」も参照)、 B<closedir>(3) が呼び出された場合。 こ"
2562 "のフラグが指定されなかった場合、 ファイルに対するイベントだけが作成される。"
2563
2564 #. type: TP
2565 #: build/C/man2/fanotify_mark.2:176
2566 #, no-wrap
2567 msgid "B<FAN_EVENT_ON_CHILD>"
2568 msgstr "B<FAN_EVENT_ON_CHILD>"
2569
2570 #. type: Plain text
2571 #: build/C/man2/fanotify_mark.2:184
2572 msgid ""
2573 "Events for the immediate children of marked directories shall be created.  "
2574 "The flag has no effect when marking mounts.  Note that events are not "
2575 "generated for children of the subdirectories of marked directories.  To "
2576 "monitor complete directory trees it is necessary to mark the relevant mount."
2577 msgstr ""
2578 "マークされたディレクトリの直下のエントリーに対してイベントを作成する。 このフ"
2579 "ラグはマウントにマークを付ける際には効果はない。 マークされたディレクトリのサ"
2580 "ブディレクトリのエントリーに対してはイベントが作成されない点に注意すること。 "
2581 "ディレクトリツリー全体を監視するには、 関連するマウントにマークを付ける必要が"
2582 "ある。"
2583
2584 #. type: Plain text
2585 #: build/C/man2/fanotify_mark.2:186
2586 msgid "The following composed value is defined:"
2587 msgstr "以下の組み合わせ値が定義されている。"
2588
2589 #. type: Plain text
2590 #: build/C/man2/fanotify_mark.2:190
2591 msgid "A file is closed (B<FAN_CLOSE_WRITE>|B<FAN_CLOSE_NOWRITE>)."
2592 msgstr "ファイルがクローズされた (B<FAN_CLOSE_WRITE>|B<FAN_CLOSE_NOWRITE>)。"
2593
2594 #. type: Plain text
2595 #: build/C/man2/fanotify_mark.2:195
2596 msgid ""
2597 "The filesystem object to be marked is determined by the file descriptor "
2598 "I<dirfd> and the pathname specified in I<pathname>:"
2599 msgstr ""
2600 "マークを付けるファイルシステムオブジェクトは、 ファイルディスクリプター "
2601 "I<dirfd> と I<pathname> で指定されたパス名から決定される。"
2602
2603 #. type: Plain text
2604 #: build/C/man2/fanotify_mark.2:201
2605 msgid ""
2606 "If I<pathname> is NULL, I<dirfd> defines the filesystem object to be marked."
2607 msgstr ""
2608 "I<pathname> が NULL の場合、 I<dirfd> でマークを付けるファイルシステムオブ"
2609 "ジェクトが定義される。"
2610
2611 #. type: Plain text
2612 #: build/C/man2/fanotify_mark.2:209
2613 msgid ""
2614 "If I<pathname> is NULL, and I<dirfd> takes the special value B<AT_FDCWD>, "
2615 "the current working directory is to be marked."
2616 msgstr ""
2617 "I<pathname> が NULL で、 I<dirfd> が特別な値 B<AT_FDCWD> の場合、 カレント"
2618 "ワーキングディレクトリがマークされる。"
2619
2620 #. type: Plain text
2621 #: build/C/man2/fanotify_mark.2:215
2622 msgid ""
2623 "If I<pathname> is absolute, it defines the filesystem object to be marked, "
2624 "and I<dirfd> is ignored."
2625 msgstr ""
2626 "I<pathname> が絶対パスの場合、 そのパス名によりマークを付けるファイルシステム"
2627 "オブジェクトが定義され、 I<dirfd> は無視される。"
2628
2629 #. type: Plain text
2630 #: build/C/man2/fanotify_mark.2:226
2631 msgid ""
2632 "If I<pathname> is relative, and I<dirfd> does not have the value "
2633 "B<AT_FDCWD>, then the filesystem object to be marked is determined by "
2634 "interpreting I<pathname> relative the directory referred to by I<dirfd>."
2635 msgstr ""
2636 "I<pathname> が相対パスで、 I<dirfd> が B<AT_FDCWD> でない場合、 マークを付け"
2637 "るファイルシステムオブジェクトは I<dirfd> が参照するディレクトリに対する相対"
2638 "パス I<pathname> を解釈して決定される。"
2639
2640 #. type: Plain text
2641 #: build/C/man2/fanotify_mark.2:236
2642 msgid ""
2643 "If I<pathname> is relative, and I<dirfd> has the value B<AT_FDCWD>, then the "
2644 "filesystem object to be marked is determined by interpreting I<pathname> "
2645 "relative the current working directory."
2646 msgstr ""
2647 "I<pathname> が相対パスで、 I<dirfd> が B<AT_FDCWD> の場合、 マークを付ける"
2648 "ファイルシステムオブジェクトはカレントワーキングディレクトリに対する相対パス "
2649 "I<pathname> を解釈して決定される。"
2650
2651 #. type: Plain text
2652 #: build/C/man2/fanotify_mark.2:243
2653 msgid ""
2654 "On success, B<fanotify_mark>()  returns 0.  On error, -1 is returned, and "
2655 "I<errno> is set to indicate the error."
2656 msgstr ""
2657 "成功すると B<fanotify_mark>() は 0 を返す。 エラーの場合、 -1 を返し、 "
2658 "I<errno> にエラーの原因を示す値を設定する。"
2659
2660 #. type: TP
2661 #: build/C/man2/fanotify_mark.2:244 build/C/man2/inotify_add_watch.2:88
2662 #: build/C/man2/inotify_rm_watch.2:56
2663 #, no-wrap
2664 msgid "B<EBADF>"
2665 msgstr "B<EBADF>"
2666
2667 #. type: Plain text
2668 #: build/C/man2/fanotify_mark.2:248
2669 msgid "An invalid file descriptor was passed in I<fanotify_fd>."
2670 msgstr "無効なファイルディスクリプターが I<fanotify_fd> で渡された。"
2671
2672 #. type: Plain text
2673 #: build/C/man2/fanotify_mark.2:257
2674 msgid ""
2675 "An invalid value was passed in I<flags> or I<mask>, or I<fanotify_fd> was "
2676 "not an fanotify file descriptor."
2677 msgstr ""
2678 "無効な値が I<flags> か I<mask> に指定されたか、 I<fanotify_fd> が fanotify "
2679 "ファイルディスクリプターでなかった。"
2680
2681 #. type: Plain text
2682 #: build/C/man2/fanotify_mark.2:265
2683 msgid ""
2684 "The fanotify file descriptor was opened with B<FAN_CLASS_NOTIF> and mask "
2685 "contains a flag for permission events (B<FAN_OPEN_PERM> or "
2686 "B<FAN_ACCESS_PERM>)."
2687 msgstr ""
2688 "fanotify ファイルディスクリプターが B<FAN_CLASS_NOTIF> でオープンされたが、 "
2689 "アクセス許可イベント (B<FAN_OPEN_PERM> か B<FAN_ACCESS_PERM>) のフラグがマス"
2690 "クに含まれている。"
2691
2692 #. type: Plain text
2693 #: build/C/man2/fanotify_mark.2:274
2694 msgid ""
2695 "The filesystem object indicated by I<dirfd> and I<pathname> does not exist.  "
2696 "This error also occurs when trying to remove a mark from an object which is "
2697 "not marked."
2698 msgstr ""
2699 "I<dirfd> と I<pathname> で指定されたファイルシステムオブジェクトが存在しな"
2700 "い。 このエラーはマークされていないオブジェクトからマークを削除しようとした場"
2701 "合にも発生する。"
2702
2703 #. type: Plain text
2704 #: build/C/man2/fanotify_mark.2:277
2705 msgid "The necessary memory could not be allocated."
2706 msgstr "必要なメモリーを割り当てできなかった。"
2707
2708 #. type: TP
2709 #: build/C/man2/fanotify_mark.2:277 build/C/man2/inotify_add_watch.2:112
2710 #, no-wrap
2711 msgid "B<ENOSPC>"
2712 msgstr "B<ENOSPC>"
2713
2714 #. type: Plain text
2715 #: build/C/man2/fanotify_mark.2:283
2716 msgid ""
2717 "The number of marks exceeds the limit of 8192 and the B<FAN_UNLIMITED_MARKS> "
2718 "flag was not specified when the fanotify file descriptor was created with "
2719 "B<fanotify_init>(2)."
2720 msgstr ""
2721 "マークの数が 8192 の上限を超過し、 B<fanotify_init>(2) で fanotify ファイル"
2722 "ディスクリプターが作成された際に B<FAN_UNLIMITED_MARKS> フラグが指定されてい"
2723 "なかった。"
2724
2725 #. type: Plain text
2726 #: build/C/man2/fanotify_mark.2:289
2727 msgid ""
2728 "This kernel does not implement B<fanotify_mark>().  The fanotify API is "
2729 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
2730 msgstr ""
2731 "このカーネルでは B<fanotify_mark>() が実装されていない。 fanotify API が利用"
2732 "できるのは、 カーネルで B<CONFIG_FANOTIFY> が有効になっている場合だけである。"
2733
2734 #. type: TP
2735 #: build/C/man2/fanotify_mark.2:289
2736 #, no-wrap
2737 msgid "B<ENOTDIR>"
2738 msgstr "B<ENOTDIR>"
2739
2740 #. type: Plain text
2741 #: build/C/man2/fanotify_mark.2:299
2742 msgid ""
2743 "I<flags> contains B<FAN_MARK_ONLYDIR>, and I<dirfd> and I<pathname> do not "
2744 "specify a directory."
2745 msgstr ""
2746 "I<flags> に B<FAN_MARK_ONLYDIR> が含まれているが、 I<dirfd> と I<pathname> が"
2747 "ディレクトリを指定していない。"
2748
2749 #. type: Plain text
2750 #: build/C/man2/fanotify_mark.2:303
2751 msgid ""
2752 "B<fanotify_mark>()  was introduced in version 2.6.36 of the Linux kernel and "
2753 "enabled in version 2.6.37."
2754 msgstr ""
2755 "B<fanotify_mark>() は Linux カーネルのバージョン 2.6.36 で導入され、 バージョ"
2756 "ン 2.6.37 で有効になった。"
2757
2758 #. type: Plain text
2759 #: build/C/man2/fanotify_mark.2:307
2760 msgid "The following bugs were present in Linux kernels before version 3.16:"
2761 msgstr "バージョン 3.16 より前の Linux カーネルでは以下のバグが存在した。"
2762
2763 #.  Fixed by commit 0a8dd2db579f7a0ac7033d6b857c3d5dbaa77563
2764 #. type: Plain text
2765 #: build/C/man2/fanotify_mark.2:317
2766 msgid ""
2767 "If I<flags> contains B<FAN_MARK_FLUSH>, I<dirfd> and I<pathname> must "
2768 "specify a valid filesystem object, even though this object is not used."
2769 msgstr ""
2770 "I<flags> に B<FAN_MARK_FLUSH> が指定されている場合、 たとえそのオブジェクトが"
2771 "使用されない場合であっても、  I<dirfd> と I<pathname> には有効なファイルシス"
2772 "テムオブジェクトを指定しなければならない。"
2773
2774 #.  Fixed by commit d4c7cf6cffb1bc711a833b5e304ba5bcfe76398b
2775 #. type: Plain text
2776 #: build/C/man2/fanotify_mark.2:323
2777 msgid "B<readdir>(2)  does not generate a B<FAN_ACCESS> event."
2778 msgstr "B<readdir>(2) は B<FAN_ACCESS> イベントを生成しない。"
2779
2780 #.  Fixed by commit cc299a98eb13a9853675a9cbb90b30b4011e1406
2781 #. type: Plain text
2782 #: build/C/man2/fanotify_mark.2:331
2783 msgid ""
2784 "If B<fanotify_mark>(2)  is called with B<FAN_MARK_FLUSH>, I<flags> is not "
2785 "checked for invalid values."
2786 msgstr ""
2787 "B<fanotify_mark>(2) が B<FAN_MARK_FLUSH> 付きで呼び出された場合、 I<flags> の"
2788 "値が無効かはチェックされない。"
2789
2790 #. type: Plain text
2791 #: build/C/man2/fanotify_mark.2:334
2792 msgid "B<fanotify_init>(2), B<fanotify>(7)"
2793 msgstr "B<fanotify_init>(2), B<fanotify>(7)"
2794
2795 #. type: TH
2796 #: build/C/man7/inotify.7:27
2797 #, no-wrap
2798 msgid "INOTIFY"
2799 msgstr "INOTIFY"
2800
2801 #. type: Plain text
2802 #: build/C/man7/inotify.7:30
2803 msgid "inotify - monitoring filesystem events"
2804 msgstr "inotify - ファイルシステムイベントを監視する"
2805
2806 #. type: Plain text
2807 #: build/C/man7/inotify.7:38
2808 msgid ""
2809 "The I<inotify> API provides a mechanism for monitoring filesystem events.  "
2810 "Inotify can be used to monitor individual files, or to monitor directories.  "
2811 "When a directory is monitored, inotify will return events for the directory "
2812 "itself, and for files inside the directory."
2813 msgstr ""
2814 "I<inotify> API はファイルシステムイベントを監視するための機構を提供する。 "
2815 "inotify は個々のファイルやディレクトリを監視するのに使える。 ディレクトリを監"
2816 "視する場合、inotify はディレクトリ自身と ディレクトリ内のファイルのイベントを"
2817 "返す。"
2818
2819 #. type: Plain text
2820 #: build/C/man7/inotify.7:40
2821 msgid "The following system calls are used with this API:"
2822 msgstr "この API では以下のシステムコールが使用される。"
2823
2824 #. type: Plain text
2825 #: build/C/man7/inotify.7:51
2826 msgid ""
2827 "B<inotify_init>(2)  creates an inotify instance and returns a file "
2828 "descriptor referring to the inotify instance.  The more recent "
2829 "B<inotify_init1>(2)  is like B<inotify_init>(2), but has a I<flags> argument "
2830 "that provides access to some extra functionality."
2831 msgstr ""
2832 "B<inotify_init>(2)  は inotify インスタンスを作成し、inotify インスタンスを参"
2833 "照する ファイルディスクリプターを返す。 より新しい B<inotify_init1>(2)  も "
2834 "B<inotify_init>(2)  と同様だが、 こちらにはいくつかの追加の機能を利用するため"
2835 "の I<flags> 引き数がある。"
2836
2837 #. type: Plain text
2838 #: build/C/man7/inotify.7:64
2839 msgid ""
2840 "B<inotify_add_watch>(2)  manipulates the \"watch list\" associated with an "
2841 "inotify instance.  Each item (\"watch\") in the watch list specifies the "
2842 "pathname of a file or directory, along with some set of events that the "
2843 "kernel should monitor for the file referred to by that pathname.  "
2844 "B<inotify_add_watch>(2)  either creates a new watch item, or modifies an "
2845 "existing watch.  Each watch has a unique \"watch descriptor\", an integer "
2846 "returned by B<inotify_add_watch>(2)  when the watch is created."
2847 msgstr ""
2848 "B<inotify_add_watch>(2)  は inotify インスタンスに関連づけられた「監視対象 "
2849 "(watch) リスト」を操作する。 監視対象リストの各アイテム (\"watch\") は、 ファ"
2850 "イルまたはディレクトリのパス名と、 そのパス名で参照されるファイルに対して "
2851 "カーネルが監視する複数のイベントの集合を指定する。 B<inotify_add_watch>(2)  "
2852 "は新しい監視アイテムの作成や既存の監視対象の変更ができる。 各監視対象は一意の"
2853 "「監視対象ディスクリプター」を持つ。 これは監視対象を作成したときに "
2854 "B<inotify_add_watch>(2)  から返される整数である。"
2855
2856 #. type: Plain text
2857 #: build/C/man7/inotify.7:70
2858 msgid ""
2859 "When events occur for monitored files and directories, those events are made "
2860 "available to the application as structured data that can be read from the "
2861 "inotify file descriptor using B<read>(2)  (see below)."
2862 msgstr ""
2863 "監視しているファイルやディレクトリでイベントが起こると、 それらのイベントはア"
2864 "プリケーションから inotify ファイルディスクリプターから B<read>(2) を使って構"
2865 "造化データとして読み出すことができる (下記参照)。"
2866
2867 #. type: Plain text
2868 #: build/C/man7/inotify.7:73
2869 msgid "B<inotify_rm_watch>(2)  removes an item from an inotify watch list."
2870 msgstr ""
2871 "B<inotify_rm_watch>(2)  は inotify の監視対象リストからアイテムを削除する。"
2872
2873 #. type: Plain text
2874 #: build/C/man7/inotify.7:80
2875 msgid ""
2876 "When all file descriptors referring to an inotify instance have been closed "
2877 "(using B<close>(2)), the underlying object and its resources are freed for "
2878 "reuse by the kernel; all associated watches are automatically freed."
2879 msgstr ""
2880 "inotify インスタンスを指している 全てのファイルディスクリプターが "
2881 "(B<close>(2) を使って) クローズされた場合、 その下層にあるオブジェクトとその"
2882 "リソースは、 カーネルで再利用するために解放される。 関連が切られた監視対象は"
2883 "自動的に解放される。"
2884
2885 #. type: Plain text
2886 #: build/C/man7/inotify.7:89
2887 msgid ""
2888 "With careful programming, an application can use inotify to efficiently "
2889 "monitor and cache the state of a set of filesystem objects.  However, robust "
2890 "applications should allow for the fact that bugs in the monitoring logic or "
2891 "races of the kind described below may leave the cache inconsistent with the "
2892 "filesystem state.  It is probably wise to to do some consistency checking, "
2893 "and rebuild the cache when inconsistencies are detected."
2894 msgstr ""
2895 "注意深くプログラミングすることで、 アプリケーションは inotify を使ってファイ"
2896 "ルシステムオブジェクトの集合の状態を効率的に監視しキャッシュしておくことがで"
2897 "きる。 しかしながら、ロバストなアプリケーションでは、監視ロジックのバグや以下"
2898 "に説明があるような種類の競合条件によりファイルシステムの状態とキャッシュが一"
2899 "致しない状態になることがあるという事実も考慮に入れておくべきである。 おそらく"
2900 "何らかの一貫性のチェックを行い、不一致が検出された場合にはキャッシュを再構築"
2901 "するのが懸命だろう。"
2902
2903 #. type: SS
2904 #: build/C/man7/inotify.7:89
2905 #, no-wrap
2906 msgid "Reading events from an inotify file descriptor"
2907 msgstr "inotify ファイルディスクリプターからのイベントの読み出し"
2908
2909 #. type: Plain text
2910 #: build/C/man7/inotify.7:102
2911 msgid ""
2912 "To determine what events have occurred, an application B<read>(2)s from the "
2913 "inotify file descriptor.  If no events have so far occurred, then, assuming "
2914 "a blocking file descriptor, B<read>(2)  will block until at least one event "
2915 "occurs (unless interrupted by a signal, in which case the call fails with "
2916 "the error B<EINTR>; see B<signal>(7))."
2917 msgstr ""
2918 "どのようなイベントが起こっていたかを知るには、 アプリケーションで inotify "
2919 "ファイルディスクリプターを B<read>(2)  すればよい。 これまでに何もイベントが"
2920 "起こっていない場合、 停止 (blocking) モードのファイルディスクリプターであれ"
2921 "ば、 少なくとも 1 つのイベントが起こるまで B<read>(2)  は停止する (シグナルに"
2922 "より割り込まれなかった場合。 シグナルによる割り込みがあった場合、呼び出しはエ"
2923 "ラー B<EINTR> で失敗する。 B<signal>(7)  参照)。"
2924
2925 #. type: Plain text
2926 #: build/C/man7/inotify.7:106
2927 msgid ""
2928 "Each successful B<read>(2)  returns a buffer containing one or more of the "
2929 "following structures:"
2930 msgstr ""
2931 "B<read>(2)  が成功すると、以下の構造体を 1 つ以上含むバッファーが返される:"
2932
2933 #.  FIXME . The type of the 'wd' field should probably be "int32_t".
2934 #.  I submitted a patch to fix this.  See the LKML thread
2935 #.  "[patch] Fix type errors in inotify interfaces", 18 Nov 2008
2936 #.  Glibc bug filed: http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
2937 #. type: Plain text
2938 #: build/C/man7/inotify.7:121
2939 #, no-wrap
2940 msgid ""
2941 "struct inotify_event {\n"
2942 "    int      wd;       /* Watch descriptor */\n"
2943 "    uint32_t mask;     /* Mask describing event */\n"
2944 "    uint32_t cookie;   /* Unique cookie associating related\n"
2945 "                          events (for rename(2)) */\n"
2946 "    uint32_t len;      /* Size of I<name> field */\n"
2947 "    char     name[];   /* Optional null-terminated name */\n"
2948 "};\n"
2949 msgstr ""
2950 "struct inotify_event {\n"
2951 "    int      wd;       /* 監視対象ディスクリプター */\n"
2952 "    uint32_t mask;     /* イベントを示すマスク */\n"
2953 "    uint32_t cookie;   /* 関連するイベント群を関連づける\n"
2954 "                          一意なクッキー (rename(2) 用) */\n"
2955 "    uint32_t len;      /* \\(aqname\\(aq フィールドのサイズ */\n"
2956 "    char     name[];   /* ヌルで終端された任意の名前 */\n"
2957 "};\n"
2958
2959 #. type: Plain text
2960 #: build/C/man7/inotify.7:128
2961 msgid ""
2962 "I<wd> identifies the watch for which this event occurs.  It is one of the "
2963 "watch descriptors returned by a previous call to B<inotify_add_watch>(2)."
2964 msgstr ""
2965 "I<wd> はイベント発生の監視対象を指定する。 これは、前もって行われた "
2966 "B<inotify_add_watch>(2)  呼び出しで返された監視対象ディスクリプターのうちの "
2967 "1 つである。"
2968
2969 #. type: Plain text
2970 #: build/C/man7/inotify.7:131
2971 msgid ""
2972 "I<mask> contains bits that describe the event that occurred (see below)."
2973 msgstr ""
2974 "I<mask> には発生したイベント (下記参照) を記述するためのビットが含まれる。"
2975
2976 #. type: Plain text
2977 #: build/C/man7/inotify.7:143
2978 msgid ""
2979 "I<cookie> is a unique integer that connects related events.  Currently this "
2980 "is used only for rename events, and allows the resulting pair of "
2981 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events to be connected by the "
2982 "application.  For all other event types, I<cookie> is set to 0."
2983 msgstr ""
2984 "I<cookie> は関連するイベントを関連づけるための一意な整数である。\n"
2985 "現在のところ、この値は rename イベントに対してのみ使われており、\n"
2986 "結果のペアである B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントを\n"
2987 "アプリケーションで関連づけることができる。\n"
2988 "他のイベント種別の場合には、 I<cookie> は 0 に設定する。"
2989
2990 #. type: Plain text
2991 #: build/C/man7/inotify.7:152
2992 msgid ""
2993 "The I<name> field is present only when an event is returned for a file "
2994 "inside a watched directory; it identifies the file pathname relative to the "
2995 "watched directory.  This pathname is null-terminated, and may include "
2996 "further null bytes (\\(aq\\e0\\(aq) to align subsequent reads to a suitable "
2997 "address boundary."
2998 msgstr ""
2999 "I<name> フィールドは監視しているディレクトリ内のファイルに対して イベントが返"
3000 "される場合のためにだけ存在する。 監視するディレクトリからのファイルの相対パス"
3001 "名を表す。 このパス名はヌルで終端され、 その後の読み込みで適切なアドレス境界"
3002 "に調整するために、 さらにヌルバイト (\\(aq\\e0\\(aq) が含まれる場合もある。"
3003
3004 #. type: Plain text
3005 #: build/C/man7/inotify.7:162
3006 msgid ""
3007 "The I<len> field counts all of the bytes in I<name>, including the null "
3008 "bytes; the length of each I<inotify_event> structure is thus I<sizeof(struct "
3009 "inotify_event)+len>."
3010 msgstr ""
3011 "I<len> フィールドはヌルバイトを含む I<name> の全てのバイト数を表す。\n"
3012 "よって、 I<inotify_event> 構造体のサイズは \n"
3013 "I<sizeof(struct inotify_event)+len> である。"
3014
3015 #. type: Plain text
3016 #: build/C/man7/inotify.7:173
3017 msgid ""
3018 "The behavior when the buffer given to B<read>(2)  is too small to return "
3019 "information about the next event depends on the kernel version: in kernels "
3020 "before 2.6.21, B<read>(2)  returns 0; since kernel 2.6.21, B<read>(2)  fails "
3021 "with the error B<EINVAL>.  Specifying a buffer of size"
3022 msgstr ""
3023 "B<read>(2) に渡されたバッファーが小さすぎて次のイベントに関する情報を返せ\n"
3024 "ない場合の動作はカーネルのバージョンにより異なる。 2.6.21 より前のカー\n"
3025 "ネルでは、 B<read>(2) は 0 を返す。 2.6.21 以降のカーネルでは、\n"
3026 "B<read>(2) はエラー B<EINVAL> で失敗する。\n"
3027 "バッファーサイズとして"
3028
3029 #. type: Plain text
3030 #: build/C/man7/inotify.7:175
3031 #, no-wrap
3032 msgid "    sizeof(struct inotify_event) + NAME_MAX + 1\n"
3033 msgstr "    sizeof(struct inotify_event) + NAME_MAX + 1\n"
3034
3035 #. type: Plain text
3036 #: build/C/man7/inotify.7:177
3037 msgid "will be sufficient to read at least one event."
3038 msgstr "を指定すれば、少なくとも 1 イベントで読み出しを行うには十分である。"
3039
3040 #. type: SS
3041 #: build/C/man7/inotify.7:177
3042 #, no-wrap
3043 msgid "inotify events"
3044 msgstr "inotify イベント"
3045
3046 #. type: Plain text
3047 #: build/C/man7/inotify.7:197
3048 msgid ""
3049 "The B<inotify_add_watch>(2)  I<mask> argument and the I<mask> field of the "
3050 "I<inotify_event> structure returned when B<read>(2)ing an inotify file "
3051 "descriptor are both bit masks identifying inotify events.  The following "
3052 "bits can be specified in I<mask> when calling B<inotify_add_watch>(2)  and "
3053 "may be returned in the I<mask> field returned by B<read>(2):"
3054 msgstr ""
3055 "B<inotify_add_watch>(2)  の I<mask> 引き数と、inotify ファイル構造体を "
3056 "B<read>(2)  したときに返される I<inotify_event> 構造体の I<mask> フィールド"
3057 "は、ともに inotify イベントを識別するための ビットマスクである。 以下のビット"
3058 "が B<inotify_add_watch>(2)  を呼ぶときの I<mask> に指定可能であり、 "
3059 "B<read>(2)  で返される I<mask> フィールドで返される:"
3060
3061 #. type: TP
3062 #: build/C/man7/inotify.7:198
3063 #, no-wrap
3064 msgid "B<IN_ACCESS> (+)"
3065 msgstr "B<IN_ACCESS> (+)"
3066
3067 #. type: Plain text
3068 #: build/C/man7/inotify.7:203
3069 msgid "File was accessed (e.g., B<read>(2), B<execve>(2))."
3070 msgstr "(B<read>(2), B<execve>(2) などで) ファイルがアクセスされた。"
3071
3072 #. type: TP
3073 #: build/C/man7/inotify.7:203
3074 #, no-wrap
3075 msgid "B<IN_ATTRIB> (*)"
3076 msgstr "B<IN_ATTRIB> (*)"
3077
3078 #. type: Plain text
3079 #: build/C/man7/inotify.7:218
3080 msgid ""
3081 "Metadata changed\\(emfor example, permissions (e.g., B<chmod>(2)), "
3082 "timestamps (e.g., B<utimensat>(2)), extended attributes (B<setxattr>(2)), "
3083 "link count (since Linux 2.6.25; e.g., for the target of B<link>(2)  and for "
3084 "B<unlink>(2)), and user/group ID (e.g., B<chown>(2))."
3085 msgstr ""
3086 "メタデータが変更された。 メタデータとは、例えば、アクセス許可 (B<chmod>(2))、"
3087 "タイムスタンプ (B<utimensat>(2) など)、拡張属性 (B<setxattr>(2))、 リンクカウ"
3088 "ント (Linux 2.6.25 以降; B<link>(2) のリンク先や B<unlink>(2) など)、ユー"
3089 "ザー/グループ ID (B<chown>(2) など) などである。"
3090
3091 #. type: TP
3092 #: build/C/man7/inotify.7:218
3093 #, no-wrap
3094 msgid "B<IN_CLOSE_WRITE> (+)"
3095 msgstr "B<IN_CLOSE_WRITE> (+)"
3096
3097 #. type: Plain text
3098 #: build/C/man7/inotify.7:221
3099 msgid "File opened for writing was closed."
3100 msgstr "書き込みのためにオープンされたファイルがクローズされた。"
3101
3102 #. type: TP
3103 #: build/C/man7/inotify.7:221
3104 #, no-wrap
3105 msgid "B<IN_CLOSE_NOWRITE> (*)"
3106 msgstr "B<IN_CLOSE_NOWRITE> (*)"
3107
3108 #. type: Plain text
3109 #: build/C/man7/inotify.7:224
3110 msgid "File or directory not opened for writing was closed."
3111 msgstr ""
3112 "書き込み用としてはオープンされていないファイルやディレクトリがクローズされ"
3113 "た。"
3114
3115 #. type: TP
3116 #: build/C/man7/inotify.7:224
3117 #, no-wrap
3118 msgid "B<IN_CREATE> (+)"
3119 msgstr "B<IN_CREATE> (+)"
3120
3121 #. type: Plain text
3122 #: build/C/man7/inotify.7:234
3123 msgid ""
3124 "File/directory created in watched directory (e.g., B<open>(2)  B<O_CREAT>, "
3125 "B<mkdir>(2), B<link>(2), B<symlink>(2), B<bind>(2)  on a UNIX domain socket)."
3126 msgstr ""
3127 "監視対象ディレクトリ内でファイルやディレクトリが作成された (B<open>(2)  "
3128 "B<O_CREAT>, B<mkdir>(2), B<link>(2), B<symlink>(2), UNIX ドメインソケットに対"
3129 "する B<bind>(2) など)。"
3130
3131 #. type: TP
3132 #: build/C/man7/inotify.7:234
3133 #, no-wrap
3134 msgid "B<IN_DELETE> (+)"
3135 msgstr "B<IN_DELETE> (+)"
3136
3137 #. type: Plain text
3138 #: build/C/man7/inotify.7:237
3139 msgid "File/directory deleted from watched directory."
3140 msgstr "監視対象ディレクトリ内でファイルやディレクトリが削除された。"
3141
3142 #. type: TP
3143 #: build/C/man7/inotify.7:237
3144 #, no-wrap
3145 msgid "B<IN_DELETE_SELF>"
3146 msgstr "B<IN_DELETE_SELF>"
3147
3148 #. type: Plain text
3149 #: build/C/man7/inotify.7:248
3150 msgid ""
3151 "Watched file/directory was itself deleted.  (This event also occurs if an "
3152 "object is moved to another filesystem, since B<mv>(1)  in effect copies the "
3153 "file to the other filesystem and then deletes it from the original "
3154 "filesystem.)  In addition, an B<IN_IGNORED> event will subsequently be "
3155 "generated for the watch descriptor."
3156 msgstr ""
3157 "監視対象のファイルやディレクトリ自身が削除あれた。 (このイベントはオブジェク"
3158 "トが別のファイルシステムに移動された場合にも発生する。 B<mv>(1) は実際には別"
3159 "のファイルシステムにファイルをコピーした後、元のファイルシステムからそのファ"
3160 "イルを削除するからである。) また、 結果的に監視ディスクリプターに対して "
3161 "B<IN_IGNORED> イベントも生成される。"
3162
3163 #. type: TP
3164 #: build/C/man7/inotify.7:248
3165 #, no-wrap
3166 msgid "B<IN_MODIFY> (+)"
3167 msgstr "B<IN_MODIFY> (+)"
3168
3169 #. type: Plain text
3170 #: build/C/man7/inotify.7:253
3171 msgid "File was modified (e.g., B<write>(2), B<truncate>(2))."
3172 msgstr "ファイルが変更された (B<write>(2), B<truncate>(2) など)。"
3173
3174 #. type: TP
3175 #: build/C/man7/inotify.7:253
3176 #, no-wrap
3177 msgid "B<IN_MOVE_SELF>"
3178 msgstr "B<IN_MOVE_SELF>"
3179
3180 #. type: Plain text
3181 #: build/C/man7/inotify.7:256
3182 msgid "Watched file/directory was itself moved."
3183 msgstr "監視対象のディレクトリまたはファイル自身が移動された。"
3184
3185 #. type: TP
3186 #: build/C/man7/inotify.7:256
3187 #, no-wrap
3188 msgid "B<IN_MOVED_FROM> (+)"
3189 msgstr "B<IN_MOVED_FROM> (+)"
3190
3191 #. type: Plain text
3192 #: build/C/man7/inotify.7:260
3193 msgid ""
3194 "Generated for the directory containing the old filename when a file is "
3195 "renamed."
3196 msgstr ""
3197 "ファイル名の変更を行った際に変更前のファイル名が含まれるディレクトリに対して"
3198 "生成される。"
3199
3200 #. type: TP
3201 #: build/C/man7/inotify.7:260
3202 #, no-wrap
3203 msgid "B<IN_MOVED_TO> (+)"
3204 msgstr "B<IN_MOVED_TO> (+)"
3205
3206 #. type: Plain text
3207 #: build/C/man7/inotify.7:264
3208 msgid ""
3209 "Generated for the directory containing the new filename when a file is "
3210 "renamed."
3211 msgstr ""
3212 "ファイル名の変更を行った際に新しいファイル名が含まれるディレクトリに対して生"
3213 "成される。"
3214
3215 #. type: TP
3216 #: build/C/man7/inotify.7:264
3217 #, no-wrap
3218 msgid "B<IN_OPEN> (*)"
3219 msgstr "B<IN_OPEN> (*)"
3220
3221 #. type: Plain text
3222 #: build/C/man7/inotify.7:267
3223 msgid "File or directory was opened."
3224 msgstr "ファイルやディレクトリがオープンされた。"
3225
3226 #. type: Plain text
3227 #: build/C/man7/inotify.7:270
3228 msgid "When monitoring a directory:"
3229 msgstr "ディレクトリを監視する場合:"
3230
3231 #. type: Plain text
3232 #: build/C/man7/inotify.7:273
3233 msgid ""
3234 "the events marked above with an asterisk (*) can occur both for the "
3235 "directory itself and for objects inside the directory; and"
3236 msgstr ""
3237 "上記でアスタリスク (*) が付いたイベントは、 ディレクトリ自身とディレクトリ内"
3238 "のオブジェクトのどちらに対しても発生する。"
3239
3240 #. type: Plain text
3241 #: build/C/man7/inotify.7:276
3242 msgid ""
3243 "the events marked with a plus sign (+) occur only for objects inside the "
3244 "directory (not for the directory itself)."
3245 msgstr ""
3246 "上記でプラス記号 (+) が付いたイベントは、 ディレクトリ内のオブジェクトに対し"
3247 "てのみ発生する (ディレクトリ自身に対しては発生しない)。"
3248
3249 #. type: Plain text
3250 #: build/C/man7/inotify.7:282
3251 msgid ""
3252 "When events are generated for objects inside a watched directory, the "
3253 "I<name> field in the returned I<inotify_event> structure identifies the name "
3254 "of the file within the directory."
3255 msgstr ""
3256 "監視対象のディレクトリ内のオブジェクトに対してイベントが発生した場合、 "
3257 "I<inotify_event> 構造体で返される I<name> フィールドは、ディレクトリ内のファ"
3258 "イル名を表す。"
3259
3260 #. type: Plain text
3261 #: build/C/man7/inotify.7:290
3262 msgid ""
3263 "The B<IN_ALL_EVENTS> macro is defined as a bit mask of all of the above "
3264 "events.  This macro can be used as the I<mask> argument when calling "
3265 "B<inotify_add_watch>(2)."
3266 msgstr ""
3267 "B<IN_ALL_EVENTS> マクロは上記のイベント全てのマスクとして定義される。 このマ"
3268 "クロは B<inotify_add_watch>(2)  を呼び出すときの I<mask> 引き数として使える。"
3269
3270 #. type: Plain text
3271 #: build/C/man7/inotify.7:292
3272 msgid "Two additional convenience macros are defined:"
3273 msgstr "以下の 2 つの便利なマクロが定義されている。"
3274
3275 #. type: TP
3276 #: build/C/man7/inotify.7:293
3277 #, no-wrap
3278 msgid "B<IN_MOVE>"
3279 msgstr "B<IN_MOVE>"
3280
3281 #. type: Plain text
3282 #: build/C/man7/inotify.7:297
3283 msgid "Equates to B<IN_MOVED_FROM | IN_MOVED_TO>."
3284 msgstr "B<IN_MOVED_FROM | IN_MOVED_TO> と等価。"
3285
3286 #. type: TP
3287 #: build/C/man7/inotify.7:297
3288 #, no-wrap
3289 msgid "B<IN_CLOSE>"
3290 msgstr "B<IN_CLOSE>"
3291
3292 #. type: Plain text
3293 #: build/C/man7/inotify.7:301
3294 msgid "Equates to B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE>."
3295 msgstr "B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE> と等価。"
3296
3297 #. type: Plain text
3298 #: build/C/man7/inotify.7:307
3299 msgid ""
3300 "The following further bits can be specified in I<mask> when calling "
3301 "B<inotify_add_watch>(2):"
3302 msgstr ""
3303 "その他にも以下のビットを B<inotify_add_watch>(2)  を呼ぶときの I<mask> に指定"
3304 "できる:"
3305
3306 #. type: TP
3307 #: build/C/man7/inotify.7:308
3308 #, no-wrap
3309 msgid "B<IN_DONT_FOLLOW> (since Linux 2.6.15)"
3310 msgstr "B<IN_DONT_FOLLOW> (Linux 2.6.15 以降)"
3311
3312 #. type: Plain text
3313 #: build/C/man7/inotify.7:313
3314 msgid "Don't dereference I<pathname> if it is a symbolic link."
3315 msgstr ""
3316 "I<pathname> がシンボリックリンクである場合に辿らない。 (Linux 2.6.15 以降)"
3317
3318 #. type: TP
3319 #: build/C/man7/inotify.7:313
3320 #, no-wrap
3321 msgid "B<IN_EXCL_UNLINK> (since Linux 2.6.36)"
3322 msgstr "B<IN_EXCL_UNLINK> (Linux 2.6.36 以降)"
3323
3324 #.  commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6
3325 #. type: Plain text
3326 #: build/C/man7/inotify.7:329
3327 msgid ""
3328 "By default, when watching events on the children of a directory, events are "
3329 "generated for children even after they have been unlinked from the "
3330 "directory.  This can result in large numbers of uninteresting events for "
3331 "some applications (e.g., if watching I</tmp>, in which many applications "
3332 "create temporary files whose names are immediately unlinked).  Specifying "
3333 "B<IN_EXCL_UNLINK> changes the default behavior, so that events are not "
3334 "generated for children after they have been unlinked from the watched "
3335 "directory."
3336 msgstr ""
3337 "デフォルトでは、あるディレクトリの子ファイルに関するイベントを監視 (watch) し"
3338 "た際、ディレクトリからその子ファイルが削除 (unlink) された場合であってもその"
3339 "子ファイルに対してイベントが生成される。このことは、アプリケーションによって"
3340 "はあまり興味のないイベントが大量に発生することにつながる (例えば、I</tmp> を"
3341 "監視している場合、たくさんのアプリケーションが、すぐにその名前が削除される一"
3342 "時ファイルをそのディレクトリに作成する)。 B<IN_EXCL_UNLINK> を指定するとこの"
3343 "デフォルトの動作を変更でき、監視対象のディレクトリから子ファイルが削除された"
3344 "後に子ファイルに関するイベントが生成されなくなる。"
3345
3346 #. type: TP
3347 #: build/C/man7/inotify.7:329
3348 #, no-wrap
3349 msgid "B<IN_MASK_ADD>"
3350 msgstr "B<IN_MASK_ADD>"
3351
3352 #. type: Plain text
3353 #: build/C/man7/inotify.7:336
3354 msgid ""
3355 "If a watch instance already exists for the filesystem object corresponding "
3356 "to I<pathname>, add (OR) the events in I<mask> to the watch mask (instead of "
3357 "replacing the mask)."
3358 msgstr ""
3359 "監視インスタンスが I<pathname> に対応するファイルシステムオブジェクトに対して"
3360 "すでに存在する場合に、 (マスクを置き換えるのではなく) 監視マスクに I<mask> で"
3361 "指定されたイベントを追加 (OR) する。"
3362
3363 #. type: TP
3364 #: build/C/man7/inotify.7:336
3365 #, no-wrap
3366 msgid "B<IN_ONESHOT>"
3367 msgstr "B<IN_ONESHOT>"
3368
3369 #. type: Plain text
3370 #: build/C/man7/inotify.7:342
3371 msgid ""
3372 "Monitor the filesystem object corresponding to I<pathname> for one event, "
3373 "then remove from watch list."
3374 msgstr ""
3375 "I<pathname> に対応するファイルシステムオブジェクトを 1 イベントについてだけ監"
3376 "視し、 イベントが発生したら監視対象リストから削除する。"
3377
3378 #. type: TP
3379 #: build/C/man7/inotify.7:342
3380 #, no-wrap
3381 msgid "B<IN_ONLYDIR> (since Linux 2.6.15)"
3382 msgstr "B<IN_ONLYDIR> (Linux 2.6.15 以降)"
3383
3384 #. type: Plain text
3385 #: build/C/man7/inotify.7:349
3386 msgid ""
3387 "Only watch I<pathname> if it is a directory.  Using this flag provides an "
3388 "application with a race-free way of ensuring that the monitored object is a "
3389 "directory."
3390 msgstr ""
3391 "I<pathname> がディレクトリの場合のみ監視する。 このフラグを使うことで、アプリ"
3392 "ケーションは、競合状態を考慮せずに、監視するオブジェクトがディレクトリである"
3393 "ことを保証することができるようになる。"
3394
3395 #. type: Plain text
3396 #: build/C/man7/inotify.7:355
3397 msgid ""
3398 "The following bits may be set in the I<mask> field returned by B<read>(2):"
3399 msgstr "以下のビットが B<read>(2)  で返される I<mask> フィールドに設定される:"
3400
3401 #. type: TP
3402 #: build/C/man7/inotify.7:356
3403 #, no-wrap
3404 msgid "B<IN_IGNORED>"
3405 msgstr "B<IN_IGNORED>"
3406
3407 #. type: Plain text
3408 #: build/C/man7/inotify.7:362
3409 msgid ""
3410 "Watch was removed explicitly (B<inotify_rm_watch>(2))  or automatically "
3411 "(file was deleted, or filesystem was unmounted).  See also BUGS."
3412 msgstr ""
3413 "監視対象が (B<inotify_rm_watch>(2) により) 明示的に 削除された。もしくは "
3414 "(ファイルの削除、またはファイル システムのアンマウントにより) 自動的に削除さ"
3415 "れた。「バグ」も参照のこと。"
3416
3417 #. type: TP
3418 #: build/C/man7/inotify.7:362
3419 #, no-wrap
3420 msgid "B<IN_ISDIR>"
3421 msgstr "B<IN_ISDIR>"
3422
3423 #. type: Plain text
3424 #: build/C/man7/inotify.7:365
3425 msgid "Subject of this event is a directory."
3426 msgstr "このイベントの対象がディレクトリである。"
3427
3428 #. type: TP
3429 #: build/C/man7/inotify.7:365
3430 #, no-wrap
3431 msgid "B<IN_Q_OVERFLOW>"
3432 msgstr "B<IN_Q_OVERFLOW>"
3433
3434 #. type: Plain text
3435 #: build/C/man7/inotify.7:370
3436 msgid "Event queue overflowed (I<wd> is -1 for this event)."
3437 msgstr "イベントキューが溢れた (このイベントの場合、I<wd> は -1 である)。"
3438
3439 #. type: TP
3440 #: build/C/man7/inotify.7:370
3441 #, no-wrap
3442 msgid "B<IN_UNMOUNT>"
3443 msgstr "B<IN_UNMOUNT>"
3444
3445 #. type: Plain text
3446 #: build/C/man7/inotify.7:376
3447 msgid ""
3448 "Filesystem containing watched object was unmounted.  In addition, an "
3449 "B<IN_IGNORED> event will subsequently be generated for the watch descriptor."
3450 msgstr ""
3451 "監視対象オブジェクトを含むファイルシステムがアンマウントされた。さらに、この"
3452 "監視対象ディスクリプターに対して B<IN_IGNORED> イベントが生成される。"
3453
3454 #. type: SS
3455 #: build/C/man7/inotify.7:377
3456 #, no-wrap
3457 msgid "Examples"
3458 msgstr "例"
3459
3460 #. type: Plain text
3461 #: build/C/man7/inotify.7:385
3462 msgid ""
3463 "Suppose an application is watching the directory I<dir> and the file I<dir/"
3464 "myfile> for all events.  The examples below show some events that will be "
3465 "generated for these two objects."
3466 msgstr ""
3467 "アプリケーションがディレクトリ I<dir> とファイル I<dir/myfile> のすべてのイベ"
3468 "ントを監視しているとする。 以下に、これらの 2 つのオブジェクトに対して生成さ"
3469 "れるイベントの例を示す。"
3470
3471 #. type: TP
3472 #: build/C/man7/inotify.7:386
3473 #, no-wrap
3474 msgid "fd = open(\"dir/myfile\", O_RDWR);"
3475 msgstr "fd = open(\"dir/myfile\", O_RDWR);"
3476
3477 #. type: Plain text
3478 #: build/C/man7/inotify.7:394
3479 msgid "Generates B<IN_OPEN> events for both I<dir> and I<dir/myfile>."
3480 msgstr ""
3481 "I<dir> と I<dir/myfile> の両方に対して B<IN_OPEN> イベントが生成される。"
3482
3483 #. type: TP
3484 #: build/C/man7/inotify.7:394
3485 #, no-wrap
3486 msgid "read(fd, buf, count);"
3487 msgstr "read(fd, buf, count);"
3488
3489 #. type: Plain text
3490 #: build/C/man7/inotify.7:402
3491 msgid "Generates B<IN_ACCESS> events for both I<dir> and I<dir/myfile>."
3492 msgstr ""
3493 "I<dir> と I<dir/myfile> の両方に対して B<IN_ACCESS> イベントが生成される"
3494
3495 #. type: TP
3496 #: build/C/man7/inotify.7:402
3497 #, no-wrap
3498 msgid "write(fd, buf, count);"
3499 msgstr "write(fd, buf, count);"
3500
3501 #. type: Plain text
3502 #: build/C/man7/inotify.7:410
3503 msgid "Generates B<IN_MODIFY> events for both I<dir> and I<dir/myfile>."
3504 msgstr ""
3505 "I<dir> と I<dir/myfile> の両方に対して B<IN_MODIFY> イベントが生成される"
3506
3507 #. type: TP
3508 #: build/C/man7/inotify.7:410
3509 #, no-wrap
3510 msgid "fchmod(fd, mode);"
3511 msgstr "fchmod(fd, mode);"
3512
3513 #. type: Plain text
3514 #: build/C/man7/inotify.7:418
3515 msgid "Generates B<IN_ATTRIB> events for both I<dir> and I<dir/myfile>."
3516 msgstr ""
3517 "I<dir> と I<dir/myfile> の両方に対して B<IN_ATTRIB> イベントが生成される"
3518
3519 #. type: TP
3520 #: build/C/man7/inotify.7:418
3521 #, no-wrap
3522 msgid "close(fd);"
3523 msgstr "close(fd);"
3524
3525 #. type: Plain text
3526 #: build/C/man7/inotify.7:426
3527 msgid "Generates B<IN_CLOSE_WRITE> events for both I<dir> and I<dir/myfile>."
3528 msgstr ""
3529 "I<dir> と I<dir/myfile> の両方に対して B<IN_CLOSE_WRITE> イベントが生成される"
3530
3531 #. type: Plain text
3532 #: build/C/man7/inotify.7:435
3533 msgid ""
3534 "Suppose an application is watching the directories I<dir1> and I<dir2>, and "
3535 "the file I<dir1/myfile>.  The following examples show some events that may "
3536 "be generated."
3537 msgstr ""
3538 "アプリケーションがディレクトリ I<dir1> と I<dir2>、およびファイル I<dir1/"
3539 "myfile> を監視しているとする。 以下に生成されるイベントの例を示す。"
3540
3541 #. type: TP
3542 #: build/C/man7/inotify.7:436
3543 #, no-wrap
3544 msgid "link(\"dir1/myfile\", \"dir2/new\");"
3545 msgstr "link(\"dir1/myfile\", \"dir2/new\");"
3546
3547 #. type: Plain text
3548 #: build/C/man7/inotify.7:446
3549 msgid ""
3550 "Generates an B<IN_ATTRIB> event for I<myfile> and an B<IN_CREATE> event for "
3551 "I<dir2>."
3552 msgstr ""
3553 "I<myfile> に対して B<IN_ATTRIB> イベントが生成され、 I<dir2> に対して "
3554 "B<IN_CREATE> イベントが生成される。"
3555
3556 #. type: TP
3557 #: build/C/man7/inotify.7:446
3558 #, no-wrap
3559 msgid "rename(\"dir1/myfile\", \"dir2/myfile\");"
3560 msgstr "rename(\"dir1/myfile\", \"dir2/myfile\");"
3561
3562 #. type: Plain text
3563 #: build/C/man7/inotify.7:467
3564 msgid ""
3565 "Generates an B<IN_MOVED_FROM> event for I<dir1>, an B<IN_MOVED_TO> event for "
3566 "I<dir2>, and an B<IN_MOVE_SELF> event for I<myfile>.  The B<IN_MOVED_FROM> "
3567 "and B<IN_MOVED_TO> events will have the same I<cookie> value."
3568 msgstr ""
3569 "I<dir1> に対してイベント B<IN_MOVED_FROM> が、 I<dir2> に対してイベント "
3570 "B<IN_MOVED_TO> が、 I<myfile> に対してイベント B<IN_MOVE_SELF> が生成される。"
3571 "この際 イベント B<IN_MOVED_FROM> と B<IN_MOVED_TO> は同じ I<cookie> 値を持"
3572 "つ。"
3573
3574 #. type: Plain text
3575 #: build/C/man7/inotify.7:481
3576 msgid ""
3577 "Suppose that I<dir1/xx> and I<dir2/yy> are (the only) links to the same "
3578 "file, and an application is watching I<dir1>, I<dir2>, I<dir1/xx>, and "
3579 "I<dir2/yy>.  Executing the following calls in the order given below will "
3580 "generate the following events:"
3581 msgstr ""
3582 "I<dir1/xx> と I<dir2/yy> は同じファイルを参照するリンクで (他のリンクはないも"
3583 "のとする)、 アプリケーションは I<dir1>, I<dir2>, I<dir1/xx>, I<dir2/yy> を監"
3584 "視しているものとする。 以下に示す順序で下記の呼び出しを実行すると、以下のイベ"
3585 "ントが生成される。"
3586
3587 #. type: TP
3588 #: build/C/man7/inotify.7:482
3589 #, no-wrap
3590 msgid "unlink(\"dir2/yy\");"
3591 msgstr "unlink(\"dir2/yy\");"
3592
3593 #. type: Plain text
3594 #: build/C/man7/inotify.7:493
3595 msgid ""
3596 "Generates an B<IN_ATTRIB> event for I<xx> (because its link count changes)  "
3597 "and an B<IN_DELETE> event for I<dir2>."
3598 msgstr ""
3599 "I<xx> に対して B<IN_ATTRIB> イベントが生成され (リンク数が変化したため)、 "
3600 "I<dir2> に対して B<IN_DELETE> イベントが生成される。"
3601
3602 #. type: TP
3603 #: build/C/man7/inotify.7:493
3604 #, no-wrap
3605 msgid "unlink(\"dir1/xx\");"
3606 msgstr "unlink(\"dir1/xx\");"
3607
3608 #. type: Plain text
3609 #: build/C/man7/inotify.7:506
3610 msgid ""
3611 "Generates B<IN_ATTRIB>, B<IN_DELETE_SELF>, and B<IN_IGNORED> events for "
3612 "I<xx>, and an B<IN_DELETE> event for I<dir1>."
3613 msgstr ""
3614 "I<xx> に対してイベント B<IN_ATTRIB>, B<IN_DELETE_SELF>, B<IN_IGNORED> が生成"
3615 "され、 I<dir1> に対して B<IN_DELETE> イベントが生成される。"
3616
3617 #. type: Plain text
3618 #: build/C/man7/inotify.7:513
3619 msgid ""
3620 "Suppose an application is watching the directory I<dir> and (the empty) "
3621 "directory I<dir/subdir>.  The following examples show some events that may "
3622 "be generated."
3623 msgstr ""
3624 "アプリケーションがディレクトリ I<dir> と (空の) ディレクトリ I<dir/subdir> を"
3625 "監視しているものとする。 以下に生成されるイベントの例を示す。"
3626
3627 #. type: TP
3628 #: build/C/man7/inotify.7:514
3629 #, no-wrap
3630 msgid "mkdir(\"dir/new\", mode);"
3631 msgstr "mkdir(\"dir/new\", mode);"
3632
3633 #. type: Plain text
3634 #: build/C/man7/inotify.7:520
3635 msgid "Generates an B<IN_CREATE | IN_ISDIR> event for I<dir>."
3636 msgstr "I<dir> に対して B<IN_CREATE | IN_ISDIR> イベントが生成される。"
3637
3638 #. type: TP
3639 #: build/C/man7/inotify.7:520
3640 #, no-wrap
3641 msgid "rmdir(\"dir/subdir\");"
3642 msgstr "rmdir(\"dir/subdir\");"
3643
3644 #. type: Plain text
3645 #: build/C/man7/inotify.7:532
3646 msgid ""
3647 "Generates B<IN_DELETE_SELF> and B<IN_IGNORED> events for I<subdir>, and an "
3648 "B<IN_DELETE | IN_ISDIR> event for I<dir>."
3649 msgstr ""
3650 "I<subdir> に対してイベント B<IN_DELETE_SELF> と B<IN_IGNORED> が生成され、 "
3651 "I<dir> に対して B<IN_DELETE | IN_ISDIR> イベントが生成される。"
3652
3653 #. type: SS
3654 #: build/C/man7/inotify.7:533
3655 #, no-wrap
3656 msgid "/proc interfaces"
3657 msgstr "/proc インターフェース"
3658
3659 #. type: Plain text
3660 #: build/C/man7/inotify.7:536
3661 msgid ""
3662 "The following interfaces can be used to limit the amount of kernel memory "
3663 "consumed by inotify:"
3664 msgstr ""
3665 "以下のインターフェースは、inotify で消費される カーネルメモリーの総量を制限す"
3666 "るのに使用できる:"
3667
3668 #. type: TP
3669 #: build/C/man7/inotify.7:536
3670 #, no-wrap
3671 msgid "I</proc/sys/fs/inotify/max_queued_events>"
3672 msgstr "I</proc/sys/fs/inotify/max_queued_events>"
3673
3674 #. type: Plain text
3675 #: build/C/man7/inotify.7:545
3676 msgid ""
3677 "The value in this file is used when an application calls B<inotify_init>(2)  "
3678 "to set an upper limit on the number of events that can be queued to the "
3679 "corresponding inotify instance.  Events in excess of this limit are dropped, "
3680 "but an B<IN_Q_OVERFLOW> event is always generated."
3681 msgstr ""
3682 "このファイルの値は、アプリケーションが B<inotify_init>(2)  を呼び出すときに使"
3683 "用され、対応する inotify インスタンスについて キューに入れられるイベントの数"
3684 "の上限を設定する。 この制限を超えたイベントは破棄されるが、 B<IN_Q_OVERFLOW> "
3685 "イベントが常に生成される。"
3686
3687 #. type: TP
3688 #: build/C/man7/inotify.7:545
3689 #, no-wrap
3690 msgid "I</proc/sys/fs/inotify/max_user_instances>"
3691 msgstr "I</proc/sys/fs/inotify/max_user_instances>"
3692
3693 #. type: Plain text
3694 #: build/C/man7/inotify.7:549
3695 msgid ""
3696 "This specifies an upper limit on the number of inotify instances that can be "
3697 "created per real user ID."
3698 msgstr ""
3699 "1 つの実ユーザー ID に対して生成できる inotify インスタンスの数の上限を指定す"
3700 "る。"
3701
3702 #. type: TP
3703 #: build/C/man7/inotify.7:549
3704 #, no-wrap
3705 msgid "I</proc/sys/fs/inotify/max_user_watches>"
3706 msgstr "I</proc/sys/fs/inotify/max_user_watches>"
3707
3708 #. type: Plain text
3709 #: build/C/man7/inotify.7:553
3710 msgid ""
3711 "This specifies an upper limit on the number of watches that can be created "
3712 "per real user ID."
3713 msgstr "作成可能な監視対象の数の実 UID 単位の上限を指定する。"
3714
3715 #. type: Plain text
3716 #: build/C/man7/inotify.7:561
3717 msgid ""
3718 "Inotify was merged into the 2.6.13 Linux kernel.  The required library "
3719 "interfaces were added to glibc in version 2.4.  (B<IN_DONT_FOLLOW>, "
3720 "B<IN_MASK_ADD>, and B<IN_ONLYDIR> were added in glibc version 2.5.)"
3721 msgstr ""
3722 "inotify は 2.6.13 の Linux カーネルに組込まれた。 これに必要なライブラリのイ"
3723 "ンターフェースは、 glibc のバージョン 2.4 に追加された (B<IN_DONT_FOLLOW>, "
3724 "B<IN_MASK_ADD>, B<IN_ONLYDIR> は glibc バージョン 2.5 で追加された)。"
3725
3726 #. type: Plain text
3727 #: build/C/man7/inotify.7:563
3728 msgid "The inotify API is Linux-specific."
3729 msgstr "inotify API は Linux 独自のものである。"
3730
3731 #. type: Plain text
3732 #: build/C/man7/inotify.7:570
3733 msgid ""
3734 "Inotify file descriptors can be monitored using B<select>(2), B<poll>(2), "
3735 "and B<epoll>(7).  When an event is available, the file descriptor indicates "
3736 "as readable."
3737 msgstr ""
3738 "inotify ファイルディスクリプターは B<select>(2), B<poll>(2), B<epoll>(7)  を"
3739 "使って監視できる。 イベントがある場合、ファイルディスクリプターは読み込み可能"
3740 "と通知する。"
3741
3742 #. type: Plain text
3743 #: build/C/man7/inotify.7:599
3744 msgid ""
3745 "Since Linux 2.6.25, signal-driven I/O notification is available for inotify "
3746 "file descriptors; see the discussion of B<F_SETFL> (for setting the "
3747 "B<O_ASYNC> flag), B<F_SETOWN>, and B<F_SETSIG> in B<fcntl>(2).  The "
3748 "I<siginfo_t> structure (described in B<sigaction>(2))  that is passed to the "
3749 "signal handler has the following fields set: I<si_fd> is set to the inotify "
3750 "file descriptor number; I<si_signo> is set to the signal number; I<si_code> "
3751 "is set to B<POLL_IN>; and B<POLLIN> is set in I<si_band>."
3752 msgstr ""
3753 "Linux 2.6.25 以降では、シグナル駆動 (signal-driven) I/O の通知が inotify ファ"
3754 "イルディスクリプターについて利用可能である。 B<fcntl>(2)  に書かれている "
3755 "(B<O_ASYNC> フラグを設定するための)  B<F_SETFL>, B<F_SETOWN>, B<F_SETSIG> の"
3756 "議論を参照のこと。 シグナルハンドラーに渡される I<siginfo_t> 構造体は、以下の"
3757 "フィールドが設定される (I<siginfo_t> は B<sigaction>(2)  で説明されている)。 "
3758 "I<si_fd> には inotify ファイルディスクリプター番号が、 I<si_signo> にはシグナ"
3759 "ル番号が、 I<si_code> には B<POLL_IN> が、 I<si_band> には B<POLLIN> が設定さ"
3760 "れる。"
3761
3762 #. type: Plain text
3763 #: build/C/man7/inotify.7:612
3764 msgid ""
3765 "If successive output inotify events produced on the inotify file descriptor "
3766 "are identical (same I<wd>, I<mask>, I<cookie>, and I<name>), then they are "
3767 "coalesced into a single event if the older event has not yet been read (but "
3768 "see BUGS).  This reduces the amount of kernel memory required for the event "
3769 "queue, but also means that an application can't use inotify to reliably "
3770 "count file events."
3771 msgstr ""
3772 "inotify ファイルディスクリプターに対して 連続して生成される出力 inotify イベ"
3773 "ントが同一の場合 (I<wd>, I<mask>, I<cookie>, I<name> が等しい場合)、 前のイベ"
3774 "ントがまだ読み込まれていなければ、 連続するイベントが 1 つのイベントにまとめ"
3775 "られる (ただし「バグ」の節も参照のこと)。 これによりイベントキューに必要な"
3776 "カーネルメモリー量が減るが、 これはまたアプリケーションがファイルイベント数を"
3777 "信頼性を持って数えるのに inotify を使用できないということでもある。"
3778
3779 #. type: Plain text
3780 #: build/C/man7/inotify.7:618
3781 msgid ""
3782 "The events returned by reading from an inotify file descriptor form an "
3783 "ordered queue.  Thus, for example, it is guaranteed that when renaming from "
3784 "one directory to another, events will be produced in the correct order on "
3785 "the inotify file descriptor."
3786 msgstr ""
3787 "inotify ファイルディスクリプターの読み込みで返されるイベントは、 順序付けられ"
3788 "たキューになる。 従って、たとえば、あるディレクトリの名前を別の名前に変更した"
3789 "場合、 inotify ファイルディスクリプターについての正しい順番で イベントが生成"
3790 "されることが保証される。"
3791
3792 #. type: Plain text
3793 #: build/C/man7/inotify.7:624
3794 msgid ""
3795 "The B<FIONREAD> B<ioctl>(2)  returns the number of bytes available to read "
3796 "from an inotify file descriptor."
3797 msgstr ""
3798 "B<FIONREAD> B<ioctl>(2)  は inotify ファイルディスクリプターから何バイト読み"
3799 "込めるかを返す。"
3800
3801 #. type: Plain text
3802 #: build/C/man7/inotify.7:631
3803 msgid ""
3804 "The inotify API provides no information about the user or process that "
3805 "triggered the inotify event.  In particular, there is no easy way for a "
3806 "process that is monitoring events via inotify to distinguish events that it "
3807 "triggers itself from those that are triggered by other processes."
3808 msgstr ""
3809 "inotify API では、inotify イベントが発生するきっかけとなったユーザーやプロセ"
3810 "スに関する情報は提供されない。とりわけ、inotify 経由でイベントを監視している"
3811 "プロセスが、自分自身がきっかけとなったイベントと他のプロセスがきっかけとなっ"
3812 "たイベントを区別する簡単な手段はない。"
3813
3814 #. type: Plain text
3815 #: build/C/man7/inotify.7:644
3816 msgid ""
3817 "Inotify reports only events that a user-space program triggers through the "
3818 "filesystem API.  As a result, it does not catch remote events that occur on "
3819 "network filesystems.  (Applications must fall back to polling the filesystem "
3820 "to catch such events.)  Furthermore, various pseudo-filesystems such as I</"
3821 "proc>, I</sys>, and I</dev/pts> are not monitorable with inotify."
3822 msgstr ""
3823 "inotify は、ファイルシステム API 経由でユーザー空間プログラムがきっかけとなっ"
3824 "たイベントだけを報告する。 結果として、 inotify はネットワークファイルシステ"
3825 "ムで発生したリモートのイベントを捉えることはできない (このようなイベントを捉"
3826 "えるにはアプリケーションはファイルシステムをポーリングする必要がある)。 さら"
3827 "に、 I</proc>, I</sys>, I</dev/pts> といったいくつかの疑似ファイルシステムは "
3828 "inotify で監視することができない。"
3829
3830 #. type: Plain text
3831 #: build/C/man7/inotify.7:651
3832 msgid ""
3833 "The inotify API does not report file accesses and modifications that may "
3834 "occur because of B<mmap>(2), B<msync>(2), and B<munmap>(2)."
3835 msgstr ""
3836 "inotify API は B<mmap>(2), B<msync>(2), B<munmap>(2) により起こったファイルの"
3837 "アクセスと変更を報告しない。"
3838
3839 #. type: Plain text
3840 #: build/C/man7/inotify.7:655
3841 msgid ""
3842 "The inotify API identifies affected files by filename.  However, by the time "
3843 "an application processes an inotify event, the filename may already have "
3844 "been deleted or renamed."
3845 msgstr ""
3846 "inotify API では影響が受けるファイルをファイル名で特定する。\n"
3847 "しかしながら、アプリケーションが inotify イベントを処理する時点では、\n"
3848 "そのファイル名がすでに削除されたり変更されたりしている可能性がある。"
3849
3850 #. type: Plain text
3851 #: build/C/man7/inotify.7:660
3852 msgid ""
3853 "The inotify API identifies events via watch descriptors.  It is the "
3854 "application's responsibility to cache a mapping (if one is needed) between "
3855 "watch descriptors and pathnames.  Be aware that directory renamings may "
3856 "affect multiple cached pathnames."
3857 msgstr ""
3858 "inotify API では監視対象ディスクリプターを通してイベントが区別される。 (必要"
3859 "であれば) 監視対象ディスクリプターとパス名のマッピングをキャッシュしておくの"
3860 "はアプリケーションの役目である。 ディレクトリの名前変更の場合、キャッシュして"
3861 "いる複数のパス名に影響がある点に注意すること。"
3862
3863 #. type: Plain text
3864 #: build/C/man7/inotify.7:665
3865 msgid ""
3866 "Inotify monitoring of directories is not recursive: to monitor "
3867 "subdirectories under a directory, additional watches must be created.  This "
3868 "can take a significant amount time for large directory trees."
3869 msgstr ""
3870 "inotify によるディレクトリの監視は再帰的に行われない: あるディレクトリ以下"
3871 "の\n"
3872 "サブディレクトリを監視する場合、 監視対象を追加で作成しなければならない。\n"
3873 "大きなディレクトリツリーの場合には、この作業にかなり時間がかかることがある。"
3874
3875 #. type: Plain text
3876 #: build/C/man7/inotify.7:674
3877 msgid ""
3878 "If monitoring an entire directory subtree, and a new subdirectory is created "
3879 "in that tree or an existing directory is renamed into that tree, be aware "
3880 "that by the time you create a watch for the new subdirectory, new files (and "
3881 "subdirectories) may already exist inside the subdirectory.  Therefore, you "
3882 "may want to scan the contents of the subdirectory immediately after adding "
3883 "the watch (and, if desired, recursively add watches for any subdirectories "
3884 "that it contains)."
3885 msgstr ""
3886 "ディレクトリツリー全体を監視していて、 そのツリー内に新しいサブディレクトリが"
3887 "作成されるか、 既存のディレクトリが名前が変更されそのツリー内に移動した場"
3888 "合、 新しいサブディレクトリに対する watch を作成するまでに、 新しいファイル "
3889 "(やサブディレクトリ) がそのサブディレクトリ内にすでに作成されている場合がある"
3890 "点に注意すること。 したがって、watch を追加した直後にサブディレクトリの内容を"
3891 "スキャンしたいと思う場合もあるだろう (必要ならそのサブディレクトリ内のサブ"
3892 "ディレクトリに対する watch も再帰的に追加することもあるだろう)。"
3893
3894 #. type: Plain text
3895 #: build/C/man7/inotify.7:686
3896 msgid ""
3897 "Note that the event queue can overflow.  In this case, events are lost.  "
3898 "Robust applications should handle the possibility of lost events "
3899 "gracefully.  For example, it may be necessary to rebuild part or all of the "
3900 "application cache.  (One simple, but possibly expensive, approach is to "
3901 "close the inotify file descriptor, empty the cache, create a new inotify "
3902 "file descriptor, and then re-create watches and cache entries for the "
3903 "objects to be monitored.)"
3904 msgstr ""
3905 "イベントキューはオーバーフローする場合があることに注意すること。 この場合、イ"
3906 "ベントは失なわれる。 ロバスト性が求められるアプリケーションでは、 イベントが"
3907 "失なわれる可能性も含めて適切に処理を行うべきである。 例えば、アプリケーション"
3908 "内のキャッシュの一部分または全てを再構築する必要があるかもしれない。 (単純だ"
3909 "が、おそらくコストがかかる方法は、 inotify ファイルディスクリプターをクローズ"
3910 "し、 キャッシュを空にし、 新しい inotify ファイルディスクリプターを作成し、 "
3911 "監視しているオブジェクトの監視対象ディスクリプターとキャッシュエントリーの再"
3912 "作成を行う方法である。)"
3913
3914 #. type: SS
3915 #: build/C/man7/inotify.7:686
3916 #, no-wrap
3917 msgid "Dealing with rename() events"
3918 msgstr "rename() イベントの取り扱い"
3919
3920 #. type: Plain text
3921 #: build/C/man7/inotify.7:695
3922 msgid ""
3923 "As noted above, the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair that is "
3924 "generated by B<rename>(2)  can be matched up via their shared cookie value.  "
3925 "However, the task of matching has some challenges."
3926 msgstr ""
3927 "上述の通り、 B<rename>(2) により生成される B<IN_MOVED_FROM> と "
3928 "B<IN_MOVED_TO> イベントの組は、共有される cookie 値によって対応を取ることがで"
3929 "きる。 しかし、対応を取る場合にはいくつか難しい点がある。"
3930
3931 #. type: Plain text
3932 #: build/C/man7/inotify.7:712
3933 msgid ""
3934 "These two events are usually consecutive in the event stream available when "
3935 "reading from the inotify file descriptor.  However, this is not guaranteed.  "
3936 "If multiple processes are triggering events for monitored objects, then (on "
3937 "rare occasions) an arbitrary number of other events may appear between the "
3938 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events.  Furthermore, it is not "
3939 "guaranteed that the event pair is atomically inserted into the queue: there "
3940 "may be a brief interval where the B<IN_MOVED_FROM> has appeared, but the "
3941 "B<IN_MOVED_TO> has not."
3942 msgstr ""
3943 "これらの 2 つのイベントは、 inotify ファイルディスクリプターから読み出しを"
3944 "行った場合に、通常はイベントストリーム内で連続している。 しかしながら、連続し"
3945 "ていることは保証されていない。 複数のプロセスが監視対象オブジェクトでイベント"
3946 "を発生させた場合、 (めったに起こらないことだが) イベント B<IN_MOVED_FROM> と "
3947 "B<IN_MOVED_TO> の間に任意の数の他のイベントがはさまる可能性がある。 さらに、"
3948 "対となるイベントがアトミックにキューに挿入されることも保証されていない。 "
3949 "B<IN_MOVED_FROM> が現れたが B<IN_MOVED_TO> は現れていないという短い期間があり"
3950 "えるということだ。"
3951
3952 #. type: Plain text
3953 #: build/C/man7/inotify.7:737
3954 msgid ""
3955 "Matching up the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair generated by "
3956 "B<rename>(2)  is thus inherently racy.  (Don't forget that if an object is "
3957 "renamed outside of a monitored directory, there may not even be an "
3958 "B<IN_MOVED_TO> event.)  Heuristic approaches (e.g., assume the events are "
3959 "always consecutive)  can be used to ensure a match in most cases, but will "
3960 "inevitably miss some cases, causing the application to perceive the "
3961 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events as being unrelated.  If watch "
3962 "descriptors are destroyed and re-created as a result, then those watch "
3963 "descriptors will be inconsistent with the watch descriptors in any pending "
3964 "events.  (Re-creating the inotify file descriptor and rebuilding the cache "
3965 "may be useful to deal with this scenario.)"
3966 msgstr ""
3967 "したがって、 B<rename>(2) により生成された B<IN_MOVED_FROM> と "
3968 "B<IN_MOVED_TO> のイベントの組の対応を取るのは本質的に難しいことである (監視対"
3969 "象のディレクトリの外へオブジェクトの rename が行われた場合には "
3970 "B<IN_MOVED_TO> イベントは存在しさえしないことを忘れてはならない)。 (イベント"
3971 "は常に連続しているとの仮定を置くといった) 発見的な方法を使うと、ほとんどの場"
3972 "合でイベントの組をうまく見つけることができるが、 いくつかの場合に見逃すことが"
3973 "避けられず、 アプリケーションが B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントが"
3974 "無関係だとみなしてしまう可能性がある。 結果的に、監視対象ディスクリプターが破"
3975 "棄され再作成された場合、これらの監視対象ディスクリプターは、処理待ちイベント"
3976 "の監視対象ディスクリプターと一貫性のないものになってしまう (inotify ファイル"
3977 "ディスクリプターの再作成とキャッシュの再構成はこの状況に対処するのに有用な方"
3978 "法なのだが)。"
3979
3980 #. type: Plain text
3981 #: build/C/man7/inotify.7:754
3982 msgid ""
3983 "Applications should also allow for the possibility that the B<IN_MOVED_FROM> "
3984 "event was the last event that could fit in the buffer returned by the "
3985 "current call to B<read>(2), and the accompanying B<IN_MOVED_TO> event might "
3986 "be fetched only on the next B<read>(2), which should be done with a (small) "
3987 "timeout to allow for the fact that insertion of the B<IN_MOVED_FROM>-"
3988 "B<IN_MOVED_TO> event pair is not atomic, and also the possibility that there "
3989 "may not be any B<IN_MOVED_TO> event."
3990 msgstr ""
3991 "また、アプリケーションは、 B<IN_MOVED_FROM> イベントが今行った B<read>(2) の"
3992 "呼び出しで返されたバッファーのちょうど一番最後のイベントで、 B<IN_MOVED_TO> "
3993 "イベントは次の B<read>(2) を行わないと取得できない可能性も考慮に入れる必要が"
3994 "ある。 2 つ目の B<read>(2) は (短い) タイムアウトで行うべきである。 これは、 "
3995 "B<IN_MOVED_FROM>-B<IN_MOVED_TO> のイベントペアのキューへの挿入はアトミックで"
3996 "はなく、 また B<IN_MOVED_TO> イベントが全く発生しない可能性もあるという事実を"
3997 "考慮に入れておく必要があるからである。"
3998
3999 #. type: Plain text
4000 #: build/C/man7/inotify.7:758
4001 msgid ""
4002 "As of kernel 3.17, calling B<fallocate>(2)  does not create any inotify "
4003 "events."
4004 msgstr ""
4005 "カーネル 3.17 時点では、 B<fallocate>(2) の呼び出しでは inotify イベントが生"
4006 "成されない。"
4007
4008 #.  FIXME . kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321
4009 #.  implies that unmount events were buggy 2.6.11 to 2.6.36
4010 #. type: Plain text
4011 #: build/C/man7/inotify.7:766
4012 msgid "In kernels before 2.6.16, the B<IN_ONESHOT> I<mask> flag does not work."
4013 msgstr "2.6.16 以前のカーネルでは B<IN_ONESHOT> I<mask> フラグが働かない。"
4014
4015 #. type: Plain text
4016 #: build/C/man7/inotify.7:776
4017 msgid ""
4018 "As originally designed and implemented, the B<IN_ONESHOT> flag did not cause "
4019 "an B<IN_IGNORED> event to be generated when the watch was dropped after one "
4020 "event.  However, as an unintended effect of other changes, since Linux "
4021 "2.6.36, an B<IN_IGNORED> event is generated in this case."
4022 msgstr ""
4023 "元々は設計/実装時の意図通り、 イベントが一つ発生し watch が削除された際に "
4024 "B<IN_ONESHOT> フラグでは B<IN_IGNORED> イベントが発生しなかった。 しかし、 別"
4025 "の変更での意図していなかった影響により、 Linux 2.6.36 以降では、 この場合に "
4026 "B<IN_IGNORED> イベントが生成される。"
4027
4028 #.  commit 1c17d18e3775485bf1e0ce79575eb637a94494a2
4029 #. type: Plain text
4030 #: build/C/man7/inotify.7:785
4031 msgid ""
4032 "Before kernel 2.6.25, the kernel code that was intended to coalesce "
4033 "successive identical events (i.e., the two most recent events could "
4034 "potentially be coalesced if the older had not yet been read)  instead "
4035 "checked if the most recent event could be coalesced with the I<oldest> "
4036 "unread event."
4037 msgstr ""
4038 "カーネル 2.6.25 より前では、 連続する同一のイベントを一つにまとめることを意図"
4039 "したコード (古い方のイベントがまだ読み込まれていない場合に、 最新の 2 つのイ"
4040 "ベントを一つにまとめられる可能性がある) が、 最新のイベントが「最も古い」読み"
4041 "込まれていないイベントとまとめられるか をチェックするようになっていた。"
4042
4043 #.  FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=77111
4044 #. type: Plain text
4045 #: build/C/man7/inotify.7:815
4046 msgid ""
4047 "When a watch descriptor is removed by calling B<inotify_rm_watch>(2)  (or "
4048 "because a watch file is deleted or the filesystem that contains it is "
4049 "unmounted), any pending unread events for that watch descriptor remain "
4050 "available to read.  As watch descriptors are subsequently allocated with "
4051 "B<inotify_add_watch>(2), the kernel cycles through the range of possible "
4052 "watch descriptors (0 to B<INT_MAX>)  incrementally.  When allocating a free "
4053 "watch descriptor, no check is made to see whether that watch descriptor "
4054 "number has any pending unread events in the inotify queue.  Thus, it can "
4055 "happen that a watch descriptor is reallocated even when pending unread "
4056 "events exist for a previous incarnation of that watch descriptor number, "
4057 "with the result that the application might then read those events and "
4058 "interpret them as belonging to the file associated with the newly recycled "
4059 "watch descriptor.  In practice, the likelihood of hitting this bug may be "
4060 "extremely low, since it requires that an application cycle through "
4061 "B<INT_MAX> watch descriptors, release a watch descriptor while leaving "
4062 "unread events for that watch descriptor in the queue, and then recycle that "
4063 "watch descriptor.  For this reason, and because there have been no reports "
4064 "of the bug occurring in real-world applications, as of Linux 3.15, no kernel "
4065 "changes have yet been made to eliminate this possible bug."
4066 msgstr ""
4067 "B<inotify_rm_watch>(2) の呼び出しにより監視対象ディスクリプターが削除された場"
4068 "合 (なお、監視対象ファイルの削除や監視対象ファイルが含まれるファイルシステム"
4069 "のアンマウントによっても監視対象ディスクリプターは削除される)、 この監視対象"
4070 "ディスクリプター関連の処理待ちの未読み出しイベントは、 読み出し可能なままとな"
4071 "る。 監視対象ディスクリプターは B<inotify_add_watch>(2) によって後で割り当て"
4072 "られるため、 カーネルは利用可能な監視対象ディスクリプターの範囲 (0 から "
4073 "B<INT_MAX>) から昇順にサイクリックに割り当てを行う。未使用の監視対象ディスク"
4074 "リプターを割り当てる際、 その監視対象ディスクリプター番号に inotify キューで"
4075 "処理待ちの未読み出しイベントがあるかの確認は行われない。 したがって、監視対象"
4076 "ディスクリプターが再割り当てされた際に、 その監視対象ディスクリプターの一つ前"
4077 "の使用時に発生した処理待ちの未読み出しイベントが存在するということが起こりう"
4078 "る。 その結果、アプリケーションはこれらのイベントを読み出す可能性があり、 こ"
4079 "れらのイベントが新しく再利用された監視対象ディスクリプターに関連付けられた"
4080 "ファイルに属するものかを解釈する必要が出て来る。 実際のところ、このバグを踏む"
4081 "可能性は極めて低い。 それは、このバグを踏むためには、アプリケーションが "
4082 "B<INT_MAX> 個の監視対象ディスクリプターが一周させて、 キューに未読み出しイベ"
4083 "ントが残っている監視対象ディスクリプターを解放し、 その監視対象ディスクリプ"
4084 "ターを再利用する必要があるからである。 この理由と、実世界のアプリケーションで"
4085 "発生したというバグ報告がないことから、 Linux 3.15 時点では、この計算上は起こ"
4086 "りうるバグを取り除くためのカーネルの変更は行われていない。"
4087
4088 #. type: Plain text
4089 #: build/C/man7/inotify.7:823
4090 msgid ""
4091 "The following program demonstrates the usage of the inotify API.  It marks "
4092 "the directories passed as a command-line arguments and waits for events of "
4093 "type B<IN_OPEN>, B<IN_CLOSE_NOWRITE> and B<IN_CLOSE_WRITE>."
4094 msgstr ""
4095 "以下のプログラムは inotify API の使用例を示したものである。 コマンドライン引"
4096 "き数で渡されたディレクトリに印を付け、 タイプが B<IN_OPEN>, "
4097 "B<IN_CLOSE_NOWRITE> B<IN_CLOSE_WRITE> のイベントを待つ。"
4098
4099 #. type: Plain text
4100 #: build/C/man7/inotify.7:838
4101 msgid ""
4102 "The following output was recorded while editing the file I</home/user/temp/"
4103 "foo> and listing directory I</tmp>.  Before the file and the directory were "
4104 "opened, B<IN_OPEN> events occurred.  After the file was closed, an "
4105 "B<IN_CLOSE_WRITE> event occurred.  After the directory was closed, an "
4106 "B<IN_CLOSE_NOWRITE> event occurred.  Execution of the program ended when the "
4107 "user pressed the ENTER key."
4108 msgstr ""
4109 "以下は、 ファイル I</home/user/temp/foo> を編集し、 ディレクトリ I</tmp> の一"
4110 "覧表示を行った場合の出力である。 対象のファイルとディレクトリがオープンされる"
4111 "前に、イベント B<IN_OPEN> が発生している。 対象ファイルがクローズされた後にイ"
4112 "ベント B<IN_CLOSE_WRITE> が発生している。 対象ディレクトリがクローズされた後"
4113 "にイベント B<IN_CLOSE_NOWRITE> が発生している。 ユーザーが ENTER キーを押する"
4114 "と、プログラムの実行は終了する。"
4115
4116 #. type: Plain text
4117 #: build/C/man7/inotify.7:848
4118 #, no-wrap
4119 msgid ""
4120 "$ B<./a.out /tmp /home/user/temp>\n"
4121 "Press enter key to terminate.\n"
4122 "Listening for events.\n"
4123 "IN_OPEN: /home/user/temp/foo [file]\n"
4124 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
4125 "IN_OPEN: /tmp/ [directory]\n"
4126 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
4127 msgstr ""
4128 "$ B<./a.out /tmp /home/user/temp>\n"
4129 "Press enter key to terminate.\n"
4130 "Listening for events.\n"
4131 "IN_OPEN: /home/user/temp/foo [file]\n"
4132 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
4133 "IN_OPEN: /tmp/ [directory]\n"
4134 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
4135
4136 #. type: Plain text
4137 #: build/C/man7/inotify.7:860
4138 #, no-wrap
4139 msgid ""
4140 "#include E<lt>errno.hE<gt>\n"
4141 "#include E<lt>poll.hE<gt>\n"
4142 "#include E<lt>stdio.hE<gt>\n"
4143 "#include E<lt>stdlib.hE<gt>\n"
4144 "#include E<lt>sys/inotify.hE<gt>\n"
4145 "#include E<lt>unistd.hE<gt>\n"
4146 msgstr ""
4147 "#include E<lt>errno.hE<gt>\n"
4148 "#include E<lt>poll.hE<gt>\n"
4149 "#include E<lt>stdio.hE<gt>\n"
4150 "#include E<lt>stdlib.hE<gt>\n"
4151 "#include E<lt>sys/inotify.hE<gt>\n"
4152 "#include E<lt>unistd.hE<gt>\n"
4153
4154 #. type: Plain text
4155 #: build/C/man7/inotify.7:866
4156 #, no-wrap
4157 msgid ""
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 msgstr ""
4164 "/* Read all available inotify events from the file descriptor 'fd'.\n"
4165 "   wd is the table of watch descriptors for the directories in argv.\n"
4166 "   argc is the length of wd and argv.\n"
4167 "   argv is the list of watched directories.\n"
4168 "   Entry 0 of wd and argv is unused. */\n"
4169
4170 #. type: Plain text
4171 #: build/C/man7/inotify.7:875
4172 #, no-wrap
4173 msgid ""
4174 "static void\n"
4175 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
4176 "{\n"
4177 "    /* Some systems cannot read integer variables if they are not\n"
4178 "       properly aligned. On other systems, incorrect alignment may\n"
4179 "       decrease performance. Hence, the buffer used for reading from\n"
4180 "       the inotify file descriptor should have the same alignment as\n"
4181 "       struct inotify_event. */\n"
4182 msgstr ""
4183 "static void\n"
4184 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
4185 "{\n"
4186 "    /* Some systems cannot read integer variables if they are not\n"
4187 "       properly aligned. On other systems, incorrect alignment may\n"
4188 "       decrease performance. Hence, the buffer used for reading from\n"
4189 "       the inotify file descriptor should have the same alignment as\n"
4190 "       struct inotify_event. */\n"
4191
4192 #. type: Plain text
4193 #: build/C/man7/inotify.7:882
4194 #, no-wrap
4195 msgid ""
4196 "    char buf[4096]\n"
4197 "        __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
4198 "    const struct inotify_event *event;\n"
4199 "    int i;\n"
4200 "    ssize_t len;\n"
4201 "    char *ptr;\n"
4202 msgstr ""
4203 "    char buf[4096]\n"
4204 "        __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
4205 "    const struct inotify_event *event;\n"
4206 "    int i;\n"
4207 "    ssize_t len;\n"
4208 "    char *ptr;\n"
4209
4210 #. type: Plain text
4211 #: build/C/man7/inotify.7:884
4212 #, no-wrap
4213 msgid "    /* Loop while events can be read from inotify file descriptor. */\n"
4214 msgstr "    /* Loop while events can be read from inotify file descriptor. */\n"
4215
4216 #. type: Plain text
4217 #: build/C/man7/inotify.7:886
4218 #, no-wrap
4219 msgid "    for (;;) {\n"
4220 msgstr "    for (;;) {\n"
4221
4222 #. type: Plain text
4223 #: build/C/man7/inotify.7:888
4224 #, no-wrap
4225 msgid "        /* Read some events. */\n"
4226 msgstr "        /* Read some events. */\n"
4227
4228 #. type: Plain text
4229 #: build/C/man7/inotify.7:894
4230 #, no-wrap
4231 msgid ""
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 msgstr ""
4238 "        len = read(fd, buf, sizeof buf);\n"
4239 "        if (len == -1 && errno != EAGAIN) {\n"
4240 "            perror(\"read\");\n"
4241 "            exit(EXIT_FAILURE);\n"
4242 "        }\n"
4243
4244 #. type: Plain text
4245 #: build/C/man7/inotify.7:898
4246 #, no-wrap
4247 msgid ""
4248 "        /* If the nonblocking read() found no events to read, then\n"
4249 "           it returns -1 with errno set to EAGAIN. In that case,\n"
4250 "           we exit the loop. */\n"
4251 msgstr ""
4252 "        /* If the nonblocking read() found no events to read, then\n"
4253 "           it returns -1 with errno set to EAGAIN. In that case,\n"
4254 "           we exit the loop. */\n"
4255
4256 #. type: Plain text
4257 #: build/C/man7/inotify.7:906
4258 #, no-wrap
4259 msgid ""
4260 "        for (ptr = buf; ptr E<lt> buf + len;\n"
4261 "                ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
4262 msgstr ""
4263 "        for (ptr = buf; ptr E<lt> buf + len;\n"
4264 "                ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
4265
4266 #. type: Plain text
4267 #: build/C/man7/inotify.7:908
4268 #, no-wrap
4269 msgid "            event = (const struct inotify_event *) ptr;\n"
4270 msgstr "            event = (const struct inotify_event *) ptr;\n"
4271
4272 #. type: Plain text
4273 #: build/C/man7/inotify.7:910
4274 #, no-wrap
4275 msgid "            /* Print event type */\n"
4276 msgstr "            /* Print event type */\n"
4277
4278 #. type: Plain text
4279 #: build/C/man7/inotify.7:917
4280 #, no-wrap
4281 msgid ""
4282 "            if (event-E<gt>mask & IN_OPEN)\n"
4283 "                printf(\"IN_OPEN: \");\n"
4284 "            if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
4285 "                printf(\"IN_CLOSE_NOWRITE: \");\n"
4286 "            if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
4287 "                printf(\"IN_CLOSE_WRITE: \");\n"
4288 msgstr ""
4289 "            if (event-E<gt>mask & IN_OPEN)\n"
4290 "                printf(\"IN_OPEN: \");\n"
4291 "            if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
4292 "                printf(\"IN_CLOSE_NOWRITE: \");\n"
4293 "            if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
4294 "                printf(\"IN_CLOSE_WRITE: \");\n"
4295
4296 #. type: Plain text
4297 #: build/C/man7/inotify.7:919
4298 #, no-wrap
4299 msgid "            /* Print the name of the watched directory */\n"
4300 msgstr "            /* Print the name of the watched directory */\n"
4301
4302 #. type: Plain text
4303 #: build/C/man7/inotify.7:926
4304 #, no-wrap
4305 msgid ""
4306 "            for (i = 1; i E<lt> argc; ++i) {\n"
4307 "                if (wd[i] == event-E<gt>wd) {\n"
4308 "                    printf(\"%s/\", argv[i]);\n"
4309 "                    break;\n"
4310 "                }\n"
4311 "            }\n"
4312 msgstr ""
4313 "            for (i = 1; i E<lt> argc; ++i) {\n"
4314 "                if (wd[i] == event-E<gt>wd) {\n"
4315 "                    printf(\"%s/\", argv[i]);\n"
4316 "                    break;\n"
4317 "                }\n"
4318 "            }\n"
4319
4320 #. type: Plain text
4321 #: build/C/man7/inotify.7:928
4322 #, no-wrap
4323 msgid "            /* Print the name of the file */\n"
4324 msgstr "            /* Print the name of the file */\n"
4325
4326 #. type: Plain text
4327 #: build/C/man7/inotify.7:931
4328 #, no-wrap
4329 msgid ""
4330 "            if (event-E<gt>len)\n"
4331 "                printf(\"%s\", event-E<gt>name);\n"
4332 msgstr ""
4333 "            if (event-E<gt>len)\n"
4334 "                printf(\"%s\", event-E<gt>name);\n"
4335
4336 #. type: Plain text
4337 #: build/C/man7/inotify.7:933
4338 #, no-wrap
4339 msgid "            /* Print type of filesystem object */\n"
4340 msgstr "            /* Print type of filesystem object */\n"
4341
4342 #. type: Plain text
4343 #: build/C/man7/inotify.7:941
4344 #, no-wrap
4345 msgid ""
4346 "            if (event-E<gt>mask & IN_ISDIR)\n"
4347 "                printf(\" [directory]\\en\");\n"
4348 "            else\n"
4349 "                printf(\" [file]\\en\");\n"
4350 "        }\n"
4351 "    }\n"
4352 "}\n"
4353 msgstr ""
4354 "            if (event-E<gt>mask & IN_ISDIR)\n"
4355 "                printf(\" [directory]\\en\");\n"
4356 "            else\n"
4357 "                printf(\" [file]\\en\");\n"
4358 "        }\n"
4359 "    }\n"
4360 "}\n"
4361
4362 #. type: Plain text
4363 #: build/C/man7/inotify.7:950
4364 #, no-wrap
4365 msgid ""
4366 "int\n"
4367 "main(int argc, char* argv[])\n"
4368 "{\n"
4369 "    char buf;\n"
4370 "    int fd, i, poll_num;\n"
4371 "    int *wd;\n"
4372 "    nfds_t nfds;\n"
4373 "    struct pollfd fds[2];\n"
4374 msgstr ""
4375 "int\n"
4376 "main(int argc, char* argv[])\n"
4377 "{\n"
4378 "    char buf;\n"
4379 "    int fd, i, poll_num;\n"
4380 "    int *wd;\n"
4381 "    nfds_t nfds;\n"
4382 "    struct pollfd fds[2];\n"
4383
4384 #. type: Plain text
4385 #: build/C/man7/inotify.7:955
4386 #, no-wrap
4387 msgid ""
4388 "    if (argc E<lt> 2) {\n"
4389 "        printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
4390 "        exit(EXIT_FAILURE);\n"
4391 "    }\n"
4392 msgstr ""
4393 "    if (argc E<lt> 2) {\n"
4394 "        printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
4395 "        exit(EXIT_FAILURE);\n"
4396 "    }\n"
4397
4398 #. type: Plain text
4399 #: build/C/man7/inotify.7:957
4400 #, no-wrap
4401 msgid "    printf(\"Press ENTER key to terminate.\\en\");\n"
4402 msgstr "    printf(\"Press ENTER key to terminate.\\en\");\n"
4403
4404 #. type: Plain text
4405 #: build/C/man7/inotify.7:959
4406 #, no-wrap
4407 msgid "    /* Create the file descriptor for accessing the inotify API */\n"
4408 msgstr "    /* Create the file descriptor for accessing the inotify API */\n"
4409
4410 #. type: Plain text
4411 #: build/C/man7/inotify.7:965
4412 #, no-wrap
4413 msgid ""
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 msgstr ""
4420 "    fd = inotify_init1(IN_NONBLOCK);\n"
4421 "    if (fd == -1) {\n"
4422 "        perror(\"inotify_init1\");\n"
4423 "        exit(EXIT_FAILURE);\n"
4424 "    }\n"
4425
4426 #. type: Plain text
4427 #: build/C/man7/inotify.7:967
4428 #, no-wrap
4429 msgid "    /* Allocate memory for watch descriptors */\n"
4430 msgstr "    /* Allocate memory for watch descriptors */\n"
4431
4432 #. type: Plain text
4433 #: build/C/man7/inotify.7:973
4434 #, no-wrap
4435 msgid ""
4436 "    wd = calloc(argc, sizeof(int));\n"
4437 "    if (wd == NULL) {\n"
4438 "        perror(\"calloc\");\n"
4439 "        exit(EXIT_FAILURE);\n"
4440 "    }\n"
4441 msgstr ""
4442 "    wd = calloc(argc, sizeof(int));\n"
4443 "    if (wd == NULL) {\n"
4444 "        perror(\"calloc\");\n"
4445 "        exit(EXIT_FAILURE);\n"
4446 "    }\n"
4447
4448 #. type: Plain text
4449 #: build/C/man7/inotify.7:977
4450 #, no-wrap
4451 msgid ""
4452 "    /* Mark directories for events\n"
4453 "       - file was opened\n"
4454 "       - file was closed */\n"
4455 msgstr ""
4456 "    /* Mark directories for events\n"
4457 "       - file was opened\n"
4458 "       - file was closed */\n"
4459
4460 #. type: Plain text
4461 #: build/C/man7/inotify.7:987
4462 #, no-wrap
4463 msgid ""
4464 "    for (i = 1; i E<lt> argc; i++) {\n"
4465 "        wd[i] = inotify_add_watch(fd, argv[i],\n"
4466 "                                  IN_OPEN | IN_CLOSE);\n"
4467 "        if (wd[i] == -1) {\n"
4468 "            fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4469 "            perror(\"inotify_add_watch\");\n"
4470 "            exit(EXIT_FAILURE);\n"
4471 "        }\n"
4472 "    }\n"
4473 msgstr ""
4474 "    for (i = 1; i E<lt> argc; i++) {\n"
4475 "        wd[i] = inotify_add_watch(fd, argv[i],\n"
4476 "                                  IN_OPEN | IN_CLOSE);\n"
4477 "        if (wd[i] == -1) {\n"
4478 "            fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4479 "            perror(\"inotify_add_watch\");\n"
4480 "            exit(EXIT_FAILURE);\n"
4481 "        }\n"
4482 "    }\n"
4483
4484 #. type: Plain text
4485 #: build/C/man7/inotify.7:998
4486 #, no-wrap
4487 msgid "    /* Inotify input */\n"
4488 msgstr "    /* Inotify input */\n"
4489
4490 #. type: Plain text
4491 #: build/C/man7/inotify.7:1003
4492 #, no-wrap
4493 msgid "    /* Wait for events and/or terminal input */\n"
4494 msgstr "    /* Wait for events and/or terminal input */\n"
4495
4496 #. type: Plain text
4497 #: build/C/man7/inotify.7:1013
4498 #, no-wrap
4499 msgid ""
4500 "    printf(\"Listening for events.\\en\");\n"
4501 "    while (1) {\n"
4502 "        poll_num = poll(fds, nfds, -1);\n"
4503 "        if (poll_num == -1) {\n"
4504 "            if (errno == EINTR)\n"
4505 "                continue;\n"
4506 "            perror(\"poll\");\n"
4507 "            exit(EXIT_FAILURE);\n"
4508 "        }\n"
4509 msgstr ""
4510 "    printf(\"Listening for events.\\en\");\n"
4511 "    while (1) {\n"
4512 "        poll_num = poll(fds, nfds, -1);\n"
4513 "        if (poll_num == -1) {\n"
4514 "            if (errno == EINTR)\n"
4515 "                continue;\n"
4516 "            perror(\"poll\");\n"
4517 "            exit(EXIT_FAILURE);\n"
4518 "        }\n"
4519
4520 #. type: Plain text
4521 #: build/C/man7/inotify.7:1015
4522 #, no-wrap
4523 msgid "        if (poll_num E<gt> 0) {\n"
4524 msgstr "        if (poll_num E<gt> 0) {\n"
4525
4526 #. type: Plain text
4527 #: build/C/man7/inotify.7:1017
4528 #, no-wrap
4529 msgid "            if (fds[0].revents & POLLIN) {\n"
4530 msgstr "            if (fds[0].revents & POLLIN) {\n"
4531
4532 #. type: Plain text
4533 #: build/C/man7/inotify.7:1019
4534 #, no-wrap
4535 msgid "                /* Console input is available. Empty stdin and quit */\n"
4536 msgstr "                /* Console input is available. Empty stdin and quit */\n"
4537
4538 #. type: Plain text
4539 #: build/C/man7/inotify.7:1028
4540 #, no-wrap
4541 msgid "                /* Inotify events are available */\n"
4542 msgstr "                /* Inotify events are available */\n"
4543
4544 #. type: Plain text
4545 #: build/C/man7/inotify.7:1033
4546 #, no-wrap
4547 msgid ""
4548 "                handle_events(fd, wd, argc, argv);\n"
4549 "            }\n"
4550 "        }\n"
4551 "    }\n"
4552 msgstr ""
4553 "                handle_events(fd, wd, argc, argv);\n"
4554 "            }\n"
4555 "        }\n"
4556 "    }\n"
4557
4558 #. type: Plain text
4559 #: build/C/man7/inotify.7:1035
4560 #, no-wrap
4561 msgid "    printf(\"Listening for events stopped.\\en\");\n"
4562 msgstr "    printf(\"Listening for events stopped.\\en\");\n"
4563
4564 #. type: Plain text
4565 #: build/C/man7/inotify.7:1037
4566 #, no-wrap
4567 msgid "    /* Close inotify file descriptor */\n"
4568 msgstr "    /* Close inotify file descriptor */\n"
4569
4570 #. type: Plain text
4571 #: build/C/man7/inotify.7:1039
4572 #, no-wrap
4573 msgid "    close(fd);\n"
4574 msgstr "    close(fd);\n"
4575
4576 #. type: Plain text
4577 #: build/C/man7/inotify.7:1043
4578 #, no-wrap
4579 msgid ""
4580 "    free(wd);\n"
4581 "    exit(EXIT_SUCCESS);\n"
4582 "}\n"
4583 msgstr ""
4584 "    free(wd);\n"
4585 "    exit(EXIT_SUCCESS);\n"
4586 "}\n"
4587
4588 #. type: Plain text
4589 #: build/C/man7/inotify.7:1054
4590 msgid ""
4591 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4592 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4593 "B<stat>(2), B<fanotify>(7)"
4594 msgstr ""
4595 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4596 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4597 "B<stat>(2), B<fanotify>(7)"
4598
4599 #. type: Plain text
4600 #: build/C/man7/inotify.7:1057
4601 msgid ""
4602 "I<Documentation/filesystems/inotify.txt> in the Linux kernel source tree"
4603 msgstr "Linux カーネルソース内の I<Documentation/filesystems/inotify.txt>"
4604
4605 #. type: TH
4606 #: build/C/man2/inotify_add_watch.2:28
4607 #, no-wrap
4608 msgid "INOTIFY_ADD_WATCH"
4609 msgstr "INOTIFY_ADD_WATCH"
4610
4611 #. type: TH
4612 #: build/C/man2/inotify_add_watch.2:28
4613 #, no-wrap
4614 msgid "2014-07-08"
4615 msgstr "2014-07-08"
4616
4617 #. type: Plain text
4618 #: build/C/man2/inotify_add_watch.2:31
4619 msgid "inotify_add_watch - add a watch to an initialized inotify instance"
4620 msgstr ""
4621 "inotify_add_watch - 初期化済み inotify インスタンスに監視対象を追加する"
4622
4623 #. type: Plain text
4624 #: build/C/man2/inotify_add_watch.2:33 build/C/man2/inotify_rm_watch.2:32
4625 msgid "B<#include E<lt>sys/inotify.hE<gt>>"
4626 msgstr "B<#include E<lt>sys/inotify.hE<gt>>"
4627
4628 #. type: Plain text
4629 #: build/C/man2/inotify_add_watch.2:35
4630 msgid ""
4631 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4632 ">I<mask>B<);>"
4633 msgstr ""
4634 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4635 ">I<mask>B<);>"
4636
4637 #. type: Plain text
4638 #: build/C/man2/inotify_add_watch.2:54
4639 msgid ""
4640 "B<inotify_add_watch>()  adds a new watch, or modifies an existing watch, for "
4641 "the file whose location is specified in I<pathname>; the caller must have "
4642 "read permission for this file.  The I<fd> argument is a file descriptor "
4643 "referring to the inotify instance whose watch list is to be modified.  The "
4644 "events to be monitored for I<pathname> are specified in the I<mask> bit-mask "
4645 "argument.  See B<inotify>(7)  for a description of the bits that can be set "
4646 "in I<mask>."
4647 msgstr ""
4648 "B<inotify_add_watch>()  は、 I<pathname> で指定された位置にあるファイルを監視"
4649 "する監視アイテム (watch) の新規追加、 または既存の監視アイテムの変更を行う。 "
4650 "呼び出し元は、監視対象のファイルに対する読み出し許可を 持っていなければならな"
4651 "い。 I<fd> 引き数は、変更を行う監視対象リスト (watch list) を持つ inotify イ"
4652 "ンスタンスを参照するファイルディスクリプターである。 I<pathname> のどのイベン"
4653 "トを監視するかは、引き数のビットマスク I<mask> で指定する。 I<mask> に設定で"
4654 "きるビットの説明については B<inotify>(7)  を参照のこと。"
4655
4656 #. type: Plain text
4657 #: build/C/man2/inotify_add_watch.2:66
4658 msgid ""
4659 "A successful call to B<inotify_add_watch>()  returns a unique watch "
4660 "descriptor for this inotify instance, for the filesystem object that "
4661 "corresponds to I<pathname>.  If the filesystem object was not previously "
4662 "being watched by this inotify instance, then the watch descriptor is newly "
4663 "allocated.  If the filesystem object was already being watched (perhaps via "
4664 "a different link to the same object), then the descriptor for the existing "
4665 "watch is returned."
4666 msgstr ""
4667 "B<inotify_add_watch>() の呼び出しが成功すると、 I<pathname> に対応するファイ"
4668 "ルシステムオブジェクトに対する、 一意な監視対象ディスクリプター (watch "
4669 "descriptor) を、 対象の inotify インスタンスに対して返す。 そのファイルシステ"
4670 "ムオブジェクトが対象の inotify インスタンスによって以前に監視されていない場合"
4671 "には、 監視対象ディスクリプターは新規に割り当てられる。 ファイルシステムオブ"
4672 "ジェクトが (おそらく同じオブジェクトに対する異なるリンク経由で) すでに監視さ"
4673 "れている場合には、 既存の監視に対するディスクリプターが返される。"
4674
4675 #. type: Plain text
4676 #: build/C/man2/inotify_add_watch.2:77
4677 msgid ""
4678 "The watch descriptor is returned by later B<read>(2)s from the inotify file "
4679 "descriptor.  These reads fetch I<inotify_event> structures (see "
4680 "B<inotify>(7))  indicating filesystem events; the watch descriptor inside "
4681 "this structure identifies the object for which the event occurred."
4682 msgstr ""
4683 "これ以降に inotify ファイルディスクリプターから B<read>(2)  を行うと、監視対"
4684 "象ディスクリプターが返される。 これらの B<read>()  を行うと、ファイルシステム"
4685 "イベントを示す I<inotify_event> 構造体が読み出される (B<inotify>(7)  参照)。"
4686 "この構造体内の監視対象ディスクリプターにより、 どのオブジェクトでそのイベント"
4687 "が発生したかを特定できる。"
4688
4689 #. type: Plain text
4690 #: build/C/man2/inotify_add_watch.2:84
4691 msgid ""
4692 "On success, B<inotify_add_watch>()  returns a nonnegative watch descriptor.  "
4693 "On error, -1 is returned and I<errno> is set appropriately."
4694 msgstr ""
4695 "成功すると、 B<inotify_add_watch>()  は非負の監視対象ディスクリプターを返"
4696 "す。 エラーの場合、-1 を返し、 I<errno> を適切に設定する。"
4697
4698 #. type: TP
4699 #: build/C/man2/inotify_add_watch.2:85
4700 #, no-wrap
4701 msgid "B<EACCES>"
4702 msgstr "B<EACCES>"
4703
4704 #. type: Plain text
4705 #: build/C/man2/inotify_add_watch.2:88
4706 msgid "Read access to the given file is not permitted."
4707 msgstr "指定されたファイルに対する読み出しアクセスが許可されていない。"
4708
4709 #. type: Plain text
4710 #: build/C/man2/inotify_add_watch.2:91
4711 msgid "The given file descriptor is not valid."
4712 msgstr "指定されたファイルディスクリプターが有効ではない。"
4713
4714 #. type: TP
4715 #: build/C/man2/inotify_add_watch.2:91
4716 #, no-wrap
4717 msgid "B<EFAULT>"
4718 msgstr "B<EFAULT>"
4719
4720 #. type: Plain text
4721 #: build/C/man2/inotify_add_watch.2:95
4722 msgid "I<pathname> points outside of the process's accessible address space."
4723 msgstr ""
4724 "I<pathname> が指すアドレスがプロセスがアクセスできるアドレス空間外である。"
4725
4726 #. type: Plain text
4727 #: build/C/man2/inotify_add_watch.2:100
4728 msgid ""
4729 "The given event mask contains no valid events; or I<fd> is not an inotify "
4730 "file descriptor."
4731 msgstr ""
4732 "指定されたイベントマスクに有効なイベントが含まれていない。 もしくは I<fd> が "
4733 "inotify ファイルディスクリプターではない。"
4734
4735 #. type: TP
4736 #: build/C/man2/inotify_add_watch.2:100
4737 #, no-wrap
4738 msgid "B<ENAMETOOLONG>"
4739 msgstr "B<ENAMETOOLONG>"
4740
4741 #. type: Plain text
4742 #: build/C/man2/inotify_add_watch.2:104
4743 msgid "I<pathname> is too long."
4744 msgstr "I<pathname> が長過ぎる。"
4745
4746 #. type: Plain text
4747 #: build/C/man2/inotify_add_watch.2:109
4748 msgid ""
4749 "A directory component in I<pathname> does not exist or is a dangling "
4750 "symbolic link."
4751 msgstr ""
4752 "I<pathname> のディレクトリ部分の構成要素が、存在しないか、\n"
4753 "リンク切れのシンボリックリンクである。"
4754
4755 #. type: Plain text
4756 #: build/C/man2/inotify_add_watch.2:112
4757 msgid "Insufficient kernel memory was available."
4758 msgstr "カーネルメモリーが十分になかった。"
4759
4760 #. type: Plain text
4761 #: build/C/man2/inotify_add_watch.2:116
4762 msgid ""
4763 "The user limit on the total number of inotify watches was reached or the "
4764 "kernel failed to allocate a needed resource."
4765 msgstr ""
4766 "inotify 監視対象の総数がユーザーが追加できる上限に達していた。 もしくは、必要"
4767 "な資源の割り当てにカーネルが失敗した。"
4768
4769 #. type: Plain text
4770 #: build/C/man2/inotify_add_watch.2:118 build/C/man2/inotify_rm_watch.2:69
4771 msgid "Inotify was merged into the 2.6.13 Linux kernel."
4772 msgstr "inotify は Linux カーネル 2.6.13 に組み込まれた。"
4773
4774 #. type: Plain text
4775 #: build/C/man2/inotify_add_watch.2:124
4776 msgid "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4777 msgstr "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4778
4779 #. type: TH
4780 #: build/C/man2/inotify_init.2:29
4781 #, no-wrap
4782 msgid "INOTIFY_INIT"
4783 msgstr "INOTIFY_INIT"
4784
4785 #. type: TH
4786 #: build/C/man2/inotify_init.2:29
4787 #, no-wrap
4788 msgid "2014-03-28"
4789 msgstr "2014-03-28"
4790
4791 #. type: Plain text
4792 #: build/C/man2/inotify_init.2:32
4793 msgid "inotify_init, inotify_init1 - initialize an inotify instance"
4794 msgstr "inotify_init, inotify_init1 - inotify インスタンスを初期化する"
4795
4796 #. type: Plain text
4797 #: build/C/man2/inotify_init.2:35
4798 #, no-wrap
4799 msgid "B<#include E<lt>sys/inotify.hE<gt>>\n"
4800 msgstr "B<#include E<lt>sys/inotify.hE<gt>>\n"
4801
4802 #. type: Plain text
4803 #: build/C/man2/inotify_init.2:38
4804 #, no-wrap
4805 msgid ""
4806 "B<int inotify_init(void);>\n"
4807 "B<int inotify_init1(int >I<flags>B<);>\n"
4808 msgstr ""
4809 "B<int inotify_init(void);>\n"
4810 "B<int inotify_init1(int >I<flags>B<);>\n"
4811
4812 #. type: Plain text
4813 #: build/C/man2/inotify_init.2:42
4814 msgid "For an overview of the inotify API, see B<inotify>(7)."
4815 msgstr "inotify API の概要については B<inotify>(7) を参照。"
4816
4817 #. type: Plain text
4818 #: build/C/man2/inotify_init.2:46
4819 msgid ""
4820 "B<inotify_init>()  initializes a new inotify instance and returns a file "
4821 "descriptor associated with a new inotify event queue."
4822 msgstr ""
4823 "B<inotify_init>()  は、新規の inotify インスタンスを初期化し、作成された "
4824 "inotify イベントキュー に対応するファイルディスクリプターを返す。"
4825
4826 #. type: Plain text
4827 #: build/C/man2/inotify_init.2:56
4828 msgid ""
4829 "If I<flags> is 0, then B<inotify_init1>()  is the same as "
4830 "B<inotify_init>().  The following values can be bitwise ORed in I<flags> to "
4831 "obtain different behavior:"
4832 msgstr ""
4833 "B<inotify_init1>()  は、 I<flags> が 0 の場合、 B<inotify_init>()  と同じであ"
4834 "る。 I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作"
4835 "をさせることができる。"
4836
4837 #. type: TP
4838 #: build/C/man2/inotify_init.2:56
4839 #, no-wrap
4840 msgid "B<IN_NONBLOCK>"
4841 msgstr "B<IN_NONBLOCK>"
4842
4843 #. type: Plain text
4844 #: build/C/man2/inotify_init.2:64
4845 msgid ""
4846 "Set the B<O_NONBLOCK> file status flag on the new open file description.  "
4847 "Using this flag saves extra calls to B<fcntl>(2)  to achieve the same result."
4848 msgstr ""
4849 "新しく生成されるオープンファイル記述 (open file description) の BR "
4850 "O_NONBLOCK ファイルステータスフラグをセットする。 このフラグを使うことで、 "
4851 "B<O_NONBLOCK> をセットするために B<fcntl>(2)  を追加で呼び出す必要がなくな"
4852 "る。"
4853
4854 #. type: TP
4855 #: build/C/man2/inotify_init.2:64
4856 #, no-wrap
4857 msgid "B<IN_CLOEXEC>"
4858 msgstr "B<IN_CLOEXEC>"
4859
4860 #. type: Plain text
4861 #: build/C/man2/inotify_init.2:74
4862 msgid ""
4863 "Set the close-on-exec (B<FD_CLOEXEC>)  flag on the new file descriptor.  See "
4864 "the description of the B<O_CLOEXEC> flag in B<open>(2)  for reasons why this "
4865 "may be useful."
4866 msgstr ""
4867 "新しいファイルディスクリプターに対して close-on-exec (B<FD_CLOEXEC>)  フラグ"
4868 "をセットする。 このフラグが役に立つ理由については、 B<open>(2)  の "
4869 "B<O_CLOEXEC> フラグの説明を参照のこと。"
4870
4871 #. type: Plain text
4872 #: build/C/man2/inotify_init.2:79
4873 msgid ""
4874 "On success, these system calls return a new file descriptor.  On error, -1 "
4875 "is returned, and I<errno> is set to indicate the error."
4876 msgstr ""
4877 "成功すると、これらのシステムコールは新しいファイルディスクリプターを返す。 エ"
4878 "ラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
4879
4880 #. type: Plain text
4881 #: build/C/man2/inotify_init.2:85
4882 msgid "(B<inotify_init1>())  An invalid value was specified in I<flags>."
4883 msgstr "(B<inotify_init1>())  無効な値が I<flags> に指定された。"
4884
4885 #. type: Plain text
4886 #: build/C/man2/inotify_init.2:88
4887 msgid ""
4888 "The user limit on the total number of inotify instances has been reached."
4889 msgstr "inotify インスタンスの総数がユーザー単位の上限に達していた。"
4890
4891 #. type: Plain text
4892 #: build/C/man2/inotify_init.2:91
4893 msgid ""
4894 "The system limit on the total number of file descriptors has been reached."
4895 msgstr "inotify ファイルディスクリプターの総数がシステムの上限に達していた。"
4896
4897 #. type: Plain text
4898 #: build/C/man2/inotify_init.2:94
4899 msgid "Insufficient kernel memory is available."
4900 msgstr "カーネルメモリーが十分になかった。"
4901
4902 #. type: Plain text
4903 #: build/C/man2/inotify_init.2:101
4904 msgid ""
4905 "B<inotify_init>()  first appeared in Linux 2.6.13; library support was added "
4906 "to glibc in version 2.4.  B<inotify_init1>()  was added in Linux 2.6.27; "
4907 "library support was added to glibc in version 2.9."
4908 msgstr ""
4909 "B<inotify_init>()  は Linux 2.6.13 で初めて登場し、\n"
4910 "ライブラリによるサポートは glibc バージョン 2.4 で追加された。\n"
4911 "B<inotify_init1>()  は Linux 2.6.27 で追加され、\n"
4912 "ライブラリによるサポートは glibc バージョン 2.9 で追加された。"
4913
4914 #. type: Plain text
4915 #: build/C/man2/inotify_init.2:103
4916 msgid "These system calls are Linux-specific."
4917 msgstr "これらのシステムコールは Linux 独自である。"
4918
4919 #. type: Plain text
4920 #: build/C/man2/inotify_init.2:107
4921 msgid "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4922 msgstr "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4923
4924 #. type: TH
4925 #: build/C/man2/inotify_rm_watch.2:27
4926 #, no-wrap
4927 msgid "INOTIFY_RM_WATCH"
4928 msgstr "INOTIFY_RM_WATCH"
4929
4930 #. type: TH
4931 #: build/C/man2/inotify_rm_watch.2:27
4932 #, no-wrap
4933 msgid "2010-10-15"
4934 msgstr "2010-10-15"
4935
4936 #. type: Plain text
4937 #: build/C/man2/inotify_rm_watch.2:30
4938 msgid "inotify_rm_watch - remove an existing watch from an inotify instance"
4939 msgstr ""
4940 "inotify_rm_watch - inotify インスタンスから既存の監視アイテムを削除する"
4941
4942 #.  Before glibc 2.10, the second argument was types as uint32_t.
4943 #.  http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
4944 #. type: Plain text
4945 #: build/C/man2/inotify_rm_watch.2:36
4946 msgid "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4947 msgstr "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4948
4949 #. type: Plain text
4950 #: build/C/man2/inotify_rm_watch.2:42
4951 msgid ""
4952 "B<inotify_rm_watch>()  removes the watch associated with the watch "
4953 "descriptor I<wd> from the inotify instance associated with the file "
4954 "descriptor I<fd>."
4955 msgstr ""
4956 "B<inotify_rm_watch>()  は、監視対象ディスクリプター (watch descriptor)  "
4957 "I<wd> に対応する監視アイテムを、 ファイルディスクリプター I<fd> に対応する "
4958 "inotify インスタンスから削除する。"
4959
4960 #. type: Plain text
4961 #: build/C/man2/inotify_rm_watch.2:48
4962 msgid ""
4963 "Removing a watch causes an B<IN_IGNORED> event to be generated for this "
4964 "watch descriptor.  (See B<inotify>(7).)"
4965 msgstr ""
4966 "監視対象を削除すると、 この監視対象ディスクリプターに対して B<IN_IGNORED> イ"
4967 "ベントが生成される (B<inotify>(7)  参照)。"
4968
4969 #. type: Plain text
4970 #: build/C/man2/inotify_rm_watch.2:55
4971 msgid ""
4972 "On success, B<inotify_rm_watch>()  returns zero.  On error, -1 is returned "
4973 "and I<errno> is set to indicate the cause of the error."
4974 msgstr ""
4975 "成功すると、B<inotify_rm_watch>() は 0 を返す。 エラーの場合、-1 を返し、 "
4976 "I<errno> をエラーの原因を示す値に設定する。"
4977
4978 #. type: Plain text
4979 #: build/C/man2/inotify_rm_watch.2:60
4980 msgid "I<fd> is not a valid file descriptor."
4981 msgstr "I<fd> が有効なファイルディスクリプターではない。"
4982
4983 #. type: Plain text
4984 #: build/C/man2/inotify_rm_watch.2:67
4985 msgid ""
4986 "The watch descriptor I<wd> is not valid; or I<fd> is not an inotify file "
4987 "descriptor."
4988 msgstr ""
4989 "監視対象ディスクリプター I<wd> が有効でない。もしくは、 I<fd> が inotify ファ"
4990 "イルディスクリプターではない。"
4991
4992 #. type: Plain text
4993 #: build/C/man2/inotify_rm_watch.2:75
4994 msgid "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"
4995 msgstr "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"