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.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-11 03:52+0900\n"
10 "PO-Revision-Date: 2015-01-17 03:37+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
15 "Content-Type: text/plain; charset=UTF-8\n"
16 "Content-Transfer-Encoding: 8bit\n"
19 #: build/C/man7/fanotify.7:25
25 #: build/C/man7/fanotify.7:25 build/C/man7/inotify.7:27
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
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
45 msgid "Linux Programmer's Manual"
46 msgstr "Linux Programmer's Manual"
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
58 #: build/C/man7/fanotify.7:28
59 msgid "fanotify - monitoring filesystem events"
60 msgstr "fanotify - ファイルシステムイベントを監視する"
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
72 #: build/C/man7/fanotify.7:37
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.)"
80 "fanotify API はファイルシステムイベントの通知と横取り機能 (interception) を提"
81 "供する。 ユースケースとしては、ウイルススキャンや階層型ストレージの管理などが"
82 "ある。 現在のところ、限定的なイベントのみがサポートされている。 特に、作成 "
83 "(create)、削除 (delete)、移動 (move) イベントがサポートされていない (これらの"
84 "イベントを通知する API の詳細については B<inotify>(7) を参照)。"
87 #: build/C/man7/fanotify.7:44
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."
94 "B<inotify>(7) API と比較して追加されている機能としては、 マウントされたファイ"
95 "ルシステムの全オブジェクトを監視する機能、 アクセス許可の判定を行う機能、 他"
96 "のアプリケーションによるアクセスの前にファイルを読み出したり変更したりする機"
100 #: build/C/man7/fanotify.7:52
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)."
105 "この API では以下のシステムコールを使用する: B<fanotify_init>(2), "
106 "B<fanotify_mark>(2), B<read>(2), B<write>(2), B<close>(2)。"
109 #: build/C/man7/fanotify.7:52
111 msgid "fanotify_init(), fanotify_mark(), and notification groups"
112 msgstr "fanotify_init(), fanotify_mark() と通知グループ"
115 #: build/C/man7/fanotify.7:57
117 "The B<fanotify_init>(2) system call creates and initializes an fanotify "
118 "notification group and returns a file descriptor referring to it."
120 "B<fanotify_init>(2) システムコールは fanotify 通知グループを作成、初期化し、 "
121 "この通知グループを参照するファイルディスクリプターを返す。"
124 #: build/C/man7/fanotify.7:61
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."
129 "fanotify 通知グループはカーネル内部のオブジェクトで、 イベントが作成される"
130 "ファイル、 ディレクトリ、 マウントポイントのリストを保持する。"
133 #: build/C/man7/fanotify.7:72
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 "
143 "fanotify 通知グループの各エントリーには 2 つのビットマスクがある。 I<mark> マ"
144 "スクと I<ignore> マスクである。 mark マスクはどのファイル操作についてイベント"
145 "を作成するかを定義する。 ignore マスクはどの操作についてイベントを作成しない"
146 "かを定義する。 これらの 2 種類のマスクがあることで、 マウントポイントやディレ"
147 "クトリに対してイベントの受信を mark しておきつつ、 同時にそのマウントポイント"
148 "やディレクトリ配下の特定のオブジェクトに対するイベントを無視する、 といったこ"
152 #: build/C/man7/fanotify.7:78
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."
158 "B<fanotify_mark>(2) システムコールは、ファイル、ディレクトリ、マウントを通知"
159 "グループに追加し、 どのイベントを報告 (もしくは無視) するかを指定する。 ま"
160 "た、このようなエントリーの削除、変更も行う。"
163 #: build/C/man7/fanotify.7:91
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."
175 "ignore マスクの考えられる使用方法はファイルキャッシュに対してである。 ファイ"
176 "ルキャッシュに関して興味のあるイベントは、ファイルの変更とファイルのクローズ"
177 "である。 それゆえ、 キャッシュされたディレクトリやマウントポイントは、 これら"
178 "のイベントを受信するようにマークされる。 ファイルが変更されたという最初のイベ"
179 "ントを受信した後は、 対応するキャッシュエントリーは無効化される。 そのファイ"
180 "ルがクローズされるまでは、 このファイルに対する変更イベントは興味のない情報と"
181 "なる。 したがって、 変更イベントを ignore マスクに追加することができる。 ク"
182 "ローズイベントを受信すると、 変更イベントを ignore イベントから削除し、 ファ"
183 "イルキャッシュエントリーを更新することができる。"
186 #: build/C/man7/fanotify.7:98
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."
194 "fanotify 通知グループのエントリーは、 ファイルやディレクトリでは inode 番号経"
195 "由で参照され、 マウントではマウント ID 経由で参照される。 ファイルやディレク"
196 "トリの名前が変更されたり、移動されたりした場合も、 関連するエントリーはそのま"
197 "ま残る。 ファイルやディレクトリが削除されたり、マウントがアンマウントされたり"
198 "した場合には、 対応するエントリーは削除される。"
201 #: build/C/man7/fanotify.7:98
203 msgid "The event queue"
207 #: build/C/man7/fanotify.7:107
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)."
214 "通知グループにより監視されているファイルシステムオブジェクトでイベントが発生"
215 "すると、 fanotify システムはイベントを生成し、 そのイベントはキューにまとめら"
216 "れる。 これらのイベントは、 B<fanotify_init>(2) が返した fanotify ファイル"
217 "ディスクリプターから (B<read>(2) などを使って) 読み出すことができる。"
220 #: build/C/man7/fanotify.7:121
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."
230 "2 種類のイベントが生成される。 I<notification> (通知) イベントと "
231 "I<permission> (アクセス許可) イベントである。 通知イベントは単なる情報通知で"
232 "あり、 イベントで渡されたファイルディスクリプターをクローズする場合 (下記参"
233 "照) を除き、 受信したアプリケーションでアクションを取る必要はない。 アクセス"
234 "許可イベントは、 受信したアプリケーションがファイルアクセスの許可を承認するか"
235 "を判定する必要がある。 この場合、 受信者はアクセスが許可されたか否かを決定す"
239 #: build/C/man7/fanotify.7:128
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 "
247 "イベントは、 読み出されると、 fanotify グループのイベントキューから削除され"
248 "る。 読み出されたアクセス許可イベントは、 fanotify ファイルディスクリプターに"
249 "アクセス許可の判定が書き込まれるか、 fanotify ファイルディスクリプターがク"
250 "ローズされるまで、 fanotify グループの内部のリストに保持される。"
253 #: build/C/man7/fanotify.7:128
255 msgid "Reading fanotify events"
256 msgstr "fanotify イベントの読み出し"
259 #: build/C/man7/fanotify.7:140
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))."
266 "B<fanotify_init>(2) が返したファイルディスクリプターに対する B<read>(2) を呼"
267 "び出しは、 (B<fanotify_init>(2) の呼び出しでフラグ B<FAN_NONBLOCK> を指定しな"
268 "かった場合) ファイルイベントが起こるか、呼び出しがシグナルによって割り込まれ"
269 "る (B<signal>(7) 参照) まで停止する。"
272 #: build/C/man7/fanotify.7:144
274 "After a successful B<read>(2), the read buffer contains one or more of the "
275 "following structures:"
277 "B<read>(2) が成功すると、読み出しバッファーには以下の構造体が 1 つ以上格納さ"
281 #: build/C/man7/fanotify.7:156
284 "struct fanotify_event_metadata {\n"
285 " __u32 event_len;\n"
288 " __u16 metadata_len;\n"
289 " __aligned_u64 mask;\n"
294 "struct fanotify_event_metadata {\n"
295 " __u32 event_len;\n"
298 " __u16 metadata_len;\n"
299 " __aligned_u64 mask;\n"
305 #: build/C/man7/fanotify.7:163
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 "
311 "性能上の理由から、複数のイベントを一度の B<read>(2) で取得できるように大きめ"
312 "のバッファーサイズ (例えば 4096 バイト) を使用することを推奨する。"
315 #: build/C/man7/fanotify.7:168
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)."
320 "B<read>(2) の返り値はバッファーに格納されたバイト数である。 エラーの場合は "
321 "-1 が返される (ただし、バグも参照)。"
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> 構造体のフィールドは以下のとおりである。"
329 #: build/C/man7/fanotify.7:172
332 msgstr "I<event_len>"
335 #: build/C/man7/fanotify.7:182
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."
342 "これは、 このイベントのデータ長であり、バッファー内の次のイベントへのオフセッ"
343 "トである。 現在の実装では、 I<event_len> の値は常に "
344 "B<FAN_EVENT_METADATA_LEN> である。 しかしながら、 API は将来可変長の構造体を"
345 "返すことができるように設計されている。"
348 #: build/C/man7/fanotify.7:182
354 #: build/C/man7/fanotify.7:191
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 "
362 "このフィールドには構造体のバージョン番号が入る。 実行時に返された構造体がコン"
363 "パイル時の構造体と一致しているかを検査するには、 この値を "
364 "B<FANOTIFY_METADATA_VERSION> を比較すること。 一致しない場合、 アプリケーショ"
365 "ンはその fanotify ファイルディスクリプターを使用するのを諦めるべきである。"
368 #: build/C/man7/fanotify.7:191
374 #: build/C/man7/fanotify.7:194
375 msgid "This field is not used."
376 msgstr "このフィールドは使用されない。"
379 #: build/C/man7/fanotify.7:194
381 msgid "I<metadata_len>"
382 msgstr "I<metadata_len>"
385 #: build/C/man7/fanotify.7:200
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."
391 "この構造体の長さである。 このフィールドは、 イベント種別単位のオプションヘッ"
392 "ダーの実装を扱うために導入された。 現在の実装ではこのようなオプションヘッダー"
396 #: build/C/man7/fanotify.7:200
402 #: build/C/man7/fanotify.7:203
403 msgid "This is a bit mask describing the event (see below)."
404 msgstr "イベントを示すビットマスクである (下記参照)"
407 #: build/C/man7/fanotify.7:203 build/C/man7/fanotify.7:360
413 #: build/C/man7/fanotify.7:211
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."
420 "これはアクセスされたオブジェクトに対するオープンされたファイルディスクリプ"
421 "ターである。 または、キューのオーバーフローが発生した場合には B<FAN_NOFD> が"
422 "入る。 ファイルディスクリプターは監視対象のファイルやディレクトリの内容にアク"
423 "セスするのに使用できる。 読み出したアプリケーションは責任を持ってこのファイル"
424 "ディスクリプターをクローズしなければならない。"
427 #: build/C/man7/fanotify.7:224
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 "
438 "B<fanotify_init>(2) を呼び出す際、 呼び出し元はこのファイルディスクリプターに"
439 "対応するオープンファイル記述にセットされた様々なファイル状態フラグを "
440 "(I<event_f_flags> 引き数を使って) 指定することができる。 さらに、 (カーネル内"
441 "部の) B<FMODE_NONOTIFY> ファイル状態フラグがオープンファイル記述にセットされ"
442 "る。 このフラグは fanotify イベントの生成を抑制する。 したがって、 fanotify "
443 "イベントの受信者がこのファイルディスクリプターを使って通知されたファイルや"
444 "ディレクトリにアクセスした際に、 これ以上イベントが作成されなくなる。"
447 #: build/C/man7/fanotify.7:224
453 #: build/C/man7/fanotify.7:232
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."
460 "これはイベントが発生する原因となったプロセス ID である。 fanotify イベントを"
461 "監視しているプログラムは、 この PID を B<getpid>(2) が返す PID と比較すること"
462 "で、 イベントが監視しているプログラム自身から発生したかどうか、 別のプロセス"
463 "によるファイルアクセスにより発生したか、を判定できる。"
466 #: build/C/man7/fanotify.7:242
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."
475 "I<mask> のビットマスクは、1 つのファイルシステムオブジェクトに対してどのイベ"
476 "ントが発生したかを示す。 監視対象のファイルシステムオブジェクトに複数のイベン"
477 "トが発生した場合は、 このマスクに複数のビットがセットされることがある。 特"
478 "に、 同じファイルシステムオブジェクトに対する連続するイベントが同じプロセスか"
479 "ら生成された場合には、 一つのイベントにまとめられることがある。 例外として、 "
480 "2 つのアクセス許可イベントが一つのキューエントリーにまとめられることは決して"
484 #: build/C/man7/fanotify.7:246
485 msgid "The bits that may appear in I<mask> are as follows:"
486 msgstr "I<mask> でセットされている可能性のあるビットは以下のとおりである。"
489 #: build/C/man7/fanotify.7:246 build/C/man2/fanotify_mark.2:136
491 msgid "B<FAN_ACCESS>"
492 msgstr "B<FAN_ACCESS>"
495 #: build/C/man7/fanotify.7:249
496 msgid "A file or a directory (but see BUGS) was accessed (read)."
498 "ファイルやディレクトリがアクセスされた (読み出しが行われた) (ただし、「バグ」"
502 #: build/C/man7/fanotify.7:249 build/C/man2/fanotify_mark.2:148
508 #: build/C/man7/fanotify.7:252
509 msgid "A file or a directory was opened."
510 msgstr "ファイルやディレクトリがオープンされた。"
513 #: build/C/man7/fanotify.7:252 build/C/man2/fanotify_mark.2:139
515 msgid "B<FAN_MODIFY>"
516 msgstr "B<FAN_MODIFY>"
519 #: build/C/man7/fanotify.7:255
520 msgid "A file was modified."
521 msgstr "ファイルやディレクトリが変更された。"
524 #: build/C/man7/fanotify.7:255 build/C/man2/fanotify_mark.2:142
526 msgid "B<FAN_CLOSE_WRITE>"
527 msgstr "B<FAN_CLOSE_WRITE>"
530 #: build/C/man7/fanotify.7:262
532 "A file that was opened for writing (B<O_WRONLY> or B<O_RDWR>) was closed."
534 "書き込み用 (B<O_WRONLY> か B<O_RDWR>) にオープンされたファイルがクローズされ"
538 #: build/C/man7/fanotify.7:262 build/C/man2/fanotify_mark.2:145
540 msgid "B<FAN_CLOSE_NOWRITE>"
541 msgstr "B<FAN_CLOSE_NOWRITE>"
544 #: build/C/man7/fanotify.7:267
546 "A file or directory that was opened read-only (B<O_RDONLY>) was closed."
547 msgstr "読み出し用 (B<O_RDONLY>) にオープンされたファイルがクローズされた。"
550 #: build/C/man7/fanotify.7:267
552 msgid "B<FAN_Q_OVERFLOW>"
553 msgstr "B<FAN_Q_OVERFLOW>"
556 #: build/C/man7/fanotify.7:274
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)."
562 "イベントキューが 16384 エントリーの上限を超過した。 この上限は "
563 "B<fanotify_init>(2) 呼び出し時に B<FAN_UNLIMITED_QUEUE> フラグを指定すること"
567 #: build/C/man7/fanotify.7:274 build/C/man2/fanotify_mark.2:159
569 msgid "B<FAN_ACCESS_PERM>"
570 msgstr "B<FAN_ACCESS_PERM>"
573 #: build/C/man7/fanotify.7:283
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."
580 "アプリケーションが例えば B<read>(2) や B<readdir>(2) などを使ってファイルや"
581 "ディレクトリを読み出そうとした。 このイベントを読み出したプログラムは、 その"
582 "ファイルシステムオブジェクトへのアクセス許可を承認するかを判定し (下記で説明"
583 "するとおり) 応答を書き込まなければならない。"
586 #: build/C/man7/fanotify.7:283 build/C/man2/fanotify_mark.2:151
588 msgid "B<FAN_OPEN_PERM>"
589 msgstr "B<FAN_OPEN_PERM>"
592 #: build/C/man7/fanotify.7:288
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."
598 "アプリケーションがファイルやディレクトリをオープンしようとした。 このイベント"
599 "を読み出したプログラムは、 そのファイルシステムオブジェクトのオープンを承認す"
600 "るかを判定し (下記で説明するとおり) 応答を書き込まなければならない。"
603 #: build/C/man7/fanotify.7:290
604 msgid "To check for any close event, the following bit mask may be used:"
605 msgstr "クローズイベントを確認するために以下のビットマスクを使うことができる。"
608 #: build/C/man7/fanotify.7:290 build/C/man2/fanotify_mark.2:186
611 msgstr "B<FAN_CLOSE>"
614 #: build/C/man7/fanotify.7:294
615 msgid "A file was closed. This is a synonym for:"
616 msgstr "ファイルがクローズされた。 以下の同義語である。"
619 #: build/C/man7/fanotify.7:296
621 msgid " FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE\n"
622 msgstr " FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE\n"
625 #: build/C/man7/fanotify.7:301
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 "
631 "fanotify ファイルディスクリプターからの B<read>(2) が返した fanotify イベント"
632 "メタデータを含むバッファーに対して繰り返しを行うため、 以下のマクロが提供され"
636 #: build/C/man7/fanotify.7:301
638 msgid "B<FAN_EVENT_OK(meta, len)>"
639 msgstr "B<FAN_EVENT_OK(meta, len)>"
642 #: build/C/man7/fanotify.7:310
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."
648 "このマクロは、 バッファー I<meta> の残りの長さ I<len> を、 メタデータ構造体の"
649 "長さとバッファーの最初のメタデータ構造体の I<event_len> フィールドと比較して"
653 #: build/C/man7/fanotify.7:310
655 msgid "B<FAN_EVENT_NEXT(meta, len)>"
656 msgstr "B<FAN_EVENT_NEXT(meta, len)>"
659 #: build/C/man7/fanotify.7:329
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>)."
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> を引き算する)。"
677 #: build/C/man7/fanotify.7:331
678 msgid "In addition, there is:"
679 msgstr "また、 以下のマクロも用意されている。"
682 #: build/C/man7/fanotify.7:331
684 msgid "B<FAN_EVENT_METADATA_LEN>"
685 msgstr "B<FAN_EVENT_METADATA_LEN>"
688 #: build/C/man7/fanotify.7:337
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."
694 "このマクロは I<fanotify_event_metadata> 構造体の (バイト単位の) サイズを返"
695 "す。 返される値はイベントメタデータの最小値である (現在のところ、これが唯一の"
699 #: build/C/man7/fanotify.7:337
701 msgid "Monitoring an fanotify file descriptor for events"
702 msgstr "fanotify ファイルディスクリプターのイベントを監視する"
705 #: build/C/man7/fanotify.7:344
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)."
710 "fanotify イベントが発生すると、 B<epoll>(7), B<poll>(2), B<select>(2) に "
711 "fanotify ファイルディスクリプターが渡された場合には、そのファイルディスクリプ"
712 "ターが読み出し可能であると通知される。"
715 #: build/C/man7/fanotify.7:344
717 msgid "Dealing with permission events"
718 msgstr "アクセス許可イベントの取り扱い"
721 #: build/C/man7/fanotify.7:349
723 "For permission events, the application must B<write>(2) a structure of the "
724 "following form to the fanotify file descriptor:"
726 "アクセス許可イベントでは、 アプリケーションは以下の形式の構造体を fanotify "
727 "ファイルディスクリプターに B<write>(2) しなければならない。"
730 #: build/C/man7/fanotify.7:356
733 "struct fanotify_response {\n"
738 "struct fanotify_response {\n"
744 #: build/C/man7/fanotify.7:360
745 msgid "The fields of this structure are as follows:"
746 msgstr "この構造体のフィールドは以下のとおりである。"
749 #: build/C/man7/fanotify.7:364
751 "This is the file descriptor from the structure I<fanotify_event_metadata>."
753 "このフィールドは I<fanotify_event_metadata> 構造体で返されたファイルディスク"
757 #: build/C/man7/fanotify.7:364
763 #: build/C/man7/fanotify.7:372
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."
769 "このフィールドはアクセス許可を承認するかどうかを示す。 値は、このファイル操作"
770 "を許可する B<FAN_ALLOW> か、 このファイル操作を拒否する B<FAN_DENY> のいずれ"
774 #: build/C/man7/fanotify.7:376
776 "If access is denied, the requesting application call will receive an "
779 "アクセスを拒否した場合、 アクセスを要求したアプリケーションは B<EPERM> エラー"
783 #: build/C/man7/fanotify.7:376
785 msgid "Closing the fanotify file descriptor"
786 msgstr "fanotify ファイルディスクリプターのクローズ"
789 #: build/C/man7/fanotify.7:384
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 "
796 "fanotify 通知グループを参照するすべてのファイルディスクリプターがクローズされ"
797 "ると、 fanotify グループは解放され、 カーネルが再利用できるようにそのリソース"
798 "は解放される。 B<close>(2) の際に、 処理中であったアクセス許可イベントには許"
802 #: build/C/man7/fanotify.7:384
804 msgid "/proc/[pid]/fdinfo"
805 msgstr "/proc/[pid]/fdinfo"
808 #: build/C/man7/fanotify.7:394
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."
814 "ファイル I</proc/[pid]/fdinfo/[fd]> には、 プロセス I<pid> のファイルディスク"
815 "リプター I<fd> の fanotify マークに関する情報が格納される。 詳細はカーネルの"
816 "ソースファイル I<Documentation/filesystems/proc.txt> を参照。"
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
827 #: build/C/man7/fanotify.7:399
829 "In addition to the usual errors for B<read>(2), the following errors can "
830 "occur when reading from the fanotify file descriptor:"
832 "通常の B<read>(2) のエラーに加え、 fanotify ファイルディスクリプターから読み"
833 "出しを行った際に以下のエラーが発生することがある。"
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
845 #: build/C/man7/fanotify.7:402
846 msgid "The buffer is too small to hold the event."
847 msgstr "バッファーがイベントを保持するには小さすぎる。"
850 #: build/C/man7/fanotify.7:402 build/C/man2/fanotify_init.2:216
851 #: build/C/man2/inotify_init.2:85
857 #: build/C/man7/fanotify.7:409
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)."
862 "オープンしたファイル数のプロセス毎の上限に達した。 B<getrlimit>(2) の "
863 "B<RLIMIT_NOFILE> の説明を参照。"
866 #: build/C/man7/fanotify.7:409 build/C/man2/inotify_init.2:88
872 #: build/C/man7/fanotify.7:416
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)."
877 "オープンされたファイル数のシステム全体の上限に達した。 B<proc>(5) の I</proc/"
878 "sys/fs/file-max> を参照。"
881 #: build/C/man7/fanotify.7:416
887 #: build/C/man7/fanotify.7:429
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."
893 "B<fanotify_init>(2) の呼び出し時に B<O_RDWR> か B<O_WRONLY> が "
894 "I<event_f_flags> 引き数に指定されており、 現在実行中の監視対象のファイルに対"
895 "してイベントが発生した際に、 このエラーが B<read>(2) から返される。"
898 #: build/C/man7/fanotify.7:433
900 "In addition to the usual errors for B<write>(2), the following errors can "
901 "occur when writing to the fanotify file descriptor:"
903 "通常の B<write>(2) のエラーに加え、 fanotify ファイルディスクリプターに書き込"
904 "みを行った際に以下のエラーが発生することがある。"
907 #: build/C/man7/fanotify.7:439
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."
912 "fanotify アクセス許可がカーネルの設定で有効になっていない。 応答構造体の "
913 "I<response> 値が無効である。"
916 #: build/C/man7/fanotify.7:439 build/C/man2/fanotify_mark.2:265
917 #: build/C/man2/inotify_add_watch.2:104
923 #: build/C/man7/fanotify.7:446
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."
928 "応答構造体のファイルディスクリプター I<fd> が無効である。 このエラーはアクセ"
929 "ス許可イベントに対する応答がすでに書き込まれている際に発生する。"
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
941 #: build/C/man7/fanotify.7:450
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."
946 "fanotify API は Linux カーネルのバージョン 2.6.36 で導入され、 バージョン "
947 "2.6.37 で有効にされた。 fdinfo のサポートはバージョン 3.8 で追加された。"
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
955 msgid "CONFORMING TO"
959 #: build/C/man7/fanotify.7:452
960 msgid "The fanotify API is Linux-specific."
961 msgstr "fanotify API は Linux 独自のものである。"
964 #: build/C/man7/fanotify.7:452 build/C/man7/inotify.7:563
970 #: build/C/man7/fanotify.7:459
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."
977 "fanotify API が利用できるのは、 カーネルが B<CONFIG_FANOTIFY> 設定オプション"
978 "を有効にして作成されている場合だけである。 また、 fanotify アクセス許可の処理"
979 "が利用できるのは B<CONFIG_FANOTIFY_ACCESS_PERMISSIONS> 設定オプションが有効に"
983 #: build/C/man7/fanotify.7:459 build/C/man7/inotify.7:624
985 msgid "Limitations and caveats"
989 #: build/C/man7/fanotify.7:464
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."
995 "fanotify が報告するのはユーザー空間プログラムがファイルシステム API 経由で"
996 "行ったイベントだけである。 その結果、 fanotify ではネットワークファイルシステ"
997 "ム上で発生したリモートイベントは捕捉できない。"
1000 #: build/C/man7/fanotify.7:471
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)."
1005 "inotify API は B<mmap>(2), B<msync>(2), B<munmap>(2) により起こったファイルの"
1009 #: build/C/man7/fanotify.7:476
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."
1015 "ディレクトリのイベントは、ディレクトリ自身がオープン、読み出し、クローズされ"
1016 "た場合にしか作成されない。 マークされたディレクトリでの子要素の追加、削除、変"
1017 "更では、監視対象のディレクトリ自身へのイベントは作成されない。"
1020 #: build/C/man7/fanotify.7:484
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 "
1029 "fanotify のディレクトリの監視は再帰的ではない。 ディレクトリ内のサブディレク"
1030 "トリを監視するには、 追加で監視用のマークを作成しなければならない。 (ただ"
1031 "し、 fanotify API では、サブディレクトリが監視対象としてマークされているディ"
1032 "レクトリに作成された際に検出する手段は提供されていない点に注意すること。) マ"
1033 "ウントの監視を使うことで、 ディレクトリツリー全体を監視することができる。"
1036 #: build/C/man7/fanotify.7:487
1037 msgid "The event queue can overflow. In this case, events are lost."
1039 "ベントキューはオーバーフローすることがある。 この場合、 イベントは失われる。"
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
1049 #: build/C/man7/fanotify.7:490
1050 msgid "As of Linux 3.17, the following bugs exist:"
1051 msgstr "Linux 3.17 時点では、 以下のバグが存在する。"
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
1070 #: build/C/man7/fanotify.7:499
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."
1078 "Linux では、ファイルシステムオブジェクトは複数のパスでアクセス可能である。 例"
1079 "えば、 ファイルシステムの一部は B<mount>(8) の I<--bind> オプションを使って再"
1080 "マウントされることがある。 マークされたマウントの監視者は、 同じマウントを"
1081 "使ったファイルオブジェクトについてのみイベント通知を受ける。 それ以外のイベン"
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 イベントが作成されない。"
1089 #. FIXME . A patch was proposed.
1091 #: build/C/man7/fanotify.7:512
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 "
1099 "イベントが生成された際に、 そのファイルのファイルディスクリプターを渡す前"
1100 "に、 イベントを受信するプロセスのユーザー ID がそのファイルに対する読み出し/"
1101 "書き込み許可があるかの確認は行われない。 非特権ユーザーによって実行されたプロ"
1102 "グラムに B<CAP_SYS_ADMIN> ケーパビリティーがセットされている場合には、 このこ"
1106 #: build/C/man7/fanotify.7:522
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."
1114 "B<read>(2) の呼び出しが fanotify キューから複数のイベントを処理している際"
1115 "に、 エラーが発生した場合、 返り値はエラーが発生する前までにユーザー空間バッ"
1116 "ファーに正常にコピーされたイベントの合計長となる。 返り値は -1 にならず、 "
1117 "I<errno> もセットされない。 したがって、 読み出しを行うアプリケーションではエ"
1121 #: build/C/man7/fanotify.7:522 build/C/man7/inotify.7:815
1127 #: build/C/man7/fanotify.7:532
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."
1134 "以下のプログラムは fanotify API の使用法を示すものである。 コマンドライン引き"
1135 "数で渡されたマウントポイントを監視し、 種別が B<FAN_PERM_OPEN> と "
1136 "B<FAN_CLOSE_WRITE> のイベントを待つ。 アクセス許可イベントが発生には、 "
1137 "B<FAN_ALLOW> 応答を返す。"
1140 #: build/C/man7/fanotify.7:542
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."
1147 "以下の出力例はファイル I</home/user/temp/notes> を編集した際に記録されたもの"
1148 "である。 ファイルをオープンする前に B<FAN_OPEN_PERM> イベントが発生してい"
1149 "る。 ファイルをクローズした後に B<FAN_CLOSE_WRITE> イベントが発生している。 "
1150 "エンターキーをユーザーが押すと、 このプログラムの実行は終了する。"
1153 #: build/C/man7/fanotify.7:542 build/C/man7/inotify.7:838
1155 msgid "Example output"
1159 #: build/C/man7/fanotify.7:550
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"
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"
1175 #: build/C/man7/fanotify.7:552 build/C/man7/inotify.7:850
1177 msgid "Listening for events stopped.\n"
1178 msgstr "Listening for events stopped.\n"
1181 #: build/C/man7/fanotify.7:554 build/C/man7/inotify.7:852
1183 msgid "Program source"
1187 #: build/C/man7/fanotify.7:565
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"
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"
1211 #: build/C/man7/fanotify.7:567
1213 msgid "/* Read all available fanotify events from the file descriptor 'fd' */\n"
1214 msgstr "/* ファイルディスクリプター 'fd' から読み出しできる全 fanotify イベントを読み出す */\n"
1217 #: build/C/man7/fanotify.7:578
1221 "handle_events(int fd)\n"
1223 " const struct fanotify_event_metadata *metadata;\n"
1224 " struct fanotify_event_metadata buf[200];\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"
1232 "handle_events(int fd)\n"
1234 " const struct fanotify_event_metadata *metadata;\n"
1235 " struct fanotify_event_metadata buf[200];\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"
1243 #: build/C/man7/fanotify.7:580
1245 msgid " /* Loop while events can be read from fanotify file descriptor */\n"
1246 msgstr " /* fanotify ファイルディスクリプターからイベントが読み出せる間はループする */\n"
1249 #: build/C/man7/fanotify.7:582
1251 msgid " for(;;) {\n"
1252 msgstr " for(;;) {\n"
1255 #: build/C/man7/fanotify.7:584
1257 msgid " /* Read some events */\n"
1258 msgstr " /* イベントを読み出す */\n"
1261 #: build/C/man7/fanotify.7:590
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"
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"
1277 #: build/C/man7/fanotify.7:592
1279 msgid " /* Check if end of available data reached */\n"
1280 msgstr " /* 読み出せるデータの最後に達しているかチェックする */\n"
1283 #: build/C/man7/fanotify.7:595 build/C/man7/inotify.7:901
1286 " if (len E<lt>= 0)\n"
1289 " if (len E<lt>= 0)\n"
1293 #: build/C/man7/fanotify.7:597
1295 msgid " /* Point to the first event in the buffer */\n"
1296 msgstr " /* バッファーの最初のイベントを参照する */\n"
1299 #: build/C/man7/fanotify.7:599
1301 msgid " metadata = buf;\n"
1302 msgstr " metadata = buf;\n"
1305 #: build/C/man7/fanotify.7:601 build/C/man7/inotify.7:903
1307 msgid " /* Loop over all events in the buffer */\n"
1308 msgstr " /* バッファー内の全イベントを処理する */\n"
1311 #: build/C/man7/fanotify.7:603
1313 msgid " while (FAN_EVENT_OK(metadata, len)) {\n"
1314 msgstr " while (FAN_EVENT_OK(metadata, len)) {\n"
1317 #: build/C/man7/fanotify.7:605
1319 msgid " /* Check that run-time and compile-time structures match */\n"
1320 msgstr " /* 実行時とコンパイル時の構造体が一致するか確認する */\n"
1323 #: build/C/man7/fanotify.7:611
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"
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"
1339 #: build/C/man7/fanotify.7:615
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"
1346 " /* metadata-E<gt>fd には、キューのオーバーフローを示す FAN_NOFD か、\n"
1347 " ファイルディスクリプター (負でない整数) のいずれかが入っている。\n"
1348 " ここではキューのオーバーフローは無視している。 */\n"
1351 #: build/C/man7/fanotify.7:617
1353 msgid " if (metadata-E<gt>fd E<gt>= 0) {\n"
1354 msgstr " if (metadata-E<gt>fd E<gt>= 0) {\n"
1357 #: build/C/man7/fanotify.7:619
1359 msgid " /* Handle open permission event */\n"
1360 msgstr " /* オープン許可イベントを処理する */\n"
1363 #: build/C/man7/fanotify.7:622
1366 " if (metadata-E<gt>mask & FAN_OPEN_PERM) {\n"
1367 " printf(\"FAN_OPEN_PERM: \");\n"
1369 " if (metadata-E<gt>mask & FAN_OPEN_PERM) {\n"
1370 " printf(\"FAN_OPEN_PERM: \");\n"
1373 #: build/C/man7/fanotify.7:624
1375 msgid " /* Allow file to be opened */\n"
1376 msgstr " /* ファイルのオープンを許可する */\n"
1379 #: build/C/man7/fanotify.7:630
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"
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"
1395 #: build/C/man7/fanotify.7:632
1397 msgid " /* Handle closing of writable file event */\n"
1398 msgstr " /* 書き込み可能ファイルのクローズイベントを処理する */\n"
1401 #: build/C/man7/fanotify.7:635
1404 " if (metadata-E<gt>mask & FAN_CLOSE_WRITE)\n"
1405 " printf(\"FAN_CLOSE_WRITE: \");\n"
1407 " if (metadata-E<gt>mask & FAN_CLOSE_WRITE)\n"
1408 " printf(\"FAN_CLOSE_WRITE: \");\n"
1411 #: build/C/man7/fanotify.7:637
1413 msgid " /* Retrieve and print pathname of the accessed file */\n"
1414 msgstr " /* アクセスされたファイルのパス名を取得し表示する */\n"
1417 #: build/C/man7/fanotify.7:646
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"
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"
1439 #: build/C/man7/fanotify.7:649
1442 " path[path_len] = '\\e0';\n"
1443 " printf(\"File %s\\en\", path);\n"
1445 " path[path_len] = '\\e0';\n"
1446 " printf(\"File %s\\en\", path);\n"
1449 #: build/C/man7/fanotify.7:651
1451 msgid " /* Close the file descriptor of the event */\n"
1452 msgstr " /* イベントのファイルディスクリプターをクローズする */\n"
1455 #: build/C/man7/fanotify.7:654
1458 " close(metadata-E<gt>fd);\n"
1461 " close(metadata-E<gt>fd);\n"
1465 #: build/C/man7/fanotify.7:656
1467 msgid " /* Advance to next event */\n"
1468 msgstr " /* 次のイベントに進む */\n"
1471 #: build/C/man7/fanotify.7:661
1474 " metadata = FAN_EVENT_NEXT(metadata, len);\n"
1479 " metadata = FAN_EVENT_NEXT(metadata, len);\n"
1485 #: build/C/man7/fanotify.7:669
1489 "main(int argc, char *argv[])\n"
1492 " int fd, poll_num;\n"
1494 " struct pollfd fds[2];\n"
1497 "main(int argc, char *argv[])\n"
1500 " int fd, poll_num;\n"
1502 " struct pollfd fds[2];\n"
1505 #: build/C/man7/fanotify.7:671
1507 msgid " /* Check mount point is supplied */\n"
1508 msgstr " /* マウントポイントが指定されたか確認する */\n"
1511 #: build/C/man7/fanotify.7:676
1514 " if (argc != 2) {\n"
1515 " fprintf(stderr, \"Usage: %s MOUNT\\en\", argv[0]);\n"
1516 " exit(EXIT_FAILURE);\n"
1519 " if (argc != 2) {\n"
1520 " fprintf(stderr, \"Usage: %s MOUNT\\en\", argv[0]);\n"
1521 " exit(EXIT_FAILURE);\n"
1525 #: build/C/man7/fanotify.7:678
1527 msgid " printf(\"Press enter key to terminate.\\en\");\n"
1528 msgstr " printf(\"Press enter key to terminate.\\en\");\n"
1531 #: build/C/man7/fanotify.7:680
1533 msgid " /* Create the file descriptor for accessing the fanotify API */\n"
1534 msgstr " /* fanotify API にアクセスするためのファイルディスクリプターを作成する */\n"
1537 #: build/C/man7/fanotify.7:687
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"
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"
1555 #: build/C/man7/fanotify.7:692
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"
1563 " /* 指定されたマウントに対して以下を監視するようにマークを付ける:\n"
1564 " - ファイルのオープン前のアクセス許可イベント\n"
1565 " - 書き込み可能なファイルディスクリプターのクローズ後の\n"
1569 #: build/C/man7/fanotify.7:699
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"
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"
1587 #: build/C/man7/fanotify.7:701 build/C/man7/inotify.7:989
1589 msgid " /* Prepare for polling */\n"
1590 msgstr " /* ポーリングの準備 */\n"
1593 #: build/C/man7/fanotify.7:703 build/C/man7/inotify.7:991
1595 msgid " nfds = 2;\n"
1596 msgstr " nfds = 2;\n"
1599 #: build/C/man7/fanotify.7:705 build/C/man7/inotify.7:993
1601 msgid " /* Console input */\n"
1602 msgstr " /* コンソールの入力 */\n"
1605 #: build/C/man7/fanotify.7:708 build/C/man7/inotify.7:996
1608 " fds[0].fd = STDIN_FILENO;\n"
1609 " fds[0].events = POLLIN;\n"
1611 " fds[0].fd = STDIN_FILENO;\n"
1612 " fds[0].events = POLLIN;\n"
1615 #: build/C/man7/fanotify.7:710
1617 msgid " /* Fanotify input */\n"
1618 msgstr " /* fanotify の入力 */\n"
1621 #: build/C/man7/fanotify.7:713 build/C/man7/inotify.7:1001
1624 " fds[1].fd = fd;\n"
1625 " fds[1].events = POLLIN;\n"
1627 " fds[1].fd = fd;\n"
1628 " fds[1].events = POLLIN;\n"
1631 #: build/C/man7/fanotify.7:715
1633 msgid " /* This is the loop to wait for incoming events */\n"
1634 msgstr " /* イベントの発生を待つループ */\n"
1637 #: build/C/man7/fanotify.7:717
1639 msgid " printf(\"Listening for events.\\en\");\n"
1640 msgstr " printf(\"Listening for events.\\en\");\n"
1643 #: build/C/man7/fanotify.7:723
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"
1653 " poll_num = poll(fds, nfds, -1);\n"
1654 " if (poll_num == -1) {\n"
1655 " if (errno == EINTR) /* シグナルに割り込まれた場合 */\n"
1656 " continue; /* poll() を再開する */\n"
1659 #: build/C/man7/fanotify.7:727
1662 " perror(\"poll\"); /* Unexpected error */\n"
1663 " exit(EXIT_FAILURE);\n"
1666 " perror(\"poll\"); /* 予期しないエラー */\n"
1667 " exit(EXIT_FAILURE);\n"
1671 #: build/C/man7/fanotify.7:730
1674 " if (poll_num E<gt> 0) {\n"
1675 " if (fds[0].revents & POLLIN) {\n"
1677 " if (poll_num E<gt> 0) {\n"
1678 " if (fds[0].revents & POLLIN) {\n"
1681 #: build/C/man7/fanotify.7:732
1683 msgid " /* Console input is available: empty stdin and quit */\n"
1684 msgstr " /* コンソールからの入力がある場合: 空の標準入力であれば終了 */\n"
1687 #: build/C/man7/fanotify.7:737 build/C/man7/inotify.7:1024
1690 " while (read(STDIN_FILENO, &buf, 1) E<gt> 0 && buf != '\\en')\n"
1695 " while (read(STDIN_FILENO, &buf, 1) E<gt> 0 && buf != '\\en')\n"
1701 #: build/C/man7/fanotify.7:739 build/C/man7/inotify.7:1026
1703 msgid " if (fds[1].revents & POLLIN) {\n"
1704 msgstr " if (fds[1].revents & POLLIN) {\n"
1707 #: build/C/man7/fanotify.7:741
1709 msgid " /* Fanotify events are available */\n"
1710 msgstr " /* fanotify イベントがある場合 */\n"
1713 #: build/C/man7/fanotify.7:746
1716 " handle_events(fd);\n"
1721 " handle_events(fd);\n"
1727 #: build/C/man7/fanotify.7:750
1730 " printf(\"Listening for events stopped.\\en\");\n"
1731 " exit(EXIT_SUCCESS);\n"
1734 " printf(\"Listening for events stopped.\\en\");\n"
1735 " exit(EXIT_SUCCESS);\n"
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
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)"
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
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
1767 "This page is part of release 3.77 of the Linux I<man-pages> project. A "
1768 "description of the project, information about reporting bugs, and the latest "
1769 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
1772 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.77 の一部\n"
1773 "である。プロジェクトの説明とバグ報告に関する情報は\n"
1774 "http://www.kernel.org/doc/man-pages/ に書かれている。"
1777 #: build/C/man2/fanotify_init.2:24
1779 msgid "FANOTIFY_INIT"
1780 msgstr "FANOTIFY_INIT"
1783 #: build/C/man2/fanotify_init.2:24 build/C/man2/fanotify_mark.2:24
1789 #: build/C/man2/fanotify_init.2:27
1790 msgid "fanotify_init - create and initialize fanotify group"
1791 msgstr "fanotify_init - fanotify グループを作成し、初期化する"
1794 #: build/C/man2/fanotify_init.2:27 build/C/man2/fanotify_mark.2:28
1795 #: build/C/man2/inotify_add_watch.2:31 build/C/man2/inotify_init.2:32
1796 #: build/C/man2/inotify_rm_watch.2:30
1802 #: build/C/man2/fanotify_init.2:29
1803 msgid "B<#include E<lt>fcntl.hE<gt>>"
1804 msgstr "B<#include E<lt>fcntl.hE<gt>>"
1807 #: build/C/man2/fanotify_init.2:31
1808 msgid "B<#include E<lt>sys/fanotify.hE<gt>>"
1809 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>"
1812 #: build/C/man2/fanotify_init.2:33
1814 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1815 ">I<event_f_flags>B<);>"
1817 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1818 ">I<event_f_flags>B<);>"
1821 #: build/C/man2/fanotify_init.2:36 build/C/man2/fanotify_mark.2:39
1822 msgid "For an overview of the fanotify API, see B<fanotify>(7)."
1823 msgstr "fanotify API の概要については B<fanotify>(7) を参照。"
1826 #: build/C/man2/fanotify_init.2:40
1828 "B<fanotify_init>() initializes a new fanotify group and returns a file "
1829 "descriptor for the event queue associated with the group."
1831 "B<fanotify_init>() は新しい fanotify グループを初期化し、 このグループに関連"
1832 "付けられたイベントキューに対するファイルディスクリプターを返す。"
1835 #: build/C/man2/fanotify_init.2:51
1837 "The file descriptor is used in calls to B<fanotify_mark>(2) to specify the "
1838 "files, directories, and mounts for which fanotify events shall be created. "
1839 "These events are received by reading from the file descriptor. Some events "
1840 "are only informative, indicating that a file has been accessed. Other "
1841 "events can be used to determine whether another application is permitted to "
1842 "access a file or directory. Permission to access filesystem objects is "
1843 "granted by writing to the file descriptor."
1845 "このファイルディスクリプターは、 B<fanotify_mark>(2) の呼び出しで fanotify イ"
1846 "ベントが作成されるファイル、 ディレクトリ、 マウントを指定するのに使用でき"
1847 "る。 B<fanotify_mark>(2) で指定したファイル、 これらのイベントは、 このファイ"
1848 "ルディスクリプターからの読み出しで受信する。 いくつかのイベントは、 ファイル"
1849 "がアクセスされたことを示す単なる情報である。 他のいくつかのイベントは、 別の"
1850 "アプリケーションがファイルやディレクトリにアクセスする許可を与えるかを判定す"
1851 "るのに使用される。 ファイルシステムオブジェクトへのアクセス許可イベントについ"
1852 "ては、 承認結果をこのファイルディスクリプターに書き込む。"
1855 #: build/C/man2/fanotify_init.2:54
1857 "Multiple programs may be using the fanotify interface at the same time to "
1858 "monitor the same files."
1860 "複数のプログラムが同時に fanotify インターフェースを使って同じファイルを同時"
1864 #: build/C/man2/fanotify_init.2:58
1866 "In the current implementation, the number of fanotify groups per user is "
1867 "limited to 128. This limit cannot be overridden."
1869 "現在の実装では、 ユーザーあたりの fanotify グループ数は 128 に制限されてい"
1870 "る。 この制限は上書きすることができない。"
1873 #: build/C/man2/fanotify_init.2:67
1875 "Calling B<fanotify_init>() requires the B<CAP_SYS_ADMIN> capability. This "
1876 "constraint might be relaxed in future versions of the API. Therefore, "
1877 "certain additional capability checks have been implemented as indicated "
1880 "B<fanotify_init>() を呼び出すには B<CAP_SYS_ADMIN> ケーパビリティーが必要であ"
1881 "る。 この制約は将来のバージョンの API で緩和される可能性がある。 そのため、 "
1882 "以下に示すケーパビリティーチェックのいくつかが実装されている。"
1885 #: build/C/man2/fanotify_init.2:73
1887 "The I<flags> argument contains a multi-bit field defining the notification "
1888 "class of the listening application and further single bit fields specifying "
1889 "the behavior of the file descriptor."
1891 "I<flags> 引き数は、 イベントを待つアプリケーションの通知クラスを定義する複数"
1892 "ビットのフィールドである。 これに加えて、 このファイルディスクリプターの動作"
1893 "を示す 1 ビットのフィールドがある。"
1896 #: build/C/man2/fanotify_init.2:77
1898 "If multiple listeners for permission events exist, the notification class is "
1899 "used to establish the sequence in which the listeners receive the events."
1901 "アクセス許可イベントを監視しているプログラムが複数いる場合、 通知クラスを使っ"
1902 "て監視するプログラムのイベント受信順序が管理される。"
1905 #: build/C/man2/fanotify_init.2:80
1907 "Only one of the following notification classes may be specified in I<flags>:"
1908 msgstr "以下の通知クラスのいずれか一つだけを I<flags> に指定できる。"
1911 #: build/C/man2/fanotify_init.2:80
1913 msgid "B<FAN_CLASS_PRE_CONTENT>"
1914 msgstr "B<FAN_CLASS_PRE_CONTENT>"
1917 #: build/C/man2/fanotify_init.2:88
1919 "This value allows the receipt of events notifying that a file has been "
1920 "accessed and events for permission decisions if a file may be accessed. It "
1921 "is intended for event listeners that need to access files before they "
1922 "contain their final data. This notification class might be used by "
1923 "hierarchical storage managers, for example."
1925 "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのア"
1926 "クセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント"
1927 "受信者がファイルが最終的なデータを格納する前にそのファイルにアクセスする必要"
1928 "がある場合に使用される。 この通知クラスは例えば階層型ストレージ管理などで使用"
1932 #: build/C/man2/fanotify_init.2:88
1934 msgid "B<FAN_CLASS_CONTENT>"
1935 msgstr "B<FAN_CLASS_CONTENT>"
1938 #: build/C/man2/fanotify_init.2:96
1940 "This value allows the receipt of events notifying that a file has been "
1941 "accessed and events for permission decisions if a file may be accessed. It "
1942 "is intended for event listeners that need to access files when they already "
1943 "contain their final content. This notification class might be used by "
1944 "malware detection programs, for example."
1946 "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのア"
1947 "クセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント"
1948 "受信者がファイルに最終的なデータが格納された際にそのファイルにアクセスする必"
1949 "要がある場合に使用される。 この通知クラスは例えばウイルス検知プログラムなどで"
1953 #: build/C/man2/fanotify_init.2:96
1955 msgid "B<FAN_CLASS_NOTIF>"
1956 msgstr "B<FAN_CLASS_NOTIF>"
1959 #: build/C/man2/fanotify_init.2:103
1961 "This is the default value. It does not need to be specified. This value "
1962 "only allows the receipt of events notifying that a file has been accessed. "
1963 "Permission decisions before the file is accessed are not possible."
1965 "これはデフォルト値である。 この値を指定する必要はない。 この値は、 ファイルが"
1966 "アクセスされたことを通知するイベントの受信だけを行うことを意味する。 ファイル"
1967 "がアクセスする前にアクセス許可の判定を行うことはできない。"
1970 #: build/C/man2/fanotify_init.2:111
1972 "Listeners with different notification classes will receive events in the "
1973 "order B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, B<FAN_CLASS_NOTIF>. "
1974 "The order of notification for listeners in the same notification class is "
1977 "異なる通知クラスの受信者は B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, "
1978 "B<FAN_CLASS_NOTIF> の順序でイベントを受信する。 同じ通知クラスの受信者での通"
1982 #: build/C/man2/fanotify_init.2:114
1983 msgid "The following bits can additionally be set in I<flags>:"
1984 msgstr "I<flags> には以下のビットを追加でセットすることができる。"
1987 #: build/C/man2/fanotify_init.2:114
1989 msgid "B<FAN_CLOEXEC>"
1990 msgstr "B<FAN_CLOEXEC>"
1993 #: build/C/man2/fanotify_init.2:123
1995 "Set the close-on-exec flag (B<FD_CLOEXEC>) on the new file descriptor. See "
1996 "the description of the B<O_CLOEXEC> flag in B<open>(2)."
1998 "close-on-exec フラグ (B<FD_CLOEXEC>) を新しいファイルディスクリプターにセット"
1999 "する。 B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
2002 #: build/C/man2/fanotify_init.2:123
2004 msgid "B<FAN_NONBLOCK>"
2005 msgstr "B<FAN_NONBLOCK>"
2008 #: build/C/man2/fanotify_init.2:133
2010 "Enable the nonblocking flag (B<O_NONBLOCK>) for the file descriptor. "
2011 "Reading from the file descriptor will not block. Instead, if no data is "
2012 "available, B<read>(2) will fail with the error B<EAGAIN>."
2014 "ノンブロッキングフラグ (B<O_NONBLOCK>) をそのファイルディスクリプターで有効に"
2015 "する。 このファイルディスクリプターからの読み出しは停止しない。 その代わり、 "
2016 "読みだし可能なデータが何もない場合、 B<read>(2) はエラー B<EAGAIN> で失敗す"
2020 #: build/C/man2/fanotify_init.2:133
2022 msgid "B<FAN_UNLIMITED_QUEUE>"
2023 msgstr "B<FAN_UNLIMITED_QUEUE>"
2026 #: build/C/man2/fanotify_init.2:139
2028 "Remove the limit of 16384 events for the event queue. Use of this flag "
2029 "requires the B<CAP_SYS_ADMIN> capability."
2031 "そのイベントキューの 16384 イベントの上限を削除する。 このフラグを使用するに"
2032 "は B<CAP_SYS_ADMIN> ケーパビリティーが必要である。"
2035 #: build/C/man2/fanotify_init.2:139
2037 msgid "B<FAN_UNLIMITED_MARKS>"
2038 msgstr "B<FAN_UNLIMITED_MARKS>"
2041 #: build/C/man2/fanotify_init.2:145
2043 "Remove the limit of 8192 marks. Use of this flag requires the "
2044 "B<CAP_SYS_ADMIN> capability."
2046 "8192 マークの上限を削除する。 このフラグを使用するには B<CAP_SYS_ADMIN> ケー"
2050 #: build/C/man2/fanotify_init.2:158
2052 "The I<event_f_flags> argument defines the file status flags that will be set "
2053 "on the open file descriptions that are created for fanotify events. For "
2054 "details of these flags, see the description of the I<flags> values in "
2055 "B<open>(2). I<event_f_flags> includes a multi-bit field for the access "
2056 "mode. This field can take the following values:"
2058 "I<event_f_flags> 引き数は fanotify イベントが作成されるオープンファイル記述に"
2059 "セットされるファイル状態フラグを定義する。 これらのフラグの詳細については "
2060 "B<open>(2) の I<flags> 値の説明を参照のこと。 I<event_f_flags> にはアクセス"
2061 "モードのビットを複数入れることができる。 このフィールドには以下の値も指定する"
2065 #: build/C/man2/fanotify_init.2:158
2068 msgstr "B<O_RDONLY>"
2071 #: build/C/man2/fanotify_init.2:161
2072 msgid "This value allows only read access."
2073 msgstr "読み出しアクセスのみを許可する。"
2076 #: build/C/man2/fanotify_init.2:161
2079 msgstr "B<O_WRONLY>"
2082 #: build/C/man2/fanotify_init.2:164
2083 msgid "This value allows only write access."
2084 msgstr "書き込みアクセスのみを許可する。"
2087 #: build/C/man2/fanotify_init.2:164
2093 #: build/C/man2/fanotify_init.2:167
2094 msgid "This value allows read and write access."
2095 msgstr "読み出しと書き込みの両方を許可する。"
2098 #: build/C/man2/fanotify_init.2:171
2100 "Additional bits can be set in I<event_f_flags>. The most useful values are:"
2102 "他のビットも I<event_f_flags> もセットすることができる。 役立つであろう値は以"
2106 #: build/C/man2/fanotify_init.2:171
2108 msgid "B<O_LARGEFILE>"
2109 msgstr "B<O_LARGEFILE>"
2112 #: build/C/man2/fanotify_init.2:178
2114 "Enable support for files exceeding 2 GB. Failing to set this flag will "
2115 "result in an B<EOVERFLOW> error when trying to open a large file which is "
2116 "monitored by an fanotify group on a 32-bit system."
2118 "2 GB を超えるファイルのサポートを有効にする。 このフラグのセットに失敗する"
2119 "と、 32 ビットシステムで fanotify グループが監視するラージファイルをオープン"
2120 "しようとした際に B<EOVERFLOW> エラーとなる。"
2123 #: build/C/man2/fanotify_init.2:178
2125 msgid "B<O_CLOEXEC>"
2126 msgstr "B<O_CLOEXEC>"
2129 #: build/C/man2/fanotify_init.2:186
2131 "Enable the close-on-exec flag for the file descriptor. See the description "
2132 "of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this may be useful."
2134 "このファイルディスクリプターで close-on-exec フラグを有効にする。 このフラグ"
2135 "が役立つ理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
2138 #: build/C/man2/fanotify_init.2:199
2140 "The following are also allowable: B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, "
2141 "B<O_NONBLOCK>, and B<O_SYNC>. Specifying any other flag in I<event_f_flags> "
2142 "yields the error B<EINVAL> (but see BUGS)."
2144 "B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, B<O_NONBLOCK>, B<O_SYNC> も指定するこ"
2145 "とができる。 I<event_f_flags> にこれ以外のフラグを指定すると、 エラー "
2146 "B<EINVAL> が起こる (ただし、バグを参照)。"
2149 #: build/C/man2/fanotify_init.2:199 build/C/man2/fanotify_mark.2:236
2150 #: build/C/man2/inotify_add_watch.2:77 build/C/man2/inotify_init.2:74
2151 #: build/C/man2/inotify_rm_watch.2:48
2153 msgid "RETURN VALUE"
2157 #: build/C/man2/fanotify_init.2:206
2159 "On success, B<fanotify_init>() returns a new file descriptor. On error, -1 "
2160 "is returned, and I<errno> is set to indicate the error."
2162 "成功すると B<fanotify_init>() は新しいファイルディスクリプターを返す。 エラー"
2163 "の場合、 -1 を返し、 I<errno> にエラーを示す値を設定する。"
2166 #: build/C/man2/fanotify_init.2:216
2168 "An invalid value was passed in I<flags> or I<event_f_flags>. "
2169 "B<FAN_ALL_INIT_FLAGS> defines all allowable bits for I<flags>."
2171 "I<flags> か I<event_f_flags> に無効な値が渡された。 B<FAN_ALL_INIT_FLAGS> で "
2172 "I<flags> に指定できる全ビットが定義されている。"
2175 #: build/C/man2/fanotify_init.2:219
2176 msgid "The number of fanotify groups for this user exceeds 128."
2177 msgstr "このユーザーの fanotify グループ数が 128 を超過した。"
2180 #: build/C/man2/fanotify_init.2:219 build/C/man2/fanotify_mark.2:274
2181 #: build/C/man2/inotify_add_watch.2:109 build/C/man2/inotify_init.2:91
2187 #: build/C/man2/fanotify_init.2:222
2188 msgid "The allocation of memory for the notification group failed."
2189 msgstr "通知グループへのメモリー割り当てが失敗した。"
2192 #: build/C/man2/fanotify_init.2:222 build/C/man2/fanotify_mark.2:283
2198 #: build/C/man2/fanotify_init.2:228
2200 "This kernel does not implement B<fanotify_init>(). The fanotify API is "
2201 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
2203 "このカーネルは B<fanotify_init>() を実装していない。 fanotify API が利用でき"
2204 "るのは、 カーネルが B<CONFIG_FANOTIFY> を有効にして作成されている場合だけであ"
2208 #: build/C/man2/fanotify_init.2:228
2214 #: build/C/man2/fanotify_init.2:233
2216 "The operation is not permitted because the caller lacks the B<CAP_SYS_ADMIN> "
2219 "呼び出し元が B<CAP_SYS_ADMIN> ケーパビリティーを持っていないので、操作が許可"
2223 #: build/C/man2/fanotify_init.2:237
2225 "B<fanotify_init>() was introduced in version 2.6.36 of the Linux kernel and "
2226 "enabled in version 2.6.37."
2228 "B<fanotify_init>() は Linux カーネルのバージョン 2.6.36 で導入され、 バージョ"
2232 #: build/C/man2/fanotify_init.2:239 build/C/man2/fanotify_mark.2:305
2233 #: build/C/man2/inotify_add_watch.2:120 build/C/man2/inotify_rm_watch.2:71
2234 msgid "This system call is Linux-specific."
2235 msgstr "このシステムコールは Linux 独自である。"
2238 #: build/C/man2/fanotify_init.2:242
2239 msgid "As of Linux 3.17, the following bug exists:"
2240 msgstr "Linux 3.17 時点では、 以下のバグが存在する。"
2242 #. FIXME . Patch proposed: https://lkml.org/lkml/2014/9/24/967
2244 #: build/C/man2/fanotify_init.2:248
2245 msgid "The B<O_CLOEXEC> is ignored when passed in I<event_f_flags>."
2246 msgstr "B<O_CLOEXEC> が I<event_f_flags> に指定された場合、 無視される。"
2249 #: build/C/man2/fanotify_init.2:250
2250 msgid "The following bug was present in Linux kernels before version 3.14:"
2251 msgstr "バージョン 3.14 より前の Linux カーネルには以下のバグが存在する。"
2253 #. Fixed by commit 48149e9d3a7e924010a0daab30a6197b7d7b6580
2255 #: build/C/man2/fanotify_init.2:260
2257 "The I<event_f_flags> argument is not checked for invalid flags. Flags that "
2258 "are intended only for internal use, such as B<FMODE_EXEC>, can be set, and "
2259 "will consequently be set for the file descriptors returned when reading from "
2260 "the fanotify file descriptor."
2262 "I<event_f_flags> 引き数に無効なフラグがないかのチェックが行われない。 "
2263 "B<FMODE_EXEC> などの内部での使用のみが意図されたフラグを指定することができ、 "
2264 "その場合 fanotify ファイルディスクリプターからの読み出し時に返されるファイル"
2265 "ディスクリプターにそのフラグがセットされる。"
2268 #: build/C/man2/fanotify_init.2:263
2269 msgid "B<fanotify_mark>(2), B<fanotify>(7)"
2270 msgstr "B<fanotify_mark>(2), B<fanotify>(7)"
2273 #: build/C/man2/fanotify_mark.2:24
2275 msgid "FANOTIFY_MARK"
2276 msgstr "FANOTIFY_MARK"
2279 #: build/C/man2/fanotify_mark.2:28
2281 "fanotify_mark - add, remove, or modify an fanotify mark on a filesystem "
2283 msgstr "fanotify_mark - ファイルシステムオブジェクトへの fanotify マークの追加、削除、変更"
2286 #: build/C/man2/fanotify_mark.2:31
2288 msgid "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2289 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2292 #: build/C/man2/fanotify_mark.2:35
2295 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2296 "B< uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2298 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2299 "B< uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2302 #: build/C/man2/fanotify_mark.2:44
2304 "B<fanotify_mark>(2) adds, removes, or modifies an fanotify mark on a "
2305 "filesystem object. The caller must have read permission on the filesystem "
2306 "object that is to be marked."
2307 msgstr "B<fanotify_mark>(2) はファイルシステムオブジェクトに対する fanotify マークの追加、削除、変更を行う。 呼び出し元はマークを付けるファイルシステムオブジェクトに対する読み出し許可を持っていなければならない。"
2310 #: build/C/man2/fanotify_mark.2:49
2312 "The I<fanotify_fd> argument is a file descriptor returned by "
2313 "B<fanotify_init>(2)."
2314 msgstr "I<fanotify_fd> 引き数は B<fanotify_init>(2) で返されたファイルディスクリプターである。"
2317 #: build/C/man2/fanotify_mark.2:53
2319 "I<flags> is a bit mask describing the modification to perform. It must "
2320 "include exactly one of the following values:"
2321 msgstr "I<flags> は実行する操作内容を示すビットマスクである。 以下の値のいずれか一つだけを指定しなければならない。"
2324 #: build/C/man2/fanotify_mark.2:53
2326 msgid "B<FAN_MARK_ADD>"
2327 msgstr "B<FAN_MARK_ADD>"
2330 #: build/C/man2/fanotify_mark.2:62
2332 "The events in I<mask> will be added to the mark mask (or to the ignore "
2333 "mask). I<mask> must be nonempty or the error B<EINVAL> will occur."
2334 msgstr "I<mask> のイベントを mark マスク (もしくは ignore マスク) に追加する。 I<mask> は空であってはいけない。 空の場合はエラー B<EINVAL> が発生する。"
2337 #: build/C/man2/fanotify_mark.2:62
2339 msgid "B<FAN_MARK_REMOVE>"
2340 msgstr "B<FAN_MARK_REMOVE>"
2343 #: build/C/man2/fanotify_mark.2:71
2345 "The events in argument I<mask> will be removed from the mark mask (or from "
2346 "the ignore mask). I<mask> must be nonempty or the error B<EINVAL> will "
2348 msgstr "引き数 I<mask> のイベントを mark マスク (もしくは ignore マスク) から削除する。 I<mask> は空であってはいけない。 空の場合はエラー B<EINVAL>が発生する。"
2351 #: build/C/man2/fanotify_mark.2:71
2353 msgid "B<FAN_MARK_FLUSH>"
2354 msgstr "B<FAN_MARK_FLUSH>"
2357 #: build/C/man2/fanotify_mark.2:86
2359 "Remove either all mount or all non-mount marks from the fanotify group. If "
2360 "I<flag> contains B<FAN_MARK_MOUNT>, all marks for mounts are removed from "
2361 "the group. Otherwise, all marks for directories and files are removed. No "
2362 "flag other than B<FAN_MARK_MOUNT> can be used in conjunction with "
2363 "B<FAN_MARK_FLUSH>. I<mask> is ignored."
2364 msgstr "fanotify グループから全てのマウント mark か全てのマウント以外の mark を削除する。 I<flag> に B<FAN_MARK_MOUNT> が含まれる場合、 マウントに対する全ての mark がそのグループから削除される。 含まれない場合は、 ディレクトリとファイルに対する全ての mark が削除される。 B<FAN_MARK_MOUNT> 以外のフラグを B<FAN_MARK_FLUSH> と組み合わせて使うことはできない。 I<mask> は無視される。"
2367 #: build/C/man2/fanotify_mark.2:90
2369 "If none of the values above is specified, or more than one is specified, the "
2370 "call fails with the error B<EINVAL>."
2371 msgstr "上記のどの値も指定されなかった場合、 または 2 つ以上の値が指定された場合、 呼び出しはエラー B<EINVAL> で失敗する。"
2374 #: build/C/man2/fanotify_mark.2:94
2376 "In addition, zero or more of the following values may be ORed into I<flags>:"
2377 msgstr "これに加えて、 I<flags> に以下の値を 0 個以上ビット単位の論理和 (OR) で指定できる。"
2380 #: build/C/man2/fanotify_mark.2:94
2382 msgid "B<FAN_MARK_DONT_FOLLOW>"
2383 msgstr "B<FAN_MARK_DONT_FOLLOW>"
2386 #: build/C/man2/fanotify_mark.2:105
2388 "If I<pathname> is a symbolic link, mark the link itself, rather than the "
2389 "file to which it refers. (By default, B<fanotify_mark>() dereferences "
2390 "I<pathname> if it is a symbolic link.)"
2391 msgstr "I<pathname> がシンボリックリンクの場合、 リンクが参照するファイルではなく、 リンク自身にマークを付ける (デフォルトでは B<fanotify_mark>() は I<pathname> がシンボリックリンクの場合シンボリックリンクの展開を行う)。"
2394 #: build/C/man2/fanotify_mark.2:105
2396 msgid "B<FAN_MARK_ONLYDIR>"
2397 msgstr "B<FAN_MARK_ONLYDIR>"
2400 #: build/C/man2/fanotify_mark.2:110
2402 "If the filesystem object to be marked is not a directory, the error "
2403 "B<ENOTDIR> shall be raised."
2404 msgstr "マークが付けられたファイルシステムオブジェクトがディレクトリでない場合、 エラー B<ENOTDIR> が発生する。"
2407 #: build/C/man2/fanotify_mark.2:110
2409 msgid "B<FAN_MARK_MOUNT>"
2410 msgstr "B<FAN_MARK_MOUNT>"
2413 #: build/C/man2/fanotify_mark.2:121
2415 "Mark the mount point specified by I<pathname>. If I<pathname> is not itself "
2416 "a mount point, the mount point containing I<pathname> will be marked. All "
2417 "directories, subdirectories, and the contained files of the mount point will "
2419 msgstr "I<pathname> で指定されたマウントポイントにマークを付ける。 I<pathname> がマウントポイント自身ではない場合、 I<pathname> を含むマウントポイントがマークされる。 マウントポイントに含まれる全てのディレクトリ、 サブディレクトリ、 その中のファイルが監視される。"
2422 #: build/C/man2/fanotify_mark.2:121
2424 msgid "B<FAN_MARK_IGNORED_MASK>"
2425 msgstr "B<FAN_MARK_IGNORED_MASK>"
2428 #: build/C/man2/fanotify_mark.2:126
2430 "The events in I<mask> shall be added to or removed from the ignore mask."
2431 msgstr "I<mask> のイベントの ignore マスクへの追加、もしくは削除を行う。"
2434 #: build/C/man2/fanotify_mark.2:126
2436 msgid "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2437 msgstr "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2440 #: build/C/man2/fanotify_mark.2:132
2442 "The ignore mask shall survive modify events. If this flag is not set, the "
2443 "ignore mask is cleared when a modify event occurs for the ignored file or "
2445 msgstr "ignore マスクは変更イベントが発生しても残り続ける。 このフラグがセットされていない場合、 無視するファイルやディレクトリに対して変更イベントが発生した際に ignore マスクはクリアされる。"
2448 #: build/C/man2/fanotify_mark.2:136
2450 "I<mask> defines which events shall be listened for (or which shall be "
2451 "ignored). It is a bit mask composed of the following values:"
2452 msgstr "I<mask> はどのイベントに対して通知を受けるか (もしくはどのイベントを無視するか) を定義する。 以下の値から構成されるビットマスクである。"
2455 #: build/C/man2/fanotify_mark.2:139
2457 "Create an event when a file or directory (but see BUGS) is accessed (read)."
2458 msgstr "ファイルやディレクトリへのアクセス (読み出し) があった際にイベントを作成する (「バグ」も参照)。"
2461 #: build/C/man2/fanotify_mark.2:142
2462 msgid "Create an event when a file is modified (write)."
2463 msgstr "ファイルが変更された (書き込み) 際にイベントを作成する。"
2466 #: build/C/man2/fanotify_mark.2:145
2467 msgid "Create an event when a writable file is closed."
2468 msgstr "書き込み可能ファイルがクローズされた際にイベントを作成する。"
2471 #: build/C/man2/fanotify_mark.2:148
2472 msgid "Create an event when a read-only file or directory is closed."
2473 msgstr "読み出し専用のファイルやディレクトリがクローズされた際にイベントを作成する。"
2476 #: build/C/man2/fanotify_mark.2:151
2477 msgid "Create an event when a file or directory is opened."
2478 msgstr "ファイルやディレクトリがオープンされた際にイベントを作成する。"
2481 #: build/C/man2/fanotify_mark.2:159
2483 "Create an event when a permission to open a file or directory is requested. "
2484 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2485 "B<FAN_CLASS_CONTENT> is required."
2486 msgstr "ファイルやディレクトリをオープンするアクセス許可が要求された際にイベントを作成する。 fanotify ファイルディスクリプターが B<FAN_CLASS_PRE_CONTENT> か B<FAN_CLASS_CONTENT> を指定されて作成されている必要がある。"
2489 #: build/C/man2/fanotify_mark.2:167
2491 "Create an event when a permission to read a file or directory is requested. "
2492 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2493 "B<FAN_CLASS_CONTENT> is required."
2494 msgstr "ファイルやディレクトリを読み出すアクセス許可が要求された際にイベントを作成する。 fanotify ファイルディスクリプターが B<FAN_CLASS_PRE_CONTENT> か B<FAN_CLASS_CONTENT> を指定されて作成されている必要がある。"
2497 #: build/C/man2/fanotify_mark.2:167
2499 msgid "B<FAN_ONDIR>"
2500 msgstr "B<FAN_ONDIR>"
2503 #: build/C/man2/fanotify_mark.2:176
2505 "Create events for directories\\(emfor example, when B<opendir>(3), "
2506 "B<readdir>(3) (but see BUGS), and B<closedir>(3) are called. Without this "
2507 "flag, only events for files are created."
2508 msgstr "ディレクトリに対するイベントを作成する。 例えば B<opendir>(3)、 B<readdir>(3) (ただし「バグ」も参照)、 B<closedir>(3) が呼び出された場合。 このフラグが指定されなかった場合、 ファイルに対するイベントだけが作成される。"
2511 #: build/C/man2/fanotify_mark.2:176
2513 msgid "B<FAN_EVENT_ON_CHILD>"
2514 msgstr "B<FAN_EVENT_ON_CHILD>"
2517 #: build/C/man2/fanotify_mark.2:184
2519 "Events for the immediate children of marked directories shall be created. "
2520 "The flag has no effect when marking mounts. Note that events are not "
2521 "generated for children of the subdirectories of marked directories. To "
2522 "monitor complete directory trees it is necessary to mark the relevant mount."
2523 msgstr "マークされたディレクトリの直下のエントリーに対してイベントを作成する。 このフラグはマウントにマークを付ける際には効果はない。 マークされたディレクトリのサブディレクトリのエントリーに対してはイベントが作成されない点に注意すること。 ディレクトリツリー全体を監視するには、 関連するマウントにマークを付ける必要がある。"
2526 #: build/C/man2/fanotify_mark.2:186
2527 msgid "The following composed value is defined:"
2528 msgstr "以下の組み合わせ値が定義されている。"
2531 #: build/C/man2/fanotify_mark.2:190
2532 msgid "A file is closed (B<FAN_CLOSE_WRITE>|B<FAN_CLOSE_NOWRITE>)."
2533 msgstr "ファイルがクローズされた (B<FAN_CLOSE_WRITE>|B<FAN_CLOSE_NOWRITE>)。"
2536 #: build/C/man2/fanotify_mark.2:195
2538 "The filesystem object to be marked is determined by the file descriptor "
2539 "I<dirfd> and the pathname specified in I<pathname>:"
2540 msgstr "マークを付けるファイルシステムオブジェクトは、 ファイルディスクリプター I<dirfd> と I<pathname> で指定されたパス名から決定される。"
2543 #: build/C/man2/fanotify_mark.2:201
2545 "If I<pathname> is NULL, I<dirfd> defines the filesystem object to be marked."
2546 msgstr "I<pathname> が NULL の場合、 I<dirfd> でマークを付けるファイルシステムオブジェクトが定義される。"
2549 #: build/C/man2/fanotify_mark.2:209
2551 "If I<pathname> is NULL, and I<dirfd> takes the special value B<AT_FDCWD>, "
2552 "the current working directory is to be marked."
2553 msgstr "I<pathname> が NULL で、 I<dirfd> が特別な値 B<AT_FDCWD> の場合、 カレントワーキングディレクトリがマークされる。"
2556 #: build/C/man2/fanotify_mark.2:215
2558 "If I<pathname> is absolute, it defines the filesystem object to be marked, "
2559 "and I<dirfd> is ignored."
2560 msgstr "I<pathname> が絶対パスの場合、 そのパス名によりマークを付けるファイルシステムオブジェクトが定義され、 I<dirfd> は無視される。"
2563 #: build/C/man2/fanotify_mark.2:226
2565 "If I<pathname> is relative, and I<dirfd> does not have the value "
2566 "B<AT_FDCWD>, then the filesystem object to be marked is determined by "
2567 "interpreting I<pathname> relative the directory referred to by I<dirfd>."
2568 msgstr "I<pathname> が相対パスで、 I<dirfd> が B<AT_FDCWD> でない場合、 マークを付けるファイルシステムオブジェクトは I<dirfd> が参照するディレクトリに対する相対パス I<pathname> を解釈して決定される。"
2571 #: build/C/man2/fanotify_mark.2:236
2573 "If I<pathname> is relative, and I<dirfd> has the value B<AT_FDCWD>, then the "
2574 "filesystem object to be marked is determined by interpreting I<pathname> "
2575 "relative the current working directory."
2576 msgstr "I<pathname> が相対パスで、 I<dirfd> が B<AT_FDCWD> の場合、 マークを付けるファイルシステムオブジェクトはカレントワーキングディレクトリに対する相対パス I<pathname> を解釈して決定される。"
2579 #: build/C/man2/fanotify_mark.2:243
2581 "On success, B<fanotify_mark>() returns 0. On error, -1 is returned, and "
2582 "I<errno> is set to indicate the error."
2583 msgstr "成功すると B<fanotify_mark>() は 0 を返す。 エラーの場合、 -1 を返し、 I<errno> にエラーの原因を示す値を設定する。"
2586 #: build/C/man2/fanotify_mark.2:244 build/C/man2/inotify_add_watch.2:88
2587 #: build/C/man2/inotify_rm_watch.2:56
2593 #: build/C/man2/fanotify_mark.2:248
2594 msgid "An invalid file descriptor was passed in I<fanotify_fd>."
2595 msgstr "無効なファイルディスクリプターが I<fanotify_fd> で渡された。"
2598 #: build/C/man2/fanotify_mark.2:257
2600 "An invalid value was passed in I<flags> or I<mask>, or I<fanotify_fd> was "
2601 "not an fanotify file descriptor."
2602 msgstr "無効な値が I<flags> か I<mask> に指定されたか、 I<fanotify_fd> が fanotify ファイルディスクリプターでなかった。"
2605 #: build/C/man2/fanotify_mark.2:265
2607 "The fanotify file descriptor was opened with B<FAN_CLASS_NOTIF> and mask "
2608 "contains a flag for permission events (B<FAN_OPEN_PERM> or "
2609 "B<FAN_ACCESS_PERM>)."
2610 msgstr "fanotify ファイルディスクリプターが B<FAN_CLASS_NOTIF> でオープンされたが、 アクセス許可イベント (B<FAN_OPEN_PERM> か B<FAN_ACCESS_PERM>) のフラグがマスクに含まれている。"
2613 #: build/C/man2/fanotify_mark.2:274
2615 "The filesystem object indicated by I<dirfd> and I<pathname> does not exist. "
2616 "This error also occurs when trying to remove a mark from an object which is "
2618 msgstr "I<dirfd> と I<pathname> で指定されたファイルシステムオブジェクトが存在しない。 このエラーはマークされていないオブジェクトからマークを削除しようとした場合にも発生する。"
2621 #: build/C/man2/fanotify_mark.2:277
2622 msgid "The necessary memory could not be allocated."
2623 msgstr "必要なメモリを割り当てできなかった。"
2626 #: build/C/man2/fanotify_mark.2:277 build/C/man2/inotify_add_watch.2:112
2632 #: build/C/man2/fanotify_mark.2:283
2634 "The number of marks exceeds the limit of 8192 and the B<FAN_UNLIMITED_MARKS> "
2635 "flag was not specified when the fanotify file descriptor was created with "
2636 "B<fanotify_init>(2)."
2637 msgstr "マークの数が 8192 の上限を超過し、 B<fanotify_init>(2) で fanotify ファイルディスクリプターが作成された際に B<FAN_UNLIMITED_MARKS> フラグが指定されていなかった。"
2640 #: build/C/man2/fanotify_mark.2:289
2642 "This kernel does not implement B<fanotify_mark>(). The fanotify API is "
2643 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
2644 msgstr "このカーネルでは B<fanotify_mark>() が実装されていない。 fanotify API が利用できるのは、 カーネルで B<CONFIG_FANOTIFY> が有効になっている場合だけである。"
2647 #: build/C/man2/fanotify_mark.2:289
2653 #: build/C/man2/fanotify_mark.2:299
2655 "I<flags> contains B<FAN_MARK_ONLYDIR>, and I<dirfd> and I<pathname> do not "
2656 "specify a directory."
2657 msgstr "I<flags> に B<FAN_MARK_ONLYDIR> が含まれているが、 I<dirfd> と I<pathname> がディレクトリを指定していない。"
2660 #: build/C/man2/fanotify_mark.2:303
2662 "B<fanotify_mark>() was introduced in version 2.6.36 of the Linux kernel and "
2663 "enabled in version 2.6.37."
2664 msgstr "B<fanotify_mark>() は Linux カーネルのバージョン 2.6.36 で導入され、 バージョン 2.6.37 で有効になった。"
2667 #: build/C/man2/fanotify_mark.2:307
2668 msgid "The following bugs were present in Linux kernels before version 3.16:"
2669 msgstr "バージョン 3.16 より前の Linux カーネルでは以下のバグが存在した。"
2671 #. Fixed by commit 0a8dd2db579f7a0ac7033d6b857c3d5dbaa77563
2673 #: build/C/man2/fanotify_mark.2:317
2675 "If I<flags> contains B<FAN_MARK_FLUSH>, I<dirfd> and I<pathname> must "
2676 "specify a valid filesystem object, even though this object is not used."
2677 msgstr "I<flags> に B<FAN_MARK_FLUSH> が指定されている場合、 たとえそのオブジェクトが使用されない場合であっても、 I<dirfd> と I<pathname> には有効なファイルシステムオブジェクトを指定しなければならない。"
2679 #. Fixed by commit d4c7cf6cffb1bc711a833b5e304ba5bcfe76398b
2681 #: build/C/man2/fanotify_mark.2:323
2682 msgid "B<readdir>(2) does not generate a B<FAN_ACCESS> event."
2683 msgstr "B<readdir>(2) は B<FAN_ACCESS> イベントを生成しない。"
2685 #. Fixed by commit cc299a98eb13a9853675a9cbb90b30b4011e1406
2687 #: build/C/man2/fanotify_mark.2:331
2689 "If B<fanotify_mark>(2) is called with B<FAN_MARK_FLUSH>, I<flags> is not "
2690 "checked for invalid values."
2691 msgstr "B<fanotify_mark>(2) が B<FAN_MARK_FLUSH> 付きで呼び出された場合、 I<flags> の値が無効かはチェックされない。"
2694 #: build/C/man2/fanotify_mark.2:334
2695 msgid "B<fanotify_init>(2), B<fanotify>(7)"
2696 msgstr "B<fanotify_init>(2), B<fanotify>(7)"
2699 #: build/C/man7/inotify.7:27
2705 #: build/C/man7/inotify.7:30
2706 msgid "inotify - monitoring filesystem events"
2707 msgstr "inotify - ファイルシステムイベントを監視する"
2710 #: build/C/man7/inotify.7:38
2712 "The I<inotify> API provides a mechanism for monitoring filesystem events. "
2713 "Inotify can be used to monitor individual files, or to monitor directories. "
2714 "When a directory is monitored, inotify will return events for the directory "
2715 "itself, and for files inside the directory."
2717 "I<inotify> API はファイルシステムイベントを監視するための機構を提供する。 "
2718 "inotify は個々のファイルやディレクトリを監視するのに使える。 ディレクトリを監"
2719 "視する場合、inotify はディレクトリ自身と ディレクトリ内のファイルのイベントを"
2723 #: build/C/man7/inotify.7:40
2724 msgid "The following system calls are used with this API:"
2725 msgstr "この API では以下のシステムコールが使用される。"
2728 #: build/C/man7/inotify.7:51
2730 "B<inotify_init>(2) creates an inotify instance and returns a file "
2731 "descriptor referring to the inotify instance. The more recent "
2732 "B<inotify_init1>(2) is like B<inotify_init>(2), but has a I<flags> argument "
2733 "that provides access to some extra functionality."
2735 "B<inotify_init>(2) は inotify インスタンスを作成し、inotify インスタンスを参"
2736 "照する ファイルディスクリプターを返す。 より新しい B<inotify_init1>(2) も "
2737 "B<inotify_init>(2) と同様だが、 こちらにはいくつかの追加の機能を利用するため"
2738 "の I<flags> 引き数がある。"
2741 #: build/C/man7/inotify.7:64
2743 "B<inotify_add_watch>(2) manipulates the \"watch list\" associated with an "
2744 "inotify instance. Each item (\"watch\") in the watch list specifies the "
2745 "pathname of a file or directory, along with some set of events that the "
2746 "kernel should monitor for the file referred to by that pathname. "
2747 "B<inotify_add_watch>(2) either creates a new watch item, or modifies an "
2748 "existing watch. Each watch has a unique \"watch descriptor\", an integer "
2749 "returned by B<inotify_add_watch>(2) when the watch is created."
2751 "B<inotify_add_watch>(2) は inotify インスタンスに関連づけられた「監視対象 "
2752 "(watch) リスト」を操作する。 監視対象リストの各アイテム (\"watch\") は、 ファ"
2753 "イルまたはディレクトリのパス名と、 そのパス名で参照されるファイルに対して "
2754 "カーネルが監視する複数のイベントの集合を指定する。 B<inotify_add_watch>(2) "
2755 "は新しい監視アイテムの作成や既存の監視対象の変更ができる。 各監視対象は一意の"
2756 "「監視対象ディスクリプター」を持つ。 これは監視対象を作成したときに "
2757 "B<inotify_add_watch>(2) から返される整数である。"
2760 #: build/C/man7/inotify.7:70
2762 "When events occur for monitored files and directories, those events are made "
2763 "available to the application as structured data that can be read from the "
2764 "inotify file descriptor using B<read>(2) (see below)."
2766 "監視しているファイルやディレクトリでイベントが起こると、 それらのイベントはア"
2767 "プリケーションから inotify ファイルディスクリプターから B<read>(2) を使って構"
2768 "造化データとして読み出すことができる (下記参照)。"
2771 #: build/C/man7/inotify.7:73
2772 msgid "B<inotify_rm_watch>(2) removes an item from an inotify watch list."
2774 "B<inotify_rm_watch>(2) は inotify の監視対象リストからアイテムを削除する。"
2777 #: build/C/man7/inotify.7:80
2779 "When all file descriptors referring to an inotify instance have been closed "
2780 "(using B<close>(2)), the underlying object and its resources are freed for "
2781 "reuse by the kernel; all associated watches are automatically freed."
2783 "inotify インスタンスを指している 全てのファイルディスクリプターが "
2784 "(B<close>(2) を使って) クローズされた場合、 その下層にあるオブジェクトとその"
2785 "リソースは、 カーネルで再利用するために解放される。 関連が切られた監視対象は"
2789 #: build/C/man7/inotify.7:89
2791 "With careful programming, an application can use inotify to efficiently "
2792 "monitor and cache the state of a set of filesystem objects. However, robust "
2793 "applications should allow for the fact that bugs in the monitoring logic or "
2794 "races of the kind described below may leave the cache inconsistent with the "
2795 "filesystem state. It is probably wise to to do some consistency checking, "
2796 "and rebuild the cache when inconsistencies are detected."
2798 "注意深くプログラミングすることで、 アプリケーションは inotify を使ってファイ"
2799 "ルシステムオブジェクトの集合の状態を効率的に監視しキャッシュしておくことがで"
2800 "きる。 しかしながら、ロバストなアプリケーションでは、監視ロジックのバグや以下"
2801 "に説明があるような種類の競合条件によりファイルシステムの状態とキャッシュが一"
2802 "致しない状態になることがあるという事実も考慮に入れておくべきである。 おそらく"
2803 "何らかの一貫性のチェックを行い、不一致が検出された場合にはキャッシュを再構築"
2807 #: build/C/man7/inotify.7:89
2809 msgid "Reading events from an inotify file descriptor"
2810 msgstr "inotify ファイルディスクリプターからのイベントの読み出し"
2813 #: build/C/man7/inotify.7:102
2815 "To determine what events have occurred, an application B<read>(2)s from the "
2816 "inotify file descriptor. If no events have so far occurred, then, assuming "
2817 "a blocking file descriptor, B<read>(2) will block until at least one event "
2818 "occurs (unless interrupted by a signal, in which case the call fails with "
2819 "the error B<EINTR>; see B<signal>(7))."
2821 "どのようなイベントが起こっていたかを知るには、 アプリケーションで inotify "
2822 "ファイルディスクリプターを B<read>(2) すればよい。 これまでに何もイベントが"
2823 "起こっていない場合、 停止 (blocking) モードのファイルディスクリプターであれ"
2824 "ば、 少なくとも 1 つのイベントが起こるまで B<read>(2) は停止する (シグナルに"
2825 "より割り込まれなかった場合。 シグナルによる割り込みがあった場合、呼び出しはエ"
2826 "ラー B<EINTR> で失敗する。 B<signal>(7) 参照)。"
2829 #: build/C/man7/inotify.7:106
2831 "Each successful B<read>(2) returns a buffer containing one or more of the "
2832 "following structures:"
2834 "B<read>(2) が成功すると、以下の構造体を 1 つ以上含むバッファーが返される:"
2836 #. FIXME . The type of the 'wd' field should probably be "int32_t".
2837 #. I submitted a patch to fix this. See the LKML thread
2838 #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008
2839 #. Glibc bug filed: http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
2841 #: build/C/man7/inotify.7:121
2844 "struct inotify_event {\n"
2845 " int wd; /* Watch descriptor */\n"
2846 " uint32_t mask; /* Mask describing event */\n"
2847 " uint32_t cookie; /* Unique cookie associating related\n"
2848 " events (for rename(2)) */\n"
2849 " uint32_t len; /* Size of I<name> field */\n"
2850 " char name[]; /* Optional null-terminated name */\n"
2853 "struct inotify_event {\n"
2854 " int wd; /* 監視対象ディスクリプター */\n"
2855 " uint32_t mask; /* イベントを示すマスク */\n"
2856 " uint32_t cookie; /* 関連するイベント群を関連づける\n"
2857 " 一意なクッキー (rename(2) 用) */\n"
2858 " uint32_t len; /* \\(aqname\\(aq フィールドのサイズ */\n"
2859 " char name[]; /* ヌルで終端された任意の名前 */\n"
2863 #: build/C/man7/inotify.7:128
2865 "I<wd> identifies the watch for which this event occurs. It is one of the "
2866 "watch descriptors returned by a previous call to B<inotify_add_watch>(2)."
2868 "I<wd> はイベント発生の監視対象を指定する。 これは、前もって行われた "
2869 "B<inotify_add_watch>(2) 呼び出しで返された監視対象ディスクリプターのうちの "
2873 #: build/C/man7/inotify.7:131
2875 "I<mask> contains bits that describe the event that occurred (see below)."
2877 "I<mask> には発生したイベント (下記参照) を記述するためのビットが含まれる。"
2880 #: build/C/man7/inotify.7:143
2882 "I<cookie> is a unique integer that connects related events. Currently this "
2883 "is used only for rename events, and allows the resulting pair of "
2884 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events to be connected by the "
2885 "application. For all other event types, I<cookie> is set to 0."
2887 "I<cookie> は関連するイベントを関連づけるための一意な整数である。\n"
2888 "現在のところ、この値は rename イベントに対してのみ使われており、\n"
2889 "結果のペアである B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントを\n"
2890 "アプリケーションで関連づけることができる。\n"
2891 "他のイベント種別の場合には、 I<cookie> は 0 に設定する。"
2894 #: build/C/man7/inotify.7:152
2896 "The I<name> field is present only when an event is returned for a file "
2897 "inside a watched directory; it identifies the file pathname relative to the "
2898 "watched directory. This pathname is null-terminated, and may include "
2899 "further null bytes (\\(aq\\e0\\(aq) to align subsequent reads to a suitable "
2902 "I<name> フィールドは監視しているディレクトリ内のファイルに対して イベントが返"
2903 "される場合のためにだけ存在する。 監視するディレクトリからのファイルの相対パス"
2904 "名を表す。 このパス名はヌルで終端され、 その後の読み込みで適切なアドレス境界"
2905 "に調整するために、 さらにヌルバイト (\\(aq\\e0\\(aq) が含まれる場合もある。"
2908 #: build/C/man7/inotify.7:162
2910 "The I<len> field counts all of the bytes in I<name>, including the null "
2911 "bytes; the length of each I<inotify_event> structure is thus I<sizeof(struct "
2912 "inotify_event)+len>."
2914 "I<len> フィールドはヌルバイトを含む I<name> の全てのバイト数を表す。\n"
2915 "よって、 I<inotify_event> 構造体のサイズは \n"
2916 "I<sizeof(struct inotify_event)+len> である。"
2919 #: build/C/man7/inotify.7:173
2921 "The behavior when the buffer given to B<read>(2) is too small to return "
2922 "information about the next event depends on the kernel version: in kernels "
2923 "before 2.6.21, B<read>(2) returns 0; since kernel 2.6.21, B<read>(2) fails "
2924 "with the error B<EINVAL>. Specifying a buffer of size"
2926 "B<read>(2) に渡されたバッファーが小さすぎて次のイベントに関する情報を返せ\n"
2927 "ない場合の動作はカーネルのバージョンにより異なる。 2.6.21 より前のカー\n"
2928 "ネルでは、 B<read>(2) は 0 を返す。 2.6.21 以降のカーネルでは、\n"
2929 "B<read>(2) はエラー B<EINVAL> で失敗する。\n"
2933 #: build/C/man7/inotify.7:175
2935 msgid " sizeof(struct inotify_event) + NAME_MAX + 1\n"
2936 msgstr " sizeof(struct inotify_event) + NAME_MAX + 1\n"
2939 #: build/C/man7/inotify.7:177
2940 msgid "will be sufficient to read at least one event."
2941 msgstr "を指定すれば、少なくとも 1 イベントで読み出しを行うには十分である。"
2944 #: build/C/man7/inotify.7:177
2946 msgid "inotify events"
2947 msgstr "inotify イベント"
2950 #: build/C/man7/inotify.7:197
2952 "The B<inotify_add_watch>(2) I<mask> argument and the I<mask> field of the "
2953 "I<inotify_event> structure returned when B<read>(2)ing an inotify file "
2954 "descriptor are both bit masks identifying inotify events. The following "
2955 "bits can be specified in I<mask> when calling B<inotify_add_watch>(2) and "
2956 "may be returned in the I<mask> field returned by B<read>(2):"
2958 "B<inotify_add_watch>(2) の I<mask> 引き数と、inotify ファイル構造体を "
2959 "B<read>(2) したときに返される I<inotify_event> 構造体の I<mask> フィールド"
2960 "は、ともに inotify イベントを識別するための ビットマスクである。 以下のビット"
2961 "が B<inotify_add_watch>(2) を呼ぶときの I<mask> に指定可能であり、 "
2962 "B<read>(2) で返される I<mask> フィールドで返される:"
2965 #: build/C/man7/inotify.7:198
2967 msgid "B<IN_ACCESS> (+)"
2968 msgstr "B<IN_ACCESS> (+)"
2971 #: build/C/man7/inotify.7:203
2972 msgid "File was accessed (e.g., B<read>(2), B<execve>(2))."
2973 msgstr "(B<read>(2), B<execve>(2) などで) ファイルがアクセスされた。"
2976 #: build/C/man7/inotify.7:203
2978 msgid "B<IN_ATTRIB> (*)"
2979 msgstr "B<IN_ATTRIB> (*)"
2982 #: build/C/man7/inotify.7:218
2984 "Metadata changed\\(emfor example, permissions (e.g., B<chmod>(2)), "
2985 "timestamps (e.g., B<utimensat>(2)), extended attributes (B<setxattr>(2)), "
2986 "link count (since Linux 2.6.25; e.g., for the target of B<link>(2) and for "
2987 "B<unlink>(2)), and user/group ID (e.g., B<chown>(2))."
2989 "メタデータが変更された。 メタデータとは、例えば、アクセス許可 (B<chmod>(2))、"
2990 "タイムスタンプ (B<utimensat>(2) など)、拡張属性 (B<setxattr>(2))、 リンクカウ"
2991 "ント (Linux 2.6.25 以降; B<link>(2) のリンク先や B<unlink>(2) など)、ユー"
2992 "ザー/グループ ID (B<chown>(2) など) などである。"
2995 #: build/C/man7/inotify.7:218
2997 msgid "B<IN_CLOSE_WRITE> (+)"
2998 msgstr "B<IN_CLOSE_WRITE> (+)"
3001 #: build/C/man7/inotify.7:221
3002 msgid "File opened for writing was closed."
3003 msgstr "書き込みのためにオープンされたファイルがクローズされた。"
3006 #: build/C/man7/inotify.7:221
3008 msgid "B<IN_CLOSE_NOWRITE> (*)"
3009 msgstr "B<IN_CLOSE_NOWRITE> (*)"
3012 #: build/C/man7/inotify.7:224
3013 msgid "File or directory not opened for writing was closed."
3015 "書き込み用としてはオープンされていないファイルやディレクトリがクローズされ"
3019 #: build/C/man7/inotify.7:224
3021 msgid "B<IN_CREATE> (+)"
3022 msgstr "B<IN_CREATE> (+)"
3025 #: build/C/man7/inotify.7:234
3027 "File/directory created in watched directory (e.g., B<open>(2) B<O_CREAT>, "
3028 "B<mkdir>(2), B<link>(2), B<symlink>(2), B<bind>(2) on a UNIX domain socket)."
3030 "監視対象ディレクトリ内でファイルやディレクトリが作成された (B<open>(2) "
3031 "B<O_CREAT>, B<mkdir>(2), B<link>(2), B<symlink>(2), UNIX ドメインソケットに対"
3032 "する B<bind>(2) など)。"
3035 #: build/C/man7/inotify.7:234
3037 msgid "B<IN_DELETE> (+)"
3038 msgstr "B<IN_DELETE> (+)"
3041 #: build/C/man7/inotify.7:237
3042 msgid "File/directory deleted from watched directory."
3043 msgstr "監視対象ディレクトリ内でファイルやディレクトリが削除された。"
3046 #: build/C/man7/inotify.7:237
3048 msgid "B<IN_DELETE_SELF>"
3049 msgstr "B<IN_DELETE_SELF>"
3052 #: build/C/man7/inotify.7:248
3054 "Watched file/directory was itself deleted. (This event also occurs if an "
3055 "object is moved to another filesystem, since B<mv>(1) in effect copies the "
3056 "file to the other filesystem and then deletes it from the original "
3057 "filesystem.) In addition, an B<IN_IGNORED> event will subsequently be "
3058 "generated for the watch descriptor."
3060 "監視対象のファイルやディレクトリ自身が削除あれた。 (このイベントはオブジェク"
3061 "トが別のファイルシステムに移動された場合にも発生する。 B<mv>(1) は実際には別"
3062 "のファイルシステムにファイルをコピーした後、元のファイルシステムからそのファ"
3063 "イルを削除するからである。) また、 結果的に監視ディスクリプターに対して "
3064 "B<IN_IGNORED> イベントも生成される。"
3067 #: build/C/man7/inotify.7:248
3069 msgid "B<IN_MODIFY> (+)"
3070 msgstr "B<IN_MODIFY> (+)"
3073 #: build/C/man7/inotify.7:253
3074 msgid "File was modified (e.g., B<write>(2), B<truncate>(2))."
3075 msgstr "ファイルが変更された (B<write>(2), B<truncate>(2) など)。"
3078 #: build/C/man7/inotify.7:253
3080 msgid "B<IN_MOVE_SELF>"
3081 msgstr "B<IN_MOVE_SELF>"
3084 #: build/C/man7/inotify.7:256
3085 msgid "Watched file/directory was itself moved."
3086 msgstr "監視対象のディレクトリまたはファイル自身が移動された。"
3089 #: build/C/man7/inotify.7:256
3091 msgid "B<IN_MOVED_FROM> (+)"
3092 msgstr "B<IN_MOVED_FROM> (+)"
3095 #: build/C/man7/inotify.7:260
3097 "Generated for the directory containing the old filename when a file is "
3100 "ファイル名の変更を行った際に変更前のファイル名が含まれるディレクトリに対して"
3104 #: build/C/man7/inotify.7:260
3106 msgid "B<IN_MOVED_TO> (+)"
3107 msgstr "B<IN_MOVED_TO> (+)"
3110 #: build/C/man7/inotify.7:264
3112 "Generated for the directory containing the new filename when a file is "
3115 "ファイル名の変更を行った際に新しいファイル名が含まれるディレクトリに対して生"
3119 #: build/C/man7/inotify.7:264
3121 msgid "B<IN_OPEN> (*)"
3122 msgstr "B<IN_OPEN> (*)"
3125 #: build/C/man7/inotify.7:267
3126 msgid "File or directory was opened."
3127 msgstr "ファイルやディレクトリがオープンされた。"
3130 #: build/C/man7/inotify.7:270
3131 msgid "When monitoring a directory:"
3132 msgstr "ディレクトリを監視する場合:"
3135 #: build/C/man7/inotify.7:273
3137 "the events marked above with an asterisk (*) can occur both for the "
3138 "directory itself and for objects inside the directory; and"
3140 "上記でアスタリスク (*) が付いたイベントは、 ディレクトリ自身とディレクトリ内"
3141 "のオブジェクトのどちらに対しても発生する。"
3144 #: build/C/man7/inotify.7:276
3146 "the events marked with a plus sign (+) occur only for objects inside the "
3147 "directory (not for the directory itself)."
3149 "上記でプラス記号 (+) が付いたイベントは、 ディレクトリ内のオブジェクトに対し"
3150 "てのみ発生する (ディレクトリ自身に対しては発生しない)。"
3153 #: build/C/man7/inotify.7:282
3155 "When events are generated for objects inside a watched directory, the "
3156 "I<name> field in the returned I<inotify_event> structure identifies the name "
3157 "of the file within the directory."
3159 "監視対象のディレクトリ内のオブジェクトに対してイベントが発生した場合、 "
3160 "I<inotify_event> 構造体で返される I<name> フィールドは、ディレクトリ内のファ"
3164 #: build/C/man7/inotify.7:290
3166 "The B<IN_ALL_EVENTS> macro is defined as a bit mask of all of the above "
3167 "events. This macro can be used as the I<mask> argument when calling "
3168 "B<inotify_add_watch>(2)."
3170 "B<IN_ALL_EVENTS> マクロは上記のイベント全てのマスクとして定義される。 このマ"
3171 "クロは B<inotify_add_watch>(2) を呼び出すときの I<mask> 引き数として使える。"
3174 #: build/C/man7/inotify.7:292
3175 msgid "Two additional convenience macros are defined:"
3176 msgstr "以下の 2 つの便利なマクロが定義されている。"
3179 #: build/C/man7/inotify.7:293
3185 #: build/C/man7/inotify.7:297
3186 msgid "Equates to B<IN_MOVED_FROM | IN_MOVED_TO>."
3187 msgstr "B<IN_MOVED_FROM | IN_MOVED_TO> と等価。"
3190 #: build/C/man7/inotify.7:297
3193 msgstr "B<IN_CLOSE>"
3196 #: build/C/man7/inotify.7:301
3197 msgid "Equates to B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE>."
3198 msgstr "B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE> と等価。"
3201 #: build/C/man7/inotify.7:307
3203 "The following further bits can be specified in I<mask> when calling "
3204 "B<inotify_add_watch>(2):"
3206 "その他にも以下のビットを B<inotify_add_watch>(2) を呼ぶときの I<mask> に指定"
3210 #: build/C/man7/inotify.7:308
3212 msgid "B<IN_DONT_FOLLOW> (since Linux 2.6.15)"
3213 msgstr "B<IN_DONT_FOLLOW> (Linux 2.6.15 以降)"
3216 #: build/C/man7/inotify.7:313
3217 msgid "Don't dereference I<pathname> if it is a symbolic link."
3219 "I<pathname> がシンボリックリンクである場合に辿らない。 (Linux 2.6.15 以降)"
3222 #: build/C/man7/inotify.7:313
3224 msgid "B<IN_EXCL_UNLINK> (since Linux 2.6.36)"
3225 msgstr "B<IN_EXCL_UNLINK> (Linux 2.6.36 以降)"
3227 #. commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6
3229 #: build/C/man7/inotify.7:329
3231 "By default, when watching events on the children of a directory, events are "
3232 "generated for children even after they have been unlinked from the "
3233 "directory. This can result in large numbers of uninteresting events for "
3234 "some applications (e.g., if watching I</tmp>, in which many applications "
3235 "create temporary files whose names are immediately unlinked). Specifying "
3236 "B<IN_EXCL_UNLINK> changes the default behavior, so that events are not "
3237 "generated for children after they have been unlinked from the watched "
3240 "デフォルトでは、あるディレクトリの子ファイルに関するイベントを監視 (watch) し"
3241 "た際、ディレクトリからその子ファイルが削除 (unlink) された場合であってもその"
3242 "子ファイルに対してイベントが生成される。このことは、アプリケーションによって"
3243 "はあまり興味のないイベントが大量に発生することにつながる (例えば、I</tmp> を"
3244 "監視している場合、たくさんのアプリケーションが、すぐにその名前が削除される一"
3245 "時ファイルをそのディレクトリに作成する)。 B<IN_EXCL_UNLINK> を指定するとこの"
3246 "デフォルトの動作を変更でき、監視対象のディレクトリから子ファイルが削除された"
3247 "後に子ファイルに関するイベントが生成されなくなる。"
3250 #: build/C/man7/inotify.7:329
3252 msgid "B<IN_MASK_ADD>"
3253 msgstr "B<IN_MASK_ADD>"
3256 #: build/C/man7/inotify.7:336
3258 "If a watch instance already exists for the filesystem object corresponding "
3259 "to I<pathname>, add (OR) the events in I<mask> to the watch mask (instead of "
3260 "replacing the mask)."
3262 "監視インスタンスが I<pathname> に対応するファイルシステムオブジェクトに対して"
3263 "すでに存在する場合に、 (マスクを置き換えるのではなく) 監視マスクに I<mask> で"
3264 "指定されたイベントを追加 (OR) する。"
3267 #: build/C/man7/inotify.7:336
3269 msgid "B<IN_ONESHOT>"
3270 msgstr "B<IN_ONESHOT>"
3273 #: build/C/man7/inotify.7:342
3275 "Monitor the filesystem object corresponding to I<pathname> for one event, "
3276 "then remove from watch list."
3278 "I<pathname> に対応するファイルシステムオブジェクトを 1 イベントについてだけ監"
3279 "視し、 イベントが発生したら監視対象リストから削除する。"
3282 #: build/C/man7/inotify.7:342
3284 msgid "B<IN_ONLYDIR> (since Linux 2.6.15)"
3285 msgstr "B<IN_ONLYDIR> (Linux 2.6.15 以降)"
3288 #: build/C/man7/inotify.7:349
3290 "Only watch I<pathname> if it is a directory. Using this flag provides an "
3291 "application with a race-free way of ensuring that the monitored object is a "
3294 "I<pathname> がディレクトリの場合のみ監視する。 このフラグを使うことで、アプリ"
3295 "ケーションは、競合状態を考慮せずに、監視するオブジェクトがディレクトリである"
3296 "ことを保証することができるようになる。"
3299 #: build/C/man7/inotify.7:355
3301 "The following bits may be set in the I<mask> field returned by B<read>(2):"
3302 msgstr "以下のビットが B<read>(2) で返される I<mask> フィールドに設定される:"
3305 #: build/C/man7/inotify.7:356
3307 msgid "B<IN_IGNORED>"
3308 msgstr "B<IN_IGNORED>"
3311 #: build/C/man7/inotify.7:362
3313 "Watch was removed explicitly (B<inotify_rm_watch>(2)) or automatically "
3314 "(file was deleted, or filesystem was unmounted). See also BUGS."
3316 "監視対象が (B<inotify_rm_watch>(2) により) 明示的に 削除された。もしくは "
3317 "(ファイルの削除、またはファイル システムのアンマウントにより) 自動的に削除さ"
3321 #: build/C/man7/inotify.7:362
3324 msgstr "B<IN_ISDIR>"
3327 #: build/C/man7/inotify.7:365
3328 msgid "Subject of this event is a directory."
3329 msgstr "このイベントの対象がディレクトリである。"
3332 #: build/C/man7/inotify.7:365
3334 msgid "B<IN_Q_OVERFLOW>"
3335 msgstr "B<IN_Q_OVERFLOW>"
3338 #: build/C/man7/inotify.7:370
3339 msgid "Event queue overflowed (I<wd> is -1 for this event)."
3340 msgstr "イベントキューが溢れた (このイベントの場合、I<wd> は -1 である)。"
3343 #: build/C/man7/inotify.7:370
3345 msgid "B<IN_UNMOUNT>"
3346 msgstr "B<IN_UNMOUNT>"
3349 #: build/C/man7/inotify.7:376
3351 "Filesystem containing watched object was unmounted. In addition, an "
3352 "B<IN_IGNORED> event will subsequently be generated for the watch descriptor."
3354 "監視対象オブジェクトを含むファイルシステムがアンマウントされた。さらに、この"
3355 "監視対象ディスクリプターに対して B<IN_IGNORED> イベントが生成される。"
3358 #: build/C/man7/inotify.7:377
3364 #: build/C/man7/inotify.7:385
3366 "Suppose an application is watching the directory I<dir> and the file I<dir/"
3367 "myfile> for all events. The examples below show some events that will be "
3368 "generated for these two objects."
3370 "アプリケーションがディレクトリ I<dir> とファイル I<dir/myfile> のすべてのイベ"
3371 "ントを監視しているとする。 以下に、これらの 2 つのオブジェクトに対して生成さ"
3375 #: build/C/man7/inotify.7:386
3377 msgid "fd = open(\"dir/myfile\", O_RDWR);"
3378 msgstr "fd = open(\"dir/myfile\", O_RDWR);"
3381 #: build/C/man7/inotify.7:394
3382 msgid "Generates B<IN_OPEN> events for both I<dir> and I<dir/myfile>."
3384 "I<dir> と I<dir/myfile> の両方に対して B<IN_OPEN> イベントが生成される。"
3387 #: build/C/man7/inotify.7:394
3389 msgid "read(fd, buf, count);"
3390 msgstr "read(fd, buf, count);"
3393 #: build/C/man7/inotify.7:402
3394 msgid "Generates B<IN_ACCESS> events for both I<dir> and I<dir/myfile>."
3396 "I<dir> と I<dir/myfile> の両方に対して B<IN_ACCESS> イベントが生成される"
3399 #: build/C/man7/inotify.7:402
3401 msgid "write(fd, buf, count);"
3402 msgstr "write(fd, buf, count);"
3405 #: build/C/man7/inotify.7:410
3406 msgid "Generates B<IN_MODIFY> events for both I<dir> and I<dir/myfile>."
3408 "I<dir> と I<dir/myfile> の両方に対して B<IN_MODIFY> イベントが生成される"
3411 #: build/C/man7/inotify.7:410
3413 msgid "fchmod(fd, mode);"
3414 msgstr "fchmod(fd, mode);"
3417 #: build/C/man7/inotify.7:418
3418 msgid "Generates B<IN_ATTRIB> events for both I<dir> and I<dir/myfile>."
3420 "I<dir> と I<dir/myfile> の両方に対して B<IN_ATTRIB> イベントが生成される"
3423 #: build/C/man7/inotify.7:418
3429 #: build/C/man7/inotify.7:426
3430 msgid "Generates B<IN_CLOSE_WRITE> events for both I<dir> and I<dir/myfile>."
3432 "I<dir> と I<dir/myfile> の両方に対して B<IN_CLOSE_WRITE> イベントが生成される"
3435 #: build/C/man7/inotify.7:435
3437 "Suppose an application is watching the directories I<dir1> and I<dir2>, and "
3438 "the file I<dir1/myfile>. The following examples show some events that may "
3441 "アプリケーションがディレクトリ I<dir1> と I<dir2>、およびファイル I<dir1/"
3442 "myfile> を監視しているとする。 以下に生成されるイベントの例を示す。"
3445 #: build/C/man7/inotify.7:436
3447 msgid "link(\"dir1/myfile\", \"dir2/new\");"
3448 msgstr "link(\"dir1/myfile\", \"dir2/new\");"
3451 #: build/C/man7/inotify.7:446
3453 "Generates an B<IN_ATTRIB> event for I<myfile> and an B<IN_CREATE> event for "
3456 "I<myfile> に対して B<IN_ATTRIB> イベントが生成され、 I<dir2> に対して "
3457 "B<IN_CREATE> イベントが生成される。"
3460 #: build/C/man7/inotify.7:446
3462 msgid "rename(\"dir1/myfile\", \"dir2/myfile\");"
3463 msgstr "rename(\"dir1/myfile\", \"dir2/myfile\");"
3466 #: build/C/man7/inotify.7:467
3468 "Generates an B<IN_MOVED_FROM> event for I<dir1>, an B<IN_MOVED_TO> event for "
3469 "I<dir2>, and an B<IN_MOVE_SELF> event for I<myfile>. The B<IN_MOVED_FROM> "
3470 "and B<IN_MOVED_TO> events will have the same I<cookie> value."
3472 "I<dir1> に対してイベント B<IN_MOVED_FROM> が、 I<dir2> に対してイベント "
3473 "B<IN_MOVED_TO> が、 I<myfile> に対してイベント B<IN_MOVE_SELF> が生成される。"
3474 "この際 イベント B<IN_MOVED_FROM> と B<IN_MOVED_TO> は同じ I<cookie> 値を持"
3478 #: build/C/man7/inotify.7:481
3480 "Suppose that I<dir1/xx> and I<dir2/yy> are (the only) links to the same "
3481 "file, and an application is watching I<dir1>, I<dir2>, I<dir1/xx>, and "
3482 "I<dir2/yy>. Executing the following calls in the order given below will "
3483 "generate the following events:"
3485 "I<dir1/xx> と I<dir2/yy> は同じファイルを参照するリンクで (他のリンクはないも"
3486 "のとする)、 アプリケーションは I<dir1>, I<dir2>, I<dir1/xx>, I<dir2/yy> を監"
3487 "視しているものとする。 以下に示す順序で下記の呼び出しを実行すると、以下のイベ"
3491 #: build/C/man7/inotify.7:482
3493 msgid "unlink(\"dir2/yy\");"
3494 msgstr "unlink(\"dir2/yy\");"
3497 #: build/C/man7/inotify.7:493
3499 "Generates an B<IN_ATTRIB> event for I<xx> (because its link count changes) "
3500 "and an B<IN_DELETE> event for I<dir2>."
3502 "I<xx> に対して B<IN_ATTRIB> イベントが生成され (リンク数が変化したため)、 "
3503 "I<dir2> に対して B<IN_DELETE> イベントが生成される。"
3506 #: build/C/man7/inotify.7:493
3508 msgid "unlink(\"dir1/xx\");"
3509 msgstr "unlink(\"dir1/xx\");"
3512 #: build/C/man7/inotify.7:506
3514 "Generates B<IN_ATTRIB>, B<IN_DELETE_SELF>, and B<IN_IGNORED> events for "
3515 "I<xx>, and an B<IN_DELETE> event for I<dir1>."
3517 "I<xx> に対してイベント B<IN_ATTRIB>, B<IN_DELETE_SELF>, B<IN_IGNORED> が生成"
3518 "され、 I<dir1> に対して B<IN_DELETE> イベントが生成される。"
3521 #: build/C/man7/inotify.7:513
3523 "Suppose an application is watching the directory I<dir> and (the empty) "
3524 "directory I<dir/subdir>. The following examples show some events that may "
3527 "アプリケーションがディレクトリ I<dir> と (空の) ディレクトリ I<dir/subdir> を"
3528 "監視しているものとする。 以下に生成されるイベントの例を示す。"
3531 #: build/C/man7/inotify.7:514
3533 msgid "mkdir(\"dir/new\", mode);"
3534 msgstr "mkdir(\"dir/new\", mode);"
3537 #: build/C/man7/inotify.7:520
3538 msgid "Generates an B<IN_CREATE | IN_ISDIR> event for I<dir>."
3539 msgstr "I<dir> に対して B<IN_CREATE | IN_ISDIR> イベントが生成される。"
3542 #: build/C/man7/inotify.7:520
3544 msgid "rmdir(\"dir/subdir\");"
3545 msgstr "rmdir(\"dir/subdir\");"
3548 #: build/C/man7/inotify.7:532
3550 "Generates B<IN_DELETE_SELF> and B<IN_IGNORED> events for I<subdir>, and an "
3551 "B<IN_DELETE | IN_ISDIR> event for I<dir>."
3553 "I<subdir> に対してイベント B<IN_DELETE_SELF> と B<IN_IGNORED> が生成され、 "
3554 "I<dir> に対して B<IN_DELETE | IN_ISDIR> イベントが生成される。"
3557 #: build/C/man7/inotify.7:533
3559 msgid "/proc interfaces"
3560 msgstr "/proc インターフェース"
3563 #: build/C/man7/inotify.7:536
3565 "The following interfaces can be used to limit the amount of kernel memory "
3566 "consumed by inotify:"
3568 "以下のインターフェースは、inotify で消費される カーネルメモリの総量を制限する"
3572 #: build/C/man7/inotify.7:536
3574 msgid "I</proc/sys/fs/inotify/max_queued_events>"
3575 msgstr "I</proc/sys/fs/inotify/max_queued_events>"
3578 #: build/C/man7/inotify.7:545
3580 "The value in this file is used when an application calls B<inotify_init>(2) "
3581 "to set an upper limit on the number of events that can be queued to the "
3582 "corresponding inotify instance. Events in excess of this limit are dropped, "
3583 "but an B<IN_Q_OVERFLOW> event is always generated."
3585 "このファイルの値は、アプリケーションが B<inotify_init>(2) を呼び出すときに使"
3586 "用され、対応する inotify インスタンスについて キューに入れられるイベントの数"
3587 "の上限を設定する。 この制限を超えたイベントは破棄されるが、 B<IN_Q_OVERFLOW> "
3591 #: build/C/man7/inotify.7:545
3593 msgid "I</proc/sys/fs/inotify/max_user_instances>"
3594 msgstr "I</proc/sys/fs/inotify/max_user_instances>"
3597 #: build/C/man7/inotify.7:549
3599 "This specifies an upper limit on the number of inotify instances that can be "
3600 "created per real user ID."
3602 "1 つの実ユーザ ID に対して生成できる inotify インスタンスの数の上限を指定す"
3606 #: build/C/man7/inotify.7:549
3608 msgid "I</proc/sys/fs/inotify/max_user_watches>"
3609 msgstr "I</proc/sys/fs/inotify/max_user_watches>"
3612 #: build/C/man7/inotify.7:553
3614 "This specifies an upper limit on the number of watches that can be created "
3616 msgstr "作成可能な監視対象の数の実 UID 単位の上限を指定する。"
3619 #: build/C/man7/inotify.7:561
3621 "Inotify was merged into the 2.6.13 Linux kernel. The required library "
3622 "interfaces were added to glibc in version 2.4. (B<IN_DONT_FOLLOW>, "
3623 "B<IN_MASK_ADD>, and B<IN_ONLYDIR> were added in glibc version 2.5.)"
3625 "inotify は 2.6.13 の Linux カーネルに組込まれた。 これに必要なライブラリのイ"
3626 "ンターフェースは、 glibc のバージョン 2.4 に追加された (B<IN_DONT_FOLLOW>, "
3627 "B<IN_MASK_ADD>, B<IN_ONLYDIR> は glibc バージョン 2.5 で追加された)。"
3630 #: build/C/man7/inotify.7:563
3631 msgid "The inotify API is Linux-specific."
3632 msgstr "inotify API は Linux 独自のものである。"
3635 #: build/C/man7/inotify.7:570
3637 "Inotify file descriptors can be monitored using B<select>(2), B<poll>(2), "
3638 "and B<epoll>(7). When an event is available, the file descriptor indicates "
3641 "inotify ファイルディスクリプターは B<select>(2), B<poll>(2), B<epoll>(7) を"
3642 "使って監視できる。 イベントがある場合、ファイルディスクリプターは読み込み可能"
3646 #: build/C/man7/inotify.7:599
3648 "Since Linux 2.6.25, signal-driven I/O notification is available for inotify "
3649 "file descriptors; see the discussion of B<F_SETFL> (for setting the "
3650 "B<O_ASYNC> flag), B<F_SETOWN>, and B<F_SETSIG> in B<fcntl>(2). The "
3651 "I<siginfo_t> structure (described in B<sigaction>(2)) that is passed to the "
3652 "signal handler has the following fields set: I<si_fd> is set to the inotify "
3653 "file descriptor number; I<si_signo> is set to the signal number; I<si_code> "
3654 "is set to B<POLL_IN>; and B<POLLIN> is set in I<si_band>."
3656 "Linux 2.6.25 以降では、シグナル駆動 (signal-driven) I/O の通知が inotify ファ"
3657 "イルディスクリプターについて利用可能である。 B<fcntl>(2) に書かれている "
3658 "(B<O_ASYNC> フラグを設定するための) B<F_SETFL>, B<F_SETOWN>, B<F_SETSIG> の"
3659 "議論を参照のこと。 シグナルハンドラに渡される I<siginfo_t> 構造体は、以下の"
3660 "フィールドが設定される (I<siginfo_t> は B<sigaction>(2) で説明されている)。 "
3661 "I<si_fd> には inotify ファイルディスクリプター番号が、 I<si_signo> にはシグナ"
3662 "ル番号が、 I<si_code> には B<POLL_IN> が、 I<si_band> には B<POLLIN> が設定さ"
3666 #: build/C/man7/inotify.7:612
3668 "If successive output inotify events produced on the inotify file descriptor "
3669 "are identical (same I<wd>, I<mask>, I<cookie>, and I<name>), then they are "
3670 "coalesced into a single event if the older event has not yet been read (but "
3671 "see BUGS). This reduces the amount of kernel memory required for the event "
3672 "queue, but also means that an application can't use inotify to reliably "
3673 "count file events."
3675 "inotify ファイルディスクリプターに対して 連続して生成される出力 inotify イベ"
3676 "ントが同一の場合 (I<wd>, I<mask>, I<cookie>, I<name> が等しい場合)、 前のイベ"
3677 "ントがまだ読み込まれていなければ、 連続するイベントが 1 つのイベントにまとめ"
3678 "られる (ただし「バグ」の節も参照のこと)。 これによりイベントキューに必要な"
3679 "カーネルメモリ量が減るが、 これはまたアプリケーションがファイルイベント数を信"
3680 "頼性を持って数えるのに inotify を使用できないということでもある。"
3683 #: build/C/man7/inotify.7:618
3685 "The events returned by reading from an inotify file descriptor form an "
3686 "ordered queue. Thus, for example, it is guaranteed that when renaming from "
3687 "one directory to another, events will be produced in the correct order on "
3688 "the inotify file descriptor."
3690 "inotify ファイルディスクリプターの読み込みで返されるイベントは、 順序付けられ"
3691 "たキューになる。 従って、たとえば、あるディレクトリの名前を別の名前に変更した"
3692 "場合、 inotify ファイルディスクリプターについての正しい順番で イベントが生成"
3696 #: build/C/man7/inotify.7:624
3698 "The B<FIONREAD> B<ioctl>(2) returns the number of bytes available to read "
3699 "from an inotify file descriptor."
3701 "B<FIONREAD> B<ioctl>(2) は inotify ファイルディスクリプターから何バイト読み"
3705 #: build/C/man7/inotify.7:631
3707 "The inotify API provides no information about the user or process that "
3708 "triggered the inotify event. In particular, there is no easy way for a "
3709 "process that is monitoring events via inotify to distinguish events that it "
3710 "triggers itself from those that are triggered by other processes."
3712 "inotify API では、inotify イベントが発生するきっかけとなったユーザやプロセス"
3713 "に関する情報は提供されない。とりわけ、inotify 経由でイベントを監視しているプ"
3714 "ロセスが、自分自身がきっかけとなったイベントと他のプロセスがきっかけとなった"
3715 "イベントを区別する簡単な手段はない。"
3718 #: build/C/man7/inotify.7:644
3720 "Inotify reports only events that a user-space program triggers through the "
3721 "filesystem API. As a result, it does not catch remote events that occur on "
3722 "network filesystems. (Applications must fall back to polling the filesystem "
3723 "to catch such events.) Furthermore, various pseudo-filesystems such as I</"
3724 "proc>, I</sys>, and I</dev/pts> are not monitorable with inotify."
3726 "inotify は、ファイルシステム API 経由でユーザー空間プログラムがきっかけとなっ"
3727 "たイベントだけを報告する。 結果として、 inotify はネットワークファイルシステ"
3728 "ムで発生したリモートのイベントを捉えることはできない (このようなイベントを捉"
3729 "えるにはアプリケーションはファイルシステムをポーリングする必要がある)。 さら"
3730 "に、 I</proc>, I</sys>, I</dev/pts> といったいくつかの疑似ファイルシステムは "
3731 "inotify で監視することができない。"
3734 #: build/C/man7/inotify.7:651
3736 "The inotify API does not report file accesses and modifications that may "
3737 "occur because of B<mmap>(2), B<msync>(2), and B<munmap>(2)."
3739 "inotify API は B<mmap>(2), B<msync>(2), B<munmap>(2) により起こったファイルの"
3743 #: build/C/man7/inotify.7:655
3745 "The inotify API identifies affected files by filename. However, by the time "
3746 "an application processes an inotify event, the filename may already have "
3747 "been deleted or renamed."
3749 "inotify API では影響が受けるファイルをファイル名で特定する。\n"
3750 "しかしながら、アプリケーションが inotify イベントを処理する時点では、\n"
3751 "そのファイル名がすでに削除されたり変更されたりしている可能性がある。"
3754 #: build/C/man7/inotify.7:660
3756 "The inotify API identifies events via watch descriptors. It is the "
3757 "application's responsibility to cache a mapping (if one is needed) between "
3758 "watch descriptors and pathnames. Be aware that directory renamings may "
3759 "affect multiple cached pathnames."
3761 "inotify API では監視対象ディスクリプターを通してイベントが区別される。 (必要"
3762 "であれば) 監視対象ディスクリプターとパス名のマッピングをキャッシュしておくの"
3763 "はアプリケーションの役目である。 ディレクトリの名前変更の場合、キャッシュして"
3764 "いる複数のパス名に影響がある点に注意すること。"
3767 #: build/C/man7/inotify.7:665
3769 "Inotify monitoring of directories is not recursive: to monitor "
3770 "subdirectories under a directory, additional watches must be created. This "
3771 "can take a significant amount time for large directory trees."
3773 "inotify によるディレクトリの監視は再帰的に行われない: あるディレクトリ以下"
3775 "サブディレクトリを監視する場合、 監視対象を追加で作成しなければならない。\n"
3776 "大きなディレクトリツリーの場合には、この作業にかなり時間がかかることがある。"
3779 #: build/C/man7/inotify.7:674
3781 "If monitoring an entire directory subtree, and a new subdirectory is created "
3782 "in that tree or an existing directory is renamed into that tree, be aware "
3783 "that by the time you create a watch for the new subdirectory, new files (and "
3784 "subdirectories) may already exist inside the subdirectory. Therefore, you "
3785 "may want to scan the contents of the subdirectory immediately after adding "
3786 "the watch (and, if desired, recursively add watches for any subdirectories "
3787 "that it contains)."
3789 "ディレクトリツリー全体を監視していて、 そのツリー内に新しいサブディレクトリが"
3790 "作成されるか、 既存のディレクトリが名前が変更されそのツリー内に移動した場"
3791 "合、 新しいサブディレクトリに対する watch を作成するまでに、 新しいファイル "
3792 "(やサブディレクトリ) がそのサブディレクトリ内にすでに作成されている場合がある"
3793 "点に注意すること。 したがって、watch を追加した直後にサブディレクトリの内容を"
3794 "スキャンしたいと思う場合もあるだろう (必要ならそのサブディレクトリ内のサブ"
3795 "ディレクトリに対する watch も再帰的に追加することもあるだろう)。"
3798 #: build/C/man7/inotify.7:686
3800 "Note that the event queue can overflow. In this case, events are lost. "
3801 "Robust applications should handle the possibility of lost events "
3802 "gracefully. For example, it may be necessary to rebuild part or all of the "
3803 "application cache. (One simple, but possibly expensive, approach is to "
3804 "close the inotify file descriptor, empty the cache, create a new inotify "
3805 "file descriptor, and then re-create watches and cache entries for the "
3806 "objects to be monitored.)"
3808 "イベントキューはオーバーフローする場合があることに注意すること。 この場合、イ"
3809 "ベントは失なわれる。 ロバスト性が求められるアプリケーションでは、 イベントが"
3810 "失なわれる可能性も含めて適切に処理を行うべきである。 例えば、アプリケーション"
3811 "内のキャッシュの一部分または全てを再構築する必要があるかもしれない。 (単純だ"
3812 "が、おそらくコストがかかる方法は、 inotify ファイルディスクリプターをクローズ"
3813 "し、 キャッシュを空にし、 新しい inotify ファイルディスクリプターを作成し、 "
3814 "監視しているオブジェクトの監視対象ディスクリプターとキャッシュエントリーの再"
3818 #: build/C/man7/inotify.7:686
3820 msgid "Dealing with rename() events"
3821 msgstr "rename() イベントの取り扱い"
3824 #: build/C/man7/inotify.7:695
3826 "As noted above, the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair that is "
3827 "generated by B<rename>(2) can be matched up via their shared cookie value. "
3828 "However, the task of matching has some challenges."
3830 "上述の通り、 B<rename>(2) により生成される B<IN_MOVED_FROM> と "
3831 "B<IN_MOVED_TO> イベントの組は、共有される cookie 値によって対応を取ることがで"
3832 "きる。 しかし、対応を取る場合にはいくつか難しい点がある。"
3835 #: build/C/man7/inotify.7:712
3837 "These two events are usually consecutive in the event stream available when "
3838 "reading from the inotify file descriptor. However, this is not guaranteed. "
3839 "If multiple processes are triggering events for monitored objects, then (on "
3840 "rare occasions) an arbitrary number of other events may appear between the "
3841 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events. Furthermore, it is not "
3842 "guaranteed that the event pair is atomically inserted into the queue: there "
3843 "may be a brief interval where the B<IN_MOVED_FROM> has appeared, but the "
3844 "B<IN_MOVED_TO> has not."
3846 "これらの 2 つのイベントは、 inotify ファイルディスクリプターから読み出しを"
3847 "行った場合に、通常はイベントストリーム内で連続している。 しかしながら、連続し"
3848 "ていることは保証されていない。 複数のプロセスが監視対象オブジェクトでイベント"
3849 "を発生させた場合、 (めったに起こらないことだが) イベント B<IN_MOVED_FROM> と "
3850 "B<IN_MOVED_TO> の間に任意の数の他のイベントがはさまる可能性がある。 さらに、"
3851 "対となるイベントがアトミックにキューに挿入されることも保証されていない。 "
3852 "B<IN_MOVED_FROM> が現れたが B<IN_MOVED_TO> は現れていないという短い期間があり"
3856 #: build/C/man7/inotify.7:737
3858 "Matching up the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair generated by "
3859 "B<rename>(2) is thus inherently racy. (Don't forget that if an object is "
3860 "renamed outside of a monitored directory, there may not even be an "
3861 "B<IN_MOVED_TO> event.) Heuristic approaches (e.g., assume the events are "
3862 "always consecutive) can be used to ensure a match in most cases, but will "
3863 "inevitably miss some cases, causing the application to perceive the "
3864 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events as being unrelated. If watch "
3865 "descriptors are destroyed and re-created as a result, then those watch "
3866 "descriptors will be inconsistent with the watch descriptors in any pending "
3867 "events. (Re-creating the inotify file descriptor and rebuilding the cache "
3868 "may be useful to deal with this scenario.)"
3870 "したがって、 B<rename>(2) により生成された B<IN_MOVED_FROM> と "
3871 "B<IN_MOVED_TO> のイベントの組の対応を取るのは本質的に難しいことである (監視対"
3872 "象のディレクトリの外へオブジェクトの rename が行われた場合には "
3873 "B<IN_MOVED_TO> イベントは存在しさえしないことを忘れてはならない)。 (イベント"
3874 "は常に連続しているとの仮定を置くといった) 発見的な方法を使うと、ほとんどの場"
3875 "合でイベントの組をうまく見つけることができるが、 いくつかの場合に見逃すことが"
3876 "避けられず、 アプリケーションが B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントが"
3877 "無関係だとみなしてしまう可能性がある。 結果的に、監視対象ディスクリプターが破"
3878 "棄され再作成された場合、これらの監視対象ディスクリプターは、処理待ちイベント"
3879 "の監視対象ディスクリプターと一貫性のないものになってしまう (inotify ファイル"
3880 "ディスクリプタの再作成とキャッシュの再構成はこの状況に対処するのに有用な方法"
3884 #: build/C/man7/inotify.7:754
3886 "Applications should also allow for the possibility that the B<IN_MOVED_FROM> "
3887 "event was the last event that could fit in the buffer returned by the "
3888 "current call to B<read>(2), and the accompanying B<IN_MOVED_TO> event might "
3889 "be fetched only on the next B<read>(2), which should be done with a (small) "
3890 "timeout to allow for the fact that insertion of the B<IN_MOVED_FROM>-"
3891 "B<IN_MOVED_TO> event pair is not atomic, and also the possibility that there "
3892 "may not be any B<IN_MOVED_TO> event."
3894 "また、アプリケーションは、 B<IN_MOVED_FROM> イベントが今行った B<read>(2) の"
3895 "呼び出しで返されたバッファーのちょうど一番最後のイベントで、 B<IN_MOVED_TO> "
3896 "イベントは次の B<read>(2) を行わないと取得できない可能性も考慮に入れる必要が"
3897 "ある。 2 つ目の B<read>(2) は (短い) タイムアウトで行うべきである。 これは、 "
3898 "B<IN_MOVED_FROM>-B<IN_MOVED_TO> のイベントペアのキューへの挿入はアトミックで"
3899 "はなく、 また B<IN_MOVED_TO> イベントが全く発生しない可能性もあるという事実を"
3900 "考慮に入れておく必要があるからである。"
3903 #: build/C/man7/inotify.7:758
3905 "As of kernel 3.17, calling B<fallocate>(2) does not create any inotify "
3908 "カーネル 3.17 時点では、 B<fallocate>(2) の呼び出しでは inotify イベントが生"
3911 #. FIXME . kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321
3912 #. implies that unmount events were buggy 2.6.11 to 2.6.36
3914 #: build/C/man7/inotify.7:766
3915 msgid "In kernels before 2.6.16, the B<IN_ONESHOT> I<mask> flag does not work."
3916 msgstr "2.6.16 以前のカーネルでは B<IN_ONESHOT> I<mask> フラグが働かない。"
3919 #: build/C/man7/inotify.7:776
3921 "As originally designed and implemented, the B<IN_ONESHOT> flag did not cause "
3922 "an B<IN_IGNORED> event to be generated when the watch was dropped after one "
3923 "event. However, as an unintended effect of other changes, since Linux "
3924 "2.6.36, an B<IN_IGNORED> event is generated in this case."
3926 "元々は設計/実装時の意図通り、 イベントが一つ発生し watch が削除された際に "
3927 "B<IN_ONESHOT> フラグでは B<IN_IGNORED> イベントが発生しなかった。 しかし、 別"
3928 "の変更での意図していなかった影響により、 Linux 2.6.36 以降では、 この場合に "
3929 "B<IN_IGNORED> イベントが生成される。"
3931 #. commit 1c17d18e3775485bf1e0ce79575eb637a94494a2
3933 #: build/C/man7/inotify.7:785
3935 "Before kernel 2.6.25, the kernel code that was intended to coalesce "
3936 "successive identical events (i.e., the two most recent events could "
3937 "potentially be coalesced if the older had not yet been read) instead "
3938 "checked if the most recent event could be coalesced with the I<oldest> "
3941 "カーネル 2.6.25 より前では、 連続する同一のイベントを一つにまとめることを意図"
3942 "したコード (古い方のイベントがまだ読み込まれていない場合に、 最新の 2 つのイ"
3943 "ベントを一つにまとめられる可能性がある) が、 最新のイベントが「最も古い」読み"
3944 "込まれていないイベントとまとめられるか をチェックするようになっていた。"
3946 #. FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=77111
3948 #: build/C/man7/inotify.7:815
3950 "When a watch descriptor is removed by calling B<inotify_rm_watch>(2) (or "
3951 "because a watch file is deleted or the filesystem that contains it is "
3952 "unmounted), any pending unread events for that watch descriptor remain "
3953 "available to read. As watch descriptors are subsequently allocated with "
3954 "B<inotify_add_watch>(2), the kernel cycles through the range of possible "
3955 "watch descriptors (0 to B<INT_MAX>) incrementally. When allocating a free "
3956 "watch descriptor, no check is made to see whether that watch descriptor "
3957 "number has any pending unread events in the inotify queue. Thus, it can "
3958 "happen that a watch descriptor is reallocated even when pending unread "
3959 "events exist for a previous incarnation of that watch descriptor number, "
3960 "with the result that the application might then read those events and "
3961 "interpret them as belonging to the file associated with the newly recycled "
3962 "watch descriptor. In practice, the likelihood of hitting this bug may be "
3963 "extremely low, since it requires that an application cycle through "
3964 "B<INT_MAX> watch descriptors, release a watch descriptor while leaving "
3965 "unread events for that watch descriptor in the queue, and then recycle that "
3966 "watch descriptor. For this reason, and because there have been no reports "
3967 "of the bug occurring in real-world applications, as of Linux 3.15, no kernel "
3968 "changes have yet been made to eliminate this possible bug."
3970 "B<inotify_rm_watch>(2) の呼び出しにより監視対象ディスクリプターが削除された場"
3971 "合 (なお、監視対象ファイルの削除や監視対象ファイルが含まれるファイルシステム"
3972 "のアンマウントによっても監視対象ディスクリプターは削除される)、 この監視対象"
3973 "ディスクリプター関連の処理待ちの未読み出しイベントは、 読み出し可能なままとな"
3974 "る。 監視対象ディスクリプターは B<inotify_add_watch>(2) によって後で割り当て"
3975 "られるため、 カーネルは利用可能な監視対象ディスクリプターの範囲 (0 から "
3976 "B<INT_MAX>) から昇順にサイクリックに割り当てを行う。未使用の監視対象ディスク"
3977 "リプターを割り当てる際、 その監視対象ディスクリプター番号に inotify キューで"
3978 "処理待ちの未読み出しイベントがあるかの確認は行われない。 したがって、監視対象"
3979 "ディスクリプターが再割り当てされた際に、 その監視対象ディスクリプターの一つ前"
3980 "の使用時に発生した処理待ちの未読み出しイベントが存在するということが起こりう"
3981 "る。 その結果、アプリケーションはこれらのイベントを読み出す可能性があり、 こ"
3982 "れらのイベントが新しく再利用された監視対象ディスクリプターに関連付けられた"
3983 "ファイルに属するものかを解釈する必要が出て来る。 実際のところ、このバグを踏む"
3984 "可能性は極めて低い。 それは、このバグを踏むためには、アプリケーションが "
3985 "B<INT_MAX> 個の監視対象ディスクリプターが一周させて、 キューに未読み出しイベ"
3986 "ントが残っている監視対象ディスクリプターを解放し、 その監視対象ディスクリプ"
3987 "ターを再利用する必要があるからである。 この理由と、実世界のアプリケーションで"
3988 "発生したというバグ報告がないことから、 Linux 3.15 時点では、この計算上は起こ"
3989 "りうるバグを取り除くためのカーネルの変更は行われていない。"
3992 #: build/C/man7/inotify.7:823
3994 "The following program demonstrates the usage of the inotify API. It marks "
3995 "the directories passed as a command-line arguments and waits for events of "
3996 "type B<IN_OPEN>, B<IN_CLOSE_NOWRITE> and B<IN_CLOSE_WRITE>."
3998 "以下のプログラムは inotify API の使用例を示したものである。 コマンドライン引"
3999 "き数で渡されたディレクトリに印を付け、 タイプが B<IN_OPEN>, "
4000 "B<IN_CLOSE_NOWRITE> B<IN_CLOSE_WRITE> のイベントを待つ。"
4003 #: build/C/man7/inotify.7:838
4005 "The following output was recorded while editing the file I</home/user/temp/"
4006 "foo> and listing directory I</tmp>. Before the file and the directory were "
4007 "opened, B<IN_OPEN> events occurred. After the file was closed, an "
4008 "B<IN_CLOSE_WRITE> event occurred. After the directory was closed, an "
4009 "B<IN_CLOSE_NOWRITE> event occurred. Execution of the program ended when the "
4010 "user pressed the ENTER key."
4012 "以下は、 ファイル I</home/user/temp/foo> を編集し、 ディレクトリ I</tmp> の一"
4013 "覧表示を行った場合の出力である。 対象のファイルとディレクトリがオープンされる"
4014 "前に、イベント B<IN_OPEN> が発生している。 対象ファイルがクローズされた後にイ"
4015 "ベント B<IN_CLOSE_WRITE> が発生している。 対象ディレクトリがクローズされた後"
4016 "にイベント B<IN_CLOSE_NOWRITE> が発生している。 ユーザーが ENTER キーを押する"
4020 #: build/C/man7/inotify.7:848
4023 "$ B<./a.out /tmp /home/user/temp>\n"
4024 "Press enter key to terminate.\n"
4025 "Listening for events.\n"
4026 "IN_OPEN: /home/user/temp/foo [file]\n"
4027 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
4028 "IN_OPEN: /tmp/ [directory]\n"
4029 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
4031 "$ B<./a.out /tmp /home/user/temp>\n"
4032 "Press enter key to terminate.\n"
4033 "Listening for events.\n"
4034 "IN_OPEN: /home/user/temp/foo [file]\n"
4035 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
4036 "IN_OPEN: /tmp/ [directory]\n"
4037 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
4040 #: build/C/man7/inotify.7:860
4043 "#include E<lt>errno.hE<gt>\n"
4044 "#include E<lt>poll.hE<gt>\n"
4045 "#include E<lt>stdio.hE<gt>\n"
4046 "#include E<lt>stdlib.hE<gt>\n"
4047 "#include E<lt>sys/inotify.hE<gt>\n"
4048 "#include E<lt>unistd.hE<gt>\n"
4050 "#include E<lt>errno.hE<gt>\n"
4051 "#include E<lt>poll.hE<gt>\n"
4052 "#include E<lt>stdio.hE<gt>\n"
4053 "#include E<lt>stdlib.hE<gt>\n"
4054 "#include E<lt>sys/inotify.hE<gt>\n"
4055 "#include E<lt>unistd.hE<gt>\n"
4058 #: build/C/man7/inotify.7:866
4061 "/* Read all available inotify events from the file descriptor 'fd'.\n"
4062 " wd is the table of watch descriptors for the directories in argv.\n"
4063 " argc is the length of wd and argv.\n"
4064 " argv is the list of watched directories.\n"
4065 " Entry 0 of wd and argv is unused. */\n"
4067 "/* Read all available inotify events from the file descriptor 'fd'.\n"
4068 " wd is the table of watch descriptors for the directories in argv.\n"
4069 " argc is the length of wd and argv.\n"
4070 " argv is the list of watched directories.\n"
4071 " Entry 0 of wd and argv is unused. */\n"
4074 #: build/C/man7/inotify.7:875
4078 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
4080 " /* Some systems cannot read integer variables if they are not\n"
4081 " properly aligned. On other systems, incorrect alignment may\n"
4082 " decrease performance. Hence, the buffer used for reading from\n"
4083 " the inotify file descriptor should have the same alignment as\n"
4084 " struct inotify_event. */\n"
4087 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
4089 " /* Some systems cannot read integer variables if they are not\n"
4090 " properly aligned. On other systems, incorrect alignment may\n"
4091 " decrease performance. Hence, the buffer used for reading from\n"
4092 " the inotify file descriptor should have the same alignment as\n"
4093 " struct inotify_event. */\n"
4096 #: build/C/man7/inotify.7:882
4100 " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
4101 " const struct inotify_event *event;\n"
4107 " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
4108 " const struct inotify_event *event;\n"
4114 #: build/C/man7/inotify.7:884
4116 msgid " /* Loop while events can be read from inotify file descriptor. */\n"
4117 msgstr " /* Loop while events can be read from inotify file descriptor. */\n"
4120 #: build/C/man7/inotify.7:886
4122 msgid " for (;;) {\n"
4123 msgstr " for (;;) {\n"
4126 #: build/C/man7/inotify.7:888
4128 msgid " /* Read some events. */\n"
4129 msgstr " /* Read some events. */\n"
4132 #: build/C/man7/inotify.7:894
4135 " len = read(fd, buf, sizeof buf);\n"
4136 " if (len == -1 && errno != EAGAIN) {\n"
4137 " perror(\"read\");\n"
4138 " exit(EXIT_FAILURE);\n"
4141 " len = read(fd, buf, sizeof buf);\n"
4142 " if (len == -1 && errno != EAGAIN) {\n"
4143 " perror(\"read\");\n"
4144 " exit(EXIT_FAILURE);\n"
4148 #: build/C/man7/inotify.7:898
4151 " /* If the nonblocking read() found no events to read, then\n"
4152 " it returns -1 with errno set to EAGAIN. In that case,\n"
4153 " we exit the loop. */\n"
4155 " /* If the nonblocking read() found no events to read, then\n"
4156 " it returns -1 with errno set to EAGAIN. In that case,\n"
4157 " we exit the loop. */\n"
4160 #: build/C/man7/inotify.7:906
4163 " for (ptr = buf; ptr E<lt> buf + len;\n"
4164 " ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
4166 " for (ptr = buf; ptr E<lt> buf + len;\n"
4167 " ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
4170 #: build/C/man7/inotify.7:908
4172 msgid " event = (const struct inotify_event *) ptr;\n"
4173 msgstr " event = (const struct inotify_event *) ptr;\n"
4176 #: build/C/man7/inotify.7:910
4178 msgid " /* Print event type */\n"
4179 msgstr " /* Print event type */\n"
4182 #: build/C/man7/inotify.7:917
4185 " if (event-E<gt>mask & IN_OPEN)\n"
4186 " printf(\"IN_OPEN: \");\n"
4187 " if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
4188 " printf(\"IN_CLOSE_NOWRITE: \");\n"
4189 " if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
4190 " printf(\"IN_CLOSE_WRITE: \");\n"
4192 " if (event-E<gt>mask & IN_OPEN)\n"
4193 " printf(\"IN_OPEN: \");\n"
4194 " if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
4195 " printf(\"IN_CLOSE_NOWRITE: \");\n"
4196 " if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
4197 " printf(\"IN_CLOSE_WRITE: \");\n"
4200 #: build/C/man7/inotify.7:919
4202 msgid " /* Print the name of the watched directory */\n"
4203 msgstr " /* Print the name of the watched directory */\n"
4206 #: build/C/man7/inotify.7:926
4209 " for (i = 1; i E<lt> argc; ++i) {\n"
4210 " if (wd[i] == event-E<gt>wd) {\n"
4211 " printf(\"%s/\", argv[i]);\n"
4216 " for (i = 1; i E<lt> argc; ++i) {\n"
4217 " if (wd[i] == event-E<gt>wd) {\n"
4218 " printf(\"%s/\", argv[i]);\n"
4224 #: build/C/man7/inotify.7:928
4226 msgid " /* Print the name of the file */\n"
4227 msgstr " /* Print the name of the file */\n"
4230 #: build/C/man7/inotify.7:931
4233 " if (event-E<gt>len)\n"
4234 " printf(\"%s\", event-E<gt>name);\n"
4236 " if (event-E<gt>len)\n"
4237 " printf(\"%s\", event-E<gt>name);\n"
4240 #: build/C/man7/inotify.7:933
4242 msgid " /* Print type of filesystem object */\n"
4243 msgstr " /* Print type of filesystem object */\n"
4246 #: build/C/man7/inotify.7:941
4249 " if (event-E<gt>mask & IN_ISDIR)\n"
4250 " printf(\" [directory]\\en\");\n"
4252 " printf(\" [file]\\en\");\n"
4257 " if (event-E<gt>mask & IN_ISDIR)\n"
4258 " printf(\" [directory]\\en\");\n"
4260 " printf(\" [file]\\en\");\n"
4266 #: build/C/man7/inotify.7:950
4270 "main(int argc, char* argv[])\n"
4273 " int fd, i, poll_num;\n"
4276 " struct pollfd fds[2];\n"
4279 "main(int argc, char* argv[])\n"
4282 " int fd, i, poll_num;\n"
4285 " struct pollfd fds[2];\n"
4288 #: build/C/man7/inotify.7:955
4291 " if (argc E<lt> 2) {\n"
4292 " printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
4293 " exit(EXIT_FAILURE);\n"
4296 " if (argc E<lt> 2) {\n"
4297 " printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
4298 " exit(EXIT_FAILURE);\n"
4302 #: build/C/man7/inotify.7:957
4304 msgid " printf(\"Press ENTER key to terminate.\\en\");\n"
4305 msgstr " printf(\"Press ENTER key to terminate.\\en\");\n"
4308 #: build/C/man7/inotify.7:959
4310 msgid " /* Create the file descriptor for accessing the inotify API */\n"
4311 msgstr " /* Create the file descriptor for accessing the inotify API */\n"
4314 #: build/C/man7/inotify.7:965
4317 " fd = inotify_init1(IN_NONBLOCK);\n"
4318 " if (fd == -1) {\n"
4319 " perror(\"inotify_init1\");\n"
4320 " exit(EXIT_FAILURE);\n"
4323 " fd = inotify_init1(IN_NONBLOCK);\n"
4324 " if (fd == -1) {\n"
4325 " perror(\"inotify_init1\");\n"
4326 " exit(EXIT_FAILURE);\n"
4330 #: build/C/man7/inotify.7:967
4332 msgid " /* Allocate memory for watch descriptors */\n"
4333 msgstr " /* Allocate memory for watch descriptors */\n"
4336 #: build/C/man7/inotify.7:973
4339 " wd = calloc(argc, sizeof(int));\n"
4340 " if (wd == NULL) {\n"
4341 " perror(\"calloc\");\n"
4342 " exit(EXIT_FAILURE);\n"
4345 " wd = calloc(argc, sizeof(int));\n"
4346 " if (wd == NULL) {\n"
4347 " perror(\"calloc\");\n"
4348 " exit(EXIT_FAILURE);\n"
4352 #: build/C/man7/inotify.7:977
4355 " /* Mark directories for events\n"
4356 " - file was opened\n"
4357 " - file was closed */\n"
4359 " /* Mark directories for events\n"
4360 " - file was opened\n"
4361 " - file was closed */\n"
4364 #: build/C/man7/inotify.7:987
4367 " for (i = 1; i E<lt> argc; i++) {\n"
4368 " wd[i] = inotify_add_watch(fd, argv[i],\n"
4369 " IN_OPEN | IN_CLOSE);\n"
4370 " if (wd[i] == -1) {\n"
4371 " fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4372 " perror(\"inotify_add_watch\");\n"
4373 " exit(EXIT_FAILURE);\n"
4377 " for (i = 1; i E<lt> argc; i++) {\n"
4378 " wd[i] = inotify_add_watch(fd, argv[i],\n"
4379 " IN_OPEN | IN_CLOSE);\n"
4380 " if (wd[i] == -1) {\n"
4381 " fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4382 " perror(\"inotify_add_watch\");\n"
4383 " exit(EXIT_FAILURE);\n"
4388 #: build/C/man7/inotify.7:998
4390 msgid " /* Inotify input */\n"
4391 msgstr " /* Inotify input */\n"
4394 #: build/C/man7/inotify.7:1003
4396 msgid " /* Wait for events and/or terminal input */\n"
4397 msgstr " /* Wait for events and/or terminal input */\n"
4400 #: build/C/man7/inotify.7:1013
4403 " printf(\"Listening for events.\\en\");\n"
4405 " poll_num = poll(fds, nfds, -1);\n"
4406 " if (poll_num == -1) {\n"
4407 " if (errno == EINTR)\n"
4409 " perror(\"poll\");\n"
4410 " exit(EXIT_FAILURE);\n"
4413 " printf(\"Listening for events.\\en\");\n"
4415 " poll_num = poll(fds, nfds, -1);\n"
4416 " if (poll_num == -1) {\n"
4417 " if (errno == EINTR)\n"
4419 " perror(\"poll\");\n"
4420 " exit(EXIT_FAILURE);\n"
4424 #: build/C/man7/inotify.7:1015
4426 msgid " if (poll_num E<gt> 0) {\n"
4427 msgstr " if (poll_num E<gt> 0) {\n"
4430 #: build/C/man7/inotify.7:1017
4432 msgid " if (fds[0].revents & POLLIN) {\n"
4433 msgstr " if (fds[0].revents & POLLIN) {\n"
4436 #: build/C/man7/inotify.7:1019
4438 msgid " /* Console input is available. Empty stdin and quit */\n"
4439 msgstr " /* Console input is available. Empty stdin and quit */\n"
4442 #: build/C/man7/inotify.7:1028
4444 msgid " /* Inotify events are available */\n"
4445 msgstr " /* Inotify events are available */\n"
4448 #: build/C/man7/inotify.7:1033
4451 " handle_events(fd, wd, argc, argv);\n"
4456 " handle_events(fd, wd, argc, argv);\n"
4462 #: build/C/man7/inotify.7:1035
4464 msgid " printf(\"Listening for events stopped.\\en\");\n"
4465 msgstr " printf(\"Listening for events stopped.\\en\");\n"
4468 #: build/C/man7/inotify.7:1037
4470 msgid " /* Close inotify file descriptor */\n"
4471 msgstr " /* Close inotify file descriptor */\n"
4474 #: build/C/man7/inotify.7:1039
4476 msgid " close(fd);\n"
4477 msgstr " close(fd);\n"
4480 #: build/C/man7/inotify.7:1043
4484 " exit(EXIT_SUCCESS);\n"
4488 " exit(EXIT_SUCCESS);\n"
4492 #: build/C/man7/inotify.7:1054
4494 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4495 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4496 "B<stat>(2), B<fanotify>(7)"
4498 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4499 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4500 "B<stat>(2), B<fanotify>(7)"
4503 #: build/C/man7/inotify.7:1057
4505 "I<Documentation/filesystems/inotify.txt> in the Linux kernel source tree"
4506 msgstr "Linux カーネルソース内の I<Documentation/filesystems/inotify.txt>"
4509 #: build/C/man2/inotify_add_watch.2:28
4511 msgid "INOTIFY_ADD_WATCH"
4512 msgstr "INOTIFY_ADD_WATCH"
4515 #: build/C/man2/inotify_add_watch.2:28
4521 #: build/C/man2/inotify_add_watch.2:31
4522 msgid "inotify_add_watch - add a watch to an initialized inotify instance"
4524 "inotify_add_watch - 初期化済み inotify インスタンスに監視対象を追加する"
4527 #: build/C/man2/inotify_add_watch.2:33 build/C/man2/inotify_rm_watch.2:32
4528 msgid "B<#include E<lt>sys/inotify.hE<gt>>"
4529 msgstr "B<#include E<lt>sys/inotify.hE<gt>>"
4532 #: build/C/man2/inotify_add_watch.2:35
4534 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4537 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4541 #: build/C/man2/inotify_add_watch.2:54
4543 "B<inotify_add_watch>() adds a new watch, or modifies an existing watch, for "
4544 "the file whose location is specified in I<pathname>; the caller must have "
4545 "read permission for this file. The I<fd> argument is a file descriptor "
4546 "referring to the inotify instance whose watch list is to be modified. The "
4547 "events to be monitored for I<pathname> are specified in the I<mask> bit-mask "
4548 "argument. See B<inotify>(7) for a description of the bits that can be set "
4551 "B<inotify_add_watch>() は、 I<pathname> で指定された位置にあるファイルを監視"
4552 "する監視アイテム (watch) の新規追加、 または既存の監視アイテムの変更を行う。 "
4553 "呼び出し元は、監視対象のファイルに対する読み出し許可を 持っていなければならな"
4554 "い。 I<fd> 引き数は、変更を行う監視対象リスト (watch list) を持つ inotify イ"
4555 "ンスタンスを参照するファイルディスクリプターである。 I<pathname> のどのイベン"
4556 "トを監視するかは、引き数のビットマスク I<mask> で指定する。 I<mask> に設定で"
4557 "きるビットの説明については B<inotify>(7) を参照のこと。"
4560 #: build/C/man2/inotify_add_watch.2:66
4562 "A successful call to B<inotify_add_watch>() returns a unique watch "
4563 "descriptor for this inotify instance, for the filesystem object that "
4564 "corresponds to I<pathname>. If the filesystem object was not previously "
4565 "being watched by this inotify instance, then the watch descriptor is newly "
4566 "allocated. If the filesystem object was already being watched (perhaps via "
4567 "a different link to the same object), then the descriptor for the existing "
4568 "watch is returned."
4570 "B<inotify_add_watch>() の呼び出しが成功すると、 I<pathname> に対応するファイ"
4571 "ルシステムオブジェクトに対する、 一意な監視対象ディスクリプター (watch "
4572 "descriptor) を、 対象の inotify インスタンスに対して返す。 そのファイルシステ"
4573 "ムオブジェクトが対象の inotify インスタンスによって以前に監視されていない場合"
4574 "には、 監視対象ディスクリプターは新規に割り当てられる。 ファイルシステムオブ"
4575 "ジェクトが (おそらく同じオブジェクトに対する異なるリンク経由で) すでに監視さ"
4576 "れている場合には、 既存の監視に対するディスクリプターが返される。"
4579 #: build/C/man2/inotify_add_watch.2:77
4581 "The watch descriptor is returned by later B<read>(2)s from the inotify file "
4582 "descriptor. These reads fetch I<inotify_event> structures (see "
4583 "B<inotify>(7)) indicating filesystem events; the watch descriptor inside "
4584 "this structure identifies the object for which the event occurred."
4586 "これ以降に inotify ファイルディスクリプターから B<read>(2) を行うと、監視対"
4587 "象ディスクリプターが返される。 これらの B<read>() を行うと、ファイルシステム"
4588 "イベントを示す I<inotify_event> 構造体が読み出される (B<inotify>(7) 参照)。"
4589 "この構造体内の監視対象ディスクリプターにより、 どのオブジェクトでそのイベント"
4593 #: build/C/man2/inotify_add_watch.2:84
4595 "On success, B<inotify_add_watch>() returns a nonnegative watch descriptor. "
4596 "On error, -1 is returned and I<errno> is set appropriately."
4598 "成功すると、 B<inotify_add_watch>() は非負の監視対象ディスクリプターを返"
4599 "す。 エラーの場合、-1 を返し、 I<errno> を適切に設定する。"
4602 #: build/C/man2/inotify_add_watch.2:85
4608 #: build/C/man2/inotify_add_watch.2:88
4609 msgid "Read access to the given file is not permitted."
4610 msgstr "指定されたファイルに対する読み出しアクセスが許可されていない。"
4613 #: build/C/man2/inotify_add_watch.2:91
4614 msgid "The given file descriptor is not valid."
4615 msgstr "指定されたファイルディスクリプターが有効ではない。"
4618 #: build/C/man2/inotify_add_watch.2:91
4624 #: build/C/man2/inotify_add_watch.2:95
4625 msgid "I<pathname> points outside of the process's accessible address space."
4627 "I<pathname> が指すアドレスがプロセスがアクセスできるアドレス空間外である。"
4630 #: build/C/man2/inotify_add_watch.2:100
4632 "The given event mask contains no valid events; or I<fd> is not an inotify "
4635 "指定されたイベントマスクに有効なイベントが含まれていない。 もしくは I<fd> が "
4636 "inotify ファイルディスクリプターではない。"
4639 #: build/C/man2/inotify_add_watch.2:100
4641 msgid "B<ENAMETOOLONG>"
4642 msgstr "B<ENAMETOOLONG>"
4645 #: build/C/man2/inotify_add_watch.2:104
4646 msgid "I<pathname> is too long."
4647 msgstr "I<pathname> が長過ぎる。"
4650 #: build/C/man2/inotify_add_watch.2:109
4652 "A directory component in I<pathname> does not exist or is a dangling "
4655 "I<pathname> のディレクトリ部分の構成要素が、存在しないか、\n"
4656 "リンク切れのシンボリックリンクである。"
4659 #: build/C/man2/inotify_add_watch.2:112
4660 msgid "Insufficient kernel memory was available."
4661 msgstr "カーネルメモリが十分になかった。"
4664 #: build/C/man2/inotify_add_watch.2:116
4666 "The user limit on the total number of inotify watches was reached or the "
4667 "kernel failed to allocate a needed resource."
4669 "inotify 監視対象の総数がユーザが追加できる上限に達していた。 もしくは、必要な"
4670 "資源の割り当てにカーネルが失敗した。"
4673 #: build/C/man2/inotify_add_watch.2:118 build/C/man2/inotify_rm_watch.2:69
4674 msgid "Inotify was merged into the 2.6.13 Linux kernel."
4675 msgstr "inotify は Linux カーネル 2.6.13 に組み込まれた。"
4678 #: build/C/man2/inotify_add_watch.2:124
4679 msgid "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4680 msgstr "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4683 #: build/C/man2/inotify_init.2:29
4685 msgid "INOTIFY_INIT"
4686 msgstr "INOTIFY_INIT"
4689 #: build/C/man2/inotify_init.2:29
4695 #: build/C/man2/inotify_init.2:32
4696 msgid "inotify_init, inotify_init1 - initialize an inotify instance"
4697 msgstr "inotify_init, inotify_init1 - inotify インスタンスを初期化する"
4700 #: build/C/man2/inotify_init.2:35
4702 msgid "B<#include E<lt>sys/inotify.hE<gt>>\n"
4703 msgstr "B<#include E<lt>sys/inotify.hE<gt>>\n"
4706 #: build/C/man2/inotify_init.2:38
4709 "B<int inotify_init(void);>\n"
4710 "B<int inotify_init1(int >I<flags>B<);>\n"
4712 "B<int inotify_init(void);>\n"
4713 "B<int inotify_init1(int >I<flags>B<);>\n"
4716 #: build/C/man2/inotify_init.2:42
4717 msgid "For an overview of the inotify API, see B<inotify>(7)."
4718 msgstr "inotify API の概要については B<inotify>(7) を参照。"
4721 #: build/C/man2/inotify_init.2:46
4723 "B<inotify_init>() initializes a new inotify instance and returns a file "
4724 "descriptor associated with a new inotify event queue."
4726 "B<inotify_init>() は、新規の inotify インスタンスを初期化し、作成された "
4727 "inotify イベントキュー に対応するファイルディスクリプターを返す。"
4730 #: build/C/man2/inotify_init.2:56
4732 "If I<flags> is 0, then B<inotify_init1>() is the same as "
4733 "B<inotify_init>(). The following values can be bitwise ORed in I<flags> to "
4734 "obtain different behavior:"
4736 "B<inotify_init1>() は、 I<flags> が 0 の場合、 B<inotify_init>() と同じであ"
4737 "る。 I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作"
4741 #: build/C/man2/inotify_init.2:56
4743 msgid "B<IN_NONBLOCK>"
4744 msgstr "B<IN_NONBLOCK>"
4747 #: build/C/man2/inotify_init.2:64
4749 "Set the B<O_NONBLOCK> file status flag on the new open file description. "
4750 "Using this flag saves extra calls to B<fcntl>(2) to achieve the same result."
4752 "新しく生成されるオープンファイル記述 (open file description) の BR "
4753 "O_NONBLOCK ファイルステータスフラグをセットする。 このフラグを使うことで、 "
4754 "B<O_NONBLOCK> をセットするために B<fcntl>(2) を追加で呼び出す必要がなくな"
4758 #: build/C/man2/inotify_init.2:64
4760 msgid "B<IN_CLOEXEC>"
4761 msgstr "B<IN_CLOEXEC>"
4764 #: build/C/man2/inotify_init.2:74
4766 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
4767 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
4770 "新しいファイルディスクリプターに対して close-on-exec (B<FD_CLOEXEC>) フラグ"
4771 "をセットする。 このフラグが役に立つ理由については、 B<open>(2) の "
4772 "B<O_CLOEXEC> フラグの説明を参照のこと。"
4775 #: build/C/man2/inotify_init.2:79
4777 "On success, these system calls return a new file descriptor. On error, -1 "
4778 "is returned, and I<errno> is set to indicate the error."
4780 "成功すると、これらのシステムコールは新しいファイルディスクリプターを返す。 エ"
4781 "ラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
4784 #: build/C/man2/inotify_init.2:85
4785 msgid "(B<inotify_init1>()) An invalid value was specified in I<flags>."
4786 msgstr "(B<inotify_init1>()) 無効な値が I<flags> に指定された。"
4789 #: build/C/man2/inotify_init.2:88
4791 "The user limit on the total number of inotify instances has been reached."
4792 msgstr "inotify インスタンスの総数がユーザ単位の上限に達していた。"
4795 #: build/C/man2/inotify_init.2:91
4797 "The system limit on the total number of file descriptors has been reached."
4798 msgstr "inotify ファイルディスクリプターの総数がシステムの上限に達していた。"
4801 #: build/C/man2/inotify_init.2:94
4802 msgid "Insufficient kernel memory is available."
4803 msgstr "カーネルメモリが十分になかった。"
4806 #: build/C/man2/inotify_init.2:101
4808 "B<inotify_init>() first appeared in Linux 2.6.13; library support was added "
4809 "to glibc in version 2.4. B<inotify_init1>() was added in Linux 2.6.27; "
4810 "library support was added to glibc in version 2.9."
4812 "B<inotify_init>() は Linux 2.6.13 で初めて登場し、\n"
4813 "ライブラリによるサポートは glibc バージョン 2.4 で追加された。\n"
4814 "B<inotify_init1>() は Linux 2.6.27 で追加され、\n"
4815 "ライブラリによるサポートは glibc バージョン 2.9 で追加された。"
4818 #: build/C/man2/inotify_init.2:103
4819 msgid "These system calls are Linux-specific."
4820 msgstr "これらのシステムコールは Linux 独自である。"
4823 #: build/C/man2/inotify_init.2:107
4824 msgid "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4825 msgstr "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4828 #: build/C/man2/inotify_rm_watch.2:27
4830 msgid "INOTIFY_RM_WATCH"
4831 msgstr "INOTIFY_RM_WATCH"
4834 #: build/C/man2/inotify_rm_watch.2:27
4840 #: build/C/man2/inotify_rm_watch.2:30
4841 msgid "inotify_rm_watch - remove an existing watch from an inotify instance"
4843 "inotify_rm_watch - inotify インスタンスから既存の監視アイテムを削除する"
4845 #. Before glibc 2.10, the second argument was types as uint32_t.
4846 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
4848 #: build/C/man2/inotify_rm_watch.2:36
4849 msgid "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4850 msgstr "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4853 #: build/C/man2/inotify_rm_watch.2:42
4855 "B<inotify_rm_watch>() removes the watch associated with the watch "
4856 "descriptor I<wd> from the inotify instance associated with the file "
4859 "B<inotify_rm_watch>() は、監視対象ディスクリプター (watch descriptor) "
4860 "I<wd> に対応する監視アイテムを、 ファイルディスクリプター I<fd> に対応する "
4861 "inotify インスタンスから削除する。"
4864 #: build/C/man2/inotify_rm_watch.2:48
4866 "Removing a watch causes an B<IN_IGNORED> event to be generated for this "
4867 "watch descriptor. (See B<inotify>(7).)"
4869 "監視対象を削除すると、 この監視対象ディスクリプターに対して B<IN_IGNORED> イ"
4870 "ベントが生成される (B<inotify>(7) 参照)。"
4873 #: build/C/man2/inotify_rm_watch.2:55
4875 "On success, B<inotify_rm_watch>() returns zero. On error, -1 is returned "
4876 "and I<errno> is set to indicate the cause of the error."
4878 "成功すると、B<inotify_rm_watch>() は 0 を返す。 エラーの場合、-1 を返し、 "
4879 "I<errno> をエラーの原因を示す値に設定する。"
4882 #: build/C/man2/inotify_rm_watch.2:60
4883 msgid "I<fd> is not a valid file descriptor."
4884 msgstr "I<fd> が有効なファイルディスクリプターではない。"
4887 #: build/C/man2/inotify_rm_watch.2:67
4889 "The watch descriptor I<wd> is not valid; or I<fd> is not an inotify file "
4892 "監視対象ディスクリプター I<wd> が有効でない。もしくは、 I<fd> が inotify ファ"
4896 #: build/C/man2/inotify_rm_watch.2:75
4897 msgid "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"
4898 msgstr "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"
4901 #~ "Add (OR) events to watch mask for this pathname if it already exists "
4902 #~ "(instead of replacing mask)."
4904 #~ "I<pathname> に対する監視マスクが既に存在する場合、 (マスクの置き換えではな"
4905 #~ "く) イベントを追加 (OR) する。"