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-02-04 23:30+0900\n"
10 "PO-Revision-Date: 2015-01-25 07:22+0900\n"
11 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12 "Language-Team: LANGUAGE <LL@li.org>\n"
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
1768 #| "This page is part of release 3.78 of the Linux I<man-pages> project. A "
1769 #| "description of the project, information about reporting bugs, and the "
1770 #| "latest version of this page, can be found at \\%http://www.kernel.org/doc/"
1773 "This page is part of release 3.79 of the Linux I<man-pages> project. A "
1774 "description of the project, information about reporting bugs, and the latest "
1775 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
1778 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.78 の一部\n"
1779 "である。プロジェクトの説明とバグ報告に関する情報は\n"
1780 "http://www.kernel.org/doc/man-pages/ に書かれている。"
1783 #: build/C/man2/fanotify_init.2:24
1785 msgid "FANOTIFY_INIT"
1786 msgstr "FANOTIFY_INIT"
1789 #: build/C/man2/fanotify_init.2:24 build/C/man2/fanotify_mark.2:24
1795 #: build/C/man2/fanotify_init.2:27
1796 msgid "fanotify_init - create and initialize fanotify group"
1797 msgstr "fanotify_init - fanotify グループを作成し、初期化する"
1800 #: build/C/man2/fanotify_init.2:27 build/C/man2/fanotify_mark.2:28
1801 #: build/C/man2/inotify_add_watch.2:31 build/C/man2/inotify_init.2:32
1802 #: build/C/man2/inotify_rm_watch.2:30
1808 #: build/C/man2/fanotify_init.2:29
1809 msgid "B<#include E<lt>fcntl.hE<gt>>"
1810 msgstr "B<#include E<lt>fcntl.hE<gt>>"
1813 #: build/C/man2/fanotify_init.2:31
1814 msgid "B<#include E<lt>sys/fanotify.hE<gt>>"
1815 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>"
1818 #: build/C/man2/fanotify_init.2:33
1820 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1821 ">I<event_f_flags>B<);>"
1823 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1824 ">I<event_f_flags>B<);>"
1827 #: build/C/man2/fanotify_init.2:36 build/C/man2/fanotify_mark.2:39
1828 msgid "For an overview of the fanotify API, see B<fanotify>(7)."
1829 msgstr "fanotify API の概要については B<fanotify>(7) を参照。"
1832 #: build/C/man2/fanotify_init.2:40
1834 "B<fanotify_init>() initializes a new fanotify group and returns a file "
1835 "descriptor for the event queue associated with the group."
1837 "B<fanotify_init>() は新しい fanotify グループを初期化し、 このグループに関連"
1838 "付けられたイベントキューに対するファイルディスクリプターを返す。"
1841 #: build/C/man2/fanotify_init.2:51
1843 "The file descriptor is used in calls to B<fanotify_mark>(2) to specify the "
1844 "files, directories, and mounts for which fanotify events shall be created. "
1845 "These events are received by reading from the file descriptor. Some events "
1846 "are only informative, indicating that a file has been accessed. Other "
1847 "events can be used to determine whether another application is permitted to "
1848 "access a file or directory. Permission to access filesystem objects is "
1849 "granted by writing to the file descriptor."
1851 "このファイルディスクリプターは、 B<fanotify_mark>(2) の呼び出しで fanotify イ"
1852 "ベントが作成されるファイル、 ディレクトリ、 マウントを指定するのに使用でき"
1853 "る。 B<fanotify_mark>(2) で指定したファイル、 これらのイベントは、 このファイ"
1854 "ルディスクリプターからの読み出しで受信する。 いくつかのイベントは、 ファイル"
1855 "がアクセスされたことを示す単なる情報である。 他のいくつかのイベントは、 別の"
1856 "アプリケーションがファイルやディレクトリにアクセスする許可を与えるかを判定す"
1857 "るのに使用される。 ファイルシステムオブジェクトへのアクセス許可イベントについ"
1858 "ては、 承認結果をこのファイルディスクリプターに書き込む。"
1861 #: build/C/man2/fanotify_init.2:54
1863 "Multiple programs may be using the fanotify interface at the same time to "
1864 "monitor the same files."
1866 "複数のプログラムが同時に fanotify インターフェースを使って同じファイルを同時"
1870 #: build/C/man2/fanotify_init.2:58
1872 "In the current implementation, the number of fanotify groups per user is "
1873 "limited to 128. This limit cannot be overridden."
1875 "現在の実装では、 ユーザーあたりの fanotify グループ数は 128 に制限されてい"
1876 "る。 この制限は上書きすることができない。"
1879 #: build/C/man2/fanotify_init.2:67
1881 "Calling B<fanotify_init>() requires the B<CAP_SYS_ADMIN> capability. This "
1882 "constraint might be relaxed in future versions of the API. Therefore, "
1883 "certain additional capability checks have been implemented as indicated "
1886 "B<fanotify_init>() を呼び出すには B<CAP_SYS_ADMIN> ケーパビリティーが必要であ"
1887 "る。 この制約は将来のバージョンの API で緩和される可能性がある。 そのため、 "
1888 "以下に示すケーパビリティーチェックのいくつかが実装されている。"
1891 #: build/C/man2/fanotify_init.2:73
1893 "The I<flags> argument contains a multi-bit field defining the notification "
1894 "class of the listening application and further single bit fields specifying "
1895 "the behavior of the file descriptor."
1897 "I<flags> 引き数は、 イベントを待つアプリケーションの通知クラスを定義する複数"
1898 "ビットのフィールドである。 これに加えて、 このファイルディスクリプターの動作"
1899 "を示す 1 ビットのフィールドがある。"
1902 #: build/C/man2/fanotify_init.2:77
1904 "If multiple listeners for permission events exist, the notification class is "
1905 "used to establish the sequence in which the listeners receive the events."
1907 "アクセス許可イベントを監視しているプログラムが複数いる場合、 通知クラスを使っ"
1908 "て監視するプログラムのイベント受信順序が管理される。"
1911 #: build/C/man2/fanotify_init.2:80
1913 "Only one of the following notification classes may be specified in I<flags>:"
1914 msgstr "以下の通知クラスのいずれか一つだけを I<flags> に指定できる。"
1917 #: build/C/man2/fanotify_init.2:80
1919 msgid "B<FAN_CLASS_PRE_CONTENT>"
1920 msgstr "B<FAN_CLASS_PRE_CONTENT>"
1923 #: build/C/man2/fanotify_init.2:88
1925 "This value allows the receipt of events notifying that a file has been "
1926 "accessed and events for permission decisions if a file may be accessed. It "
1927 "is intended for event listeners that need to access files before they "
1928 "contain their final data. This notification class might be used by "
1929 "hierarchical storage managers, for example."
1931 "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのア"
1932 "クセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント"
1933 "受信者がファイルが最終的なデータを格納する前にそのファイルにアクセスする必要"
1934 "がある場合に使用される。 この通知クラスは例えば階層型ストレージ管理などで使用"
1938 #: build/C/man2/fanotify_init.2:88
1940 msgid "B<FAN_CLASS_CONTENT>"
1941 msgstr "B<FAN_CLASS_CONTENT>"
1944 #: build/C/man2/fanotify_init.2:96
1946 "This value allows the receipt of events notifying that a file has been "
1947 "accessed and events for permission decisions if a file may be accessed. It "
1948 "is intended for event listeners that need to access files when they already "
1949 "contain their final content. This notification class might be used by "
1950 "malware detection programs, for example."
1952 "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのア"
1953 "クセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント"
1954 "受信者がファイルに最終的なデータが格納された際にそのファイルにアクセスする必"
1955 "要がある場合に使用される。 この通知クラスは例えばウイルス検知プログラムなどで"
1959 #: build/C/man2/fanotify_init.2:96
1961 msgid "B<FAN_CLASS_NOTIF>"
1962 msgstr "B<FAN_CLASS_NOTIF>"
1965 #: build/C/man2/fanotify_init.2:103
1967 "This is the default value. It does not need to be specified. This value "
1968 "only allows the receipt of events notifying that a file has been accessed. "
1969 "Permission decisions before the file is accessed are not possible."
1971 "これはデフォルト値である。 この値を指定する必要はない。 この値は、 ファイルが"
1972 "アクセスされたことを通知するイベントの受信だけを行うことを意味する。 ファイル"
1973 "がアクセスする前にアクセス許可の判定を行うことはできない。"
1976 #: build/C/man2/fanotify_init.2:111
1978 "Listeners with different notification classes will receive events in the "
1979 "order B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, B<FAN_CLASS_NOTIF>. "
1980 "The order of notification for listeners in the same notification class is "
1983 "異なる通知クラスの受信者は B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, "
1984 "B<FAN_CLASS_NOTIF> の順序でイベントを受信する。 同じ通知クラスの受信者での通"
1988 #: build/C/man2/fanotify_init.2:114
1989 msgid "The following bits can additionally be set in I<flags>:"
1990 msgstr "I<flags> には以下のビットを追加でセットすることができる。"
1993 #: build/C/man2/fanotify_init.2:114
1995 msgid "B<FAN_CLOEXEC>"
1996 msgstr "B<FAN_CLOEXEC>"
1999 #: build/C/man2/fanotify_init.2:123
2001 "Set the close-on-exec flag (B<FD_CLOEXEC>) on the new file descriptor. See "
2002 "the description of the B<O_CLOEXEC> flag in B<open>(2)."
2004 "close-on-exec フラグ (B<FD_CLOEXEC>) を新しいファイルディスクリプターにセット"
2005 "する。 B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
2008 #: build/C/man2/fanotify_init.2:123
2010 msgid "B<FAN_NONBLOCK>"
2011 msgstr "B<FAN_NONBLOCK>"
2014 #: build/C/man2/fanotify_init.2:133
2016 "Enable the nonblocking flag (B<O_NONBLOCK>) for the file descriptor. "
2017 "Reading from the file descriptor will not block. Instead, if no data is "
2018 "available, B<read>(2) will fail with the error B<EAGAIN>."
2020 "ノンブロッキングフラグ (B<O_NONBLOCK>) をそのファイルディスクリプターで有効に"
2021 "する。 このファイルディスクリプターからの読み出しは停止しない。 その代わり、 "
2022 "読みだし可能なデータが何もない場合、 B<read>(2) はエラー B<EAGAIN> で失敗す"
2026 #: build/C/man2/fanotify_init.2:133
2028 msgid "B<FAN_UNLIMITED_QUEUE>"
2029 msgstr "B<FAN_UNLIMITED_QUEUE>"
2032 #: build/C/man2/fanotify_init.2:139
2034 "Remove the limit of 16384 events for the event queue. Use of this flag "
2035 "requires the B<CAP_SYS_ADMIN> capability."
2037 "そのイベントキューの 16384 イベントの上限を削除する。 このフラグを使用するに"
2038 "は B<CAP_SYS_ADMIN> ケーパビリティーが必要である。"
2041 #: build/C/man2/fanotify_init.2:139
2043 msgid "B<FAN_UNLIMITED_MARKS>"
2044 msgstr "B<FAN_UNLIMITED_MARKS>"
2047 #: build/C/man2/fanotify_init.2:145
2049 "Remove the limit of 8192 marks. Use of this flag requires the "
2050 "B<CAP_SYS_ADMIN> capability."
2052 "8192 マークの上限を削除する。 このフラグを使用するには B<CAP_SYS_ADMIN> ケー"
2056 #: build/C/man2/fanotify_init.2:158
2058 "The I<event_f_flags> argument defines the file status flags that will be set "
2059 "on the open file descriptions that are created for fanotify events. For "
2060 "details of these flags, see the description of the I<flags> values in "
2061 "B<open>(2). I<event_f_flags> includes a multi-bit field for the access "
2062 "mode. This field can take the following values:"
2064 "I<event_f_flags> 引き数は fanotify イベントが作成されるオープンファイル記述に"
2065 "セットされるファイル状態フラグを定義する。 これらのフラグの詳細については "
2066 "B<open>(2) の I<flags> 値の説明を参照のこと。 I<event_f_flags> にはアクセス"
2067 "モードのビットを複数入れることができる。 このフィールドには以下の値も指定する"
2071 #: build/C/man2/fanotify_init.2:158
2074 msgstr "B<O_RDONLY>"
2077 #: build/C/man2/fanotify_init.2:161
2078 msgid "This value allows only read access."
2079 msgstr "読み出しアクセスのみを許可する。"
2082 #: build/C/man2/fanotify_init.2:161
2085 msgstr "B<O_WRONLY>"
2088 #: build/C/man2/fanotify_init.2:164
2089 msgid "This value allows only write access."
2090 msgstr "書き込みアクセスのみを許可する。"
2093 #: build/C/man2/fanotify_init.2:164
2099 #: build/C/man2/fanotify_init.2:167
2100 msgid "This value allows read and write access."
2101 msgstr "読み出しと書き込みの両方を許可する。"
2104 #: build/C/man2/fanotify_init.2:171
2106 "Additional bits can be set in I<event_f_flags>. The most useful values are:"
2108 "他のビットも I<event_f_flags> もセットすることができる。 役立つであろう値は以"
2112 #: build/C/man2/fanotify_init.2:171
2114 msgid "B<O_LARGEFILE>"
2115 msgstr "B<O_LARGEFILE>"
2118 #: build/C/man2/fanotify_init.2:178
2120 "Enable support for files exceeding 2 GB. Failing to set this flag will "
2121 "result in an B<EOVERFLOW> error when trying to open a large file which is "
2122 "monitored by an fanotify group on a 32-bit system."
2124 "2 GB を超えるファイルのサポートを有効にする。 このフラグのセットに失敗する"
2125 "と、 32 ビットシステムで fanotify グループが監視するラージファイルをオープン"
2126 "しようとした際に B<EOVERFLOW> エラーとなる。"
2129 #: build/C/man2/fanotify_init.2:178
2131 msgid "B<O_CLOEXEC>"
2132 msgstr "B<O_CLOEXEC>"
2135 #: build/C/man2/fanotify_init.2:186
2137 "Enable the close-on-exec flag for the file descriptor. See the description "
2138 "of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this may be useful."
2140 "このファイルディスクリプターで close-on-exec フラグを有効にする。 このフラグ"
2141 "が役立つ理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
2144 #: build/C/man2/fanotify_init.2:199
2146 "The following are also allowable: B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, "
2147 "B<O_NONBLOCK>, and B<O_SYNC>. Specifying any other flag in I<event_f_flags> "
2148 "yields the error B<EINVAL> (but see BUGS)."
2150 "B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, B<O_NONBLOCK>, B<O_SYNC> も指定するこ"
2151 "とができる。 I<event_f_flags> にこれ以外のフラグを指定すると、 エラー "
2152 "B<EINVAL> が起こる (ただし、バグを参照)。"
2155 #: build/C/man2/fanotify_init.2:199 build/C/man2/fanotify_mark.2:236
2156 #: build/C/man2/inotify_add_watch.2:77 build/C/man2/inotify_init.2:74
2157 #: build/C/man2/inotify_rm_watch.2:48
2159 msgid "RETURN VALUE"
2163 #: build/C/man2/fanotify_init.2:206
2165 "On success, B<fanotify_init>() returns a new file descriptor. On error, -1 "
2166 "is returned, and I<errno> is set to indicate the error."
2168 "成功すると B<fanotify_init>() は新しいファイルディスクリプターを返す。 エラー"
2169 "の場合、 -1 を返し、 I<errno> にエラーを示す値を設定する。"
2172 #: build/C/man2/fanotify_init.2:216
2174 "An invalid value was passed in I<flags> or I<event_f_flags>. "
2175 "B<FAN_ALL_INIT_FLAGS> defines all allowable bits for I<flags>."
2177 "I<flags> か I<event_f_flags> に無効な値が渡された。 B<FAN_ALL_INIT_FLAGS> で "
2178 "I<flags> に指定できる全ビットが定義されている。"
2181 #: build/C/man2/fanotify_init.2:219
2182 msgid "The number of fanotify groups for this user exceeds 128."
2183 msgstr "このユーザーの fanotify グループ数が 128 を超過した。"
2186 #: build/C/man2/fanotify_init.2:219 build/C/man2/fanotify_mark.2:274
2187 #: build/C/man2/inotify_add_watch.2:109 build/C/man2/inotify_init.2:91
2193 #: build/C/man2/fanotify_init.2:222
2194 msgid "The allocation of memory for the notification group failed."
2195 msgstr "通知グループへのメモリー割り当てが失敗した。"
2198 #: build/C/man2/fanotify_init.2:222 build/C/man2/fanotify_mark.2:283
2204 #: build/C/man2/fanotify_init.2:228
2206 "This kernel does not implement B<fanotify_init>(). The fanotify API is "
2207 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
2209 "このカーネルは B<fanotify_init>() を実装していない。 fanotify API が利用でき"
2210 "るのは、 カーネルが B<CONFIG_FANOTIFY> を有効にして作成されている場合だけであ"
2214 #: build/C/man2/fanotify_init.2:228
2220 #: build/C/man2/fanotify_init.2:233
2222 "The operation is not permitted because the caller lacks the B<CAP_SYS_ADMIN> "
2225 "呼び出し元が B<CAP_SYS_ADMIN> ケーパビリティーを持っていないので、操作が許可"
2229 #: build/C/man2/fanotify_init.2:237
2231 "B<fanotify_init>() was introduced in version 2.6.36 of the Linux kernel and "
2232 "enabled in version 2.6.37."
2234 "B<fanotify_init>() は Linux カーネルのバージョン 2.6.36 で導入され、 バージョ"
2238 #: build/C/man2/fanotify_init.2:239 build/C/man2/fanotify_mark.2:305
2239 #: build/C/man2/inotify_add_watch.2:120 build/C/man2/inotify_rm_watch.2:71
2240 msgid "This system call is Linux-specific."
2241 msgstr "このシステムコールは Linux 独自である。"
2244 #: build/C/man2/fanotify_init.2:242
2245 msgid "As of Linux 3.17, the following bug exists:"
2246 msgstr "Linux 3.17 時点では、 以下のバグが存在する。"
2248 #. FIXME . Patch proposed: https://lkml.org/lkml/2014/9/24/967
2250 #: build/C/man2/fanotify_init.2:248
2251 msgid "The B<O_CLOEXEC> is ignored when passed in I<event_f_flags>."
2252 msgstr "B<O_CLOEXEC> が I<event_f_flags> に指定された場合、 無視される。"
2255 #: build/C/man2/fanotify_init.2:250
2256 msgid "The following bug was present in Linux kernels before version 3.14:"
2257 msgstr "バージョン 3.14 より前の Linux カーネルには以下のバグが存在する。"
2259 #. Fixed by commit 48149e9d3a7e924010a0daab30a6197b7d7b6580
2261 #: build/C/man2/fanotify_init.2:260
2263 "The I<event_f_flags> argument is not checked for invalid flags. Flags that "
2264 "are intended only for internal use, such as B<FMODE_EXEC>, can be set, and "
2265 "will consequently be set for the file descriptors returned when reading from "
2266 "the fanotify file descriptor."
2268 "I<event_f_flags> 引き数に無効なフラグがないかのチェックが行われない。 "
2269 "B<FMODE_EXEC> などの内部での使用のみが意図されたフラグを指定することができ、 "
2270 "その場合 fanotify ファイルディスクリプターからの読み出し時に返されるファイル"
2271 "ディスクリプターにそのフラグがセットされる。"
2274 #: build/C/man2/fanotify_init.2:263
2275 msgid "B<fanotify_mark>(2), B<fanotify>(7)"
2276 msgstr "B<fanotify_mark>(2), B<fanotify>(7)"
2279 #: build/C/man2/fanotify_mark.2:24
2281 msgid "FANOTIFY_MARK"
2282 msgstr "FANOTIFY_MARK"
2285 #: build/C/man2/fanotify_mark.2:28
2287 "fanotify_mark - add, remove, or modify an fanotify mark on a filesystem "
2290 "fanotify_mark - ファイルシステムオブジェクトへの fanotify マークの追加、削"
2294 #: build/C/man2/fanotify_mark.2:31
2296 msgid "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2297 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2300 #: build/C/man2/fanotify_mark.2:35
2303 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2304 "B< uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2306 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2307 "B< uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2310 #: build/C/man2/fanotify_mark.2:44
2312 "B<fanotify_mark>(2) adds, removes, or modifies an fanotify mark on a "
2313 "filesystem object. The caller must have read permission on the filesystem "
2314 "object that is to be marked."
2316 "B<fanotify_mark>(2) はファイルシステムオブジェクトに対する fanotify マークの"
2317 "追加、削除、変更を行う。 呼び出し元はマークを付けるファイルシステムオブジェク"
2318 "トに対する読み出し許可を持っていなければならない。"
2321 #: build/C/man2/fanotify_mark.2:49
2323 "The I<fanotify_fd> argument is a file descriptor returned by "
2324 "B<fanotify_init>(2)."
2326 "I<fanotify_fd> 引き数は B<fanotify_init>(2) で返されたファイルディスクリプ"
2330 #: build/C/man2/fanotify_mark.2:53
2332 "I<flags> is a bit mask describing the modification to perform. It must "
2333 "include exactly one of the following values:"
2335 "I<flags> は実行する操作内容を示すビットマスクである。 以下の値のいずれか一つ"
2339 #: build/C/man2/fanotify_mark.2:53
2341 msgid "B<FAN_MARK_ADD>"
2342 msgstr "B<FAN_MARK_ADD>"
2345 #: build/C/man2/fanotify_mark.2:62
2347 "The events in I<mask> will be added to the mark mask (or to the ignore "
2348 "mask). I<mask> must be nonempty or the error B<EINVAL> will occur."
2350 "I<mask> のイベントを mark マスク (もしくは ignore マスク) に追加する。 "
2351 "I<mask> は空であってはいけない。 空の場合はエラー B<EINVAL> が発生する。"
2354 #: build/C/man2/fanotify_mark.2:62
2356 msgid "B<FAN_MARK_REMOVE>"
2357 msgstr "B<FAN_MARK_REMOVE>"
2360 #: build/C/man2/fanotify_mark.2:71
2362 "The events in argument I<mask> will be removed from the mark mask (or from "
2363 "the ignore mask). I<mask> must be nonempty or the error B<EINVAL> will "
2366 "引き数 I<mask> のイベントを mark マスク (もしくは ignore マスク) から削除す"
2367 "る。 I<mask> は空であってはいけない。 空の場合はエラー B<EINVAL>が発生する。"
2370 #: build/C/man2/fanotify_mark.2:71
2372 msgid "B<FAN_MARK_FLUSH>"
2373 msgstr "B<FAN_MARK_FLUSH>"
2376 #: build/C/man2/fanotify_mark.2:86
2378 "Remove either all mount or all non-mount marks from the fanotify group. If "
2379 "I<flags> contains B<FAN_MARK_MOUNT>, all marks for mounts are removed from "
2380 "the group. Otherwise, all marks for directories and files are removed. No "
2381 "flag other than B<FAN_MARK_MOUNT> can be used in conjunction with "
2382 "B<FAN_MARK_FLUSH>. I<mask> is ignored."
2384 "fanotify グループから全てのマウント mark か全てのマウント以外の mark を削除す"
2385 "る。 I<flag> に B<FAN_MARK_MOUNT> が含まれる場合、 マウントに対する全ての "
2386 "mark がそのグループから削除される。 含まれない場合は、 ディレクトリとファイル"
2387 "に対する全ての mark が削除される。 B<FAN_MARK_MOUNT> 以外のフラグを "
2388 "B<FAN_MARK_FLUSH> と組み合わせて使うことはできない。 I<mask> は無視される。"
2391 #: build/C/man2/fanotify_mark.2:90
2393 "If none of the values above is specified, or more than one is specified, the "
2394 "call fails with the error B<EINVAL>."
2396 "上記のどの値も指定されなかった場合、 または 2 つ以上の値が指定された場合、 呼"
2397 "び出しはエラー B<EINVAL> で失敗する。"
2400 #: build/C/man2/fanotify_mark.2:94
2402 "In addition, zero or more of the following values may be ORed into I<flags>:"
2404 "これに加えて、 I<flags> に以下の値を 0 個以上ビット単位の論理和 (OR) で指定で"
2408 #: build/C/man2/fanotify_mark.2:94
2410 msgid "B<FAN_MARK_DONT_FOLLOW>"
2411 msgstr "B<FAN_MARK_DONT_FOLLOW>"
2414 #: build/C/man2/fanotify_mark.2:105
2416 "If I<pathname> is a symbolic link, mark the link itself, rather than the "
2417 "file to which it refers. (By default, B<fanotify_mark>() dereferences "
2418 "I<pathname> if it is a symbolic link.)"
2420 "I<pathname> がシンボリックリンクの場合、 リンクが参照するファイルではなく、 "
2421 "リンク自身にマークを付ける (デフォルトでは B<fanotify_mark>() は I<pathname> "
2422 "がシンボリックリンクの場合シンボリックリンクの展開を行う)。"
2425 #: build/C/man2/fanotify_mark.2:105
2427 msgid "B<FAN_MARK_ONLYDIR>"
2428 msgstr "B<FAN_MARK_ONLYDIR>"
2431 #: build/C/man2/fanotify_mark.2:110
2433 "If the filesystem object to be marked is not a directory, the error "
2434 "B<ENOTDIR> shall be raised."
2436 "マークが付けられたファイルシステムオブジェクトがディレクトリでない場合、 エ"
2437 "ラー B<ENOTDIR> が発生する。"
2440 #: build/C/man2/fanotify_mark.2:110
2442 msgid "B<FAN_MARK_MOUNT>"
2443 msgstr "B<FAN_MARK_MOUNT>"
2446 #: build/C/man2/fanotify_mark.2:121
2448 "Mark the mount point specified by I<pathname>. If I<pathname> is not itself "
2449 "a mount point, the mount point containing I<pathname> will be marked. All "
2450 "directories, subdirectories, and the contained files of the mount point will "
2453 "I<pathname> で指定されたマウントポイントにマークを付ける。 I<pathname> がマウ"
2454 "ントポイント自身ではない場合、 I<pathname> を含むマウントポイントがマークされ"
2455 "る。 マウントポイントに含まれる全てのディレクトリ、 サブディレクトリ、 その中"
2459 #: build/C/man2/fanotify_mark.2:121
2461 msgid "B<FAN_MARK_IGNORED_MASK>"
2462 msgstr "B<FAN_MARK_IGNORED_MASK>"
2465 #: build/C/man2/fanotify_mark.2:126
2467 "The events in I<mask> shall be added to or removed from the ignore mask."
2468 msgstr "I<mask> のイベントの ignore マスクへの追加、もしくは削除を行う。"
2471 #: build/C/man2/fanotify_mark.2:126
2473 msgid "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2474 msgstr "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2477 #: build/C/man2/fanotify_mark.2:132
2479 "The ignore mask shall survive modify events. If this flag is not set, the "
2480 "ignore mask is cleared when a modify event occurs for the ignored file or "
2483 "ignore マスクは変更イベントが発生しても残り続ける。 このフラグがセットされて"
2484 "いない場合、 無視するファイルやディレクトリに対して変更イベントが発生した際"
2485 "に ignore マスクはクリアされる。"
2488 #: build/C/man2/fanotify_mark.2:136
2490 "I<mask> defines which events shall be listened for (or which shall be "
2491 "ignored). It is a bit mask composed of the following values:"
2493 "I<mask> はどのイベントに対して通知を受けるか (もしくはどのイベントを無視する"
2494 "か) を定義する。 以下の値から構成されるビットマスクである。"
2497 #: build/C/man2/fanotify_mark.2:139
2499 "Create an event when a file or directory (but see BUGS) is accessed (read)."
2501 "ファイルやディレクトリへのアクセス (読み出し) があった際にイベントを作成する "
2505 #: build/C/man2/fanotify_mark.2:142
2506 msgid "Create an event when a file is modified (write)."
2507 msgstr "ファイルが変更された (書き込み) 際にイベントを作成する。"
2510 #: build/C/man2/fanotify_mark.2:145
2511 msgid "Create an event when a writable file is closed."
2512 msgstr "書き込み可能ファイルがクローズされた際にイベントを作成する。"
2515 #: build/C/man2/fanotify_mark.2:148
2516 msgid "Create an event when a read-only file or directory is closed."
2518 "読み出し専用のファイルやディレクトリがクローズされた際にイベントを作成する。"
2521 #: build/C/man2/fanotify_mark.2:151
2522 msgid "Create an event when a file or directory is opened."
2523 msgstr "ファイルやディレクトリがオープンされた際にイベントを作成する。"
2526 #: build/C/man2/fanotify_mark.2:159
2528 "Create an event when a permission to open a file or directory is requested. "
2529 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2530 "B<FAN_CLASS_CONTENT> is required."
2532 "ファイルやディレクトリをオープンするアクセス許可が要求された際にイベントを作"
2533 "成する。 fanotify ファイルディスクリプターが B<FAN_CLASS_PRE_CONTENT> か "
2534 "B<FAN_CLASS_CONTENT> を指定されて作成されている必要がある。"
2537 #: build/C/man2/fanotify_mark.2:167
2539 "Create an event when a permission to read a file or directory is requested. "
2540 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2541 "B<FAN_CLASS_CONTENT> is required."
2543 "ファイルやディレクトリを読み出すアクセス許可が要求された際にイベントを作成す"
2544 "る。 fanotify ファイルディスクリプターが B<FAN_CLASS_PRE_CONTENT> か "
2545 "B<FAN_CLASS_CONTENT> を指定されて作成されている必要がある。"
2548 #: build/C/man2/fanotify_mark.2:167
2550 msgid "B<FAN_ONDIR>"
2551 msgstr "B<FAN_ONDIR>"
2554 #: build/C/man2/fanotify_mark.2:176
2556 "Create events for directories\\(emfor example, when B<opendir>(3), "
2557 "B<readdir>(3) (but see BUGS), and B<closedir>(3) are called. Without this "
2558 "flag, only events for files are created."
2560 "ディレクトリに対するイベントを作成する。 例えば B<opendir>(3)、 "
2561 "B<readdir>(3) (ただし「バグ」も参照)、 B<closedir>(3) が呼び出された場合。 こ"
2562 "のフラグが指定されなかった場合、 ファイルに対するイベントだけが作成される。"
2565 #: build/C/man2/fanotify_mark.2:176
2567 msgid "B<FAN_EVENT_ON_CHILD>"
2568 msgstr "B<FAN_EVENT_ON_CHILD>"
2571 #: build/C/man2/fanotify_mark.2:184
2573 "Events for the immediate children of marked directories shall be created. "
2574 "The flag has no effect when marking mounts. Note that events are not "
2575 "generated for children of the subdirectories of marked directories. To "
2576 "monitor complete directory trees it is necessary to mark the relevant mount."
2578 "マークされたディレクトリの直下のエントリーに対してイベントを作成する。 このフ"
2579 "ラグはマウントにマークを付ける際には効果はない。 マークされたディレクトリのサ"
2580 "ブディレクトリのエントリーに対してはイベントが作成されない点に注意すること。 "
2581 "ディレクトリツリー全体を監視するには、 関連するマウントにマークを付ける必要が"
2585 #: build/C/man2/fanotify_mark.2:186
2586 msgid "The following composed value is defined:"
2587 msgstr "以下の組み合わせ値が定義されている。"
2590 #: build/C/man2/fanotify_mark.2:190
2591 msgid "A file is closed (B<FAN_CLOSE_WRITE>|B<FAN_CLOSE_NOWRITE>)."
2592 msgstr "ファイルがクローズされた (B<FAN_CLOSE_WRITE>|B<FAN_CLOSE_NOWRITE>)。"
2595 #: build/C/man2/fanotify_mark.2:195
2597 "The filesystem object to be marked is determined by the file descriptor "
2598 "I<dirfd> and the pathname specified in I<pathname>:"
2600 "マークを付けるファイルシステムオブジェクトは、 ファイルディスクリプター "
2601 "I<dirfd> と I<pathname> で指定されたパス名から決定される。"
2604 #: build/C/man2/fanotify_mark.2:201
2606 "If I<pathname> is NULL, I<dirfd> defines the filesystem object to be marked."
2608 "I<pathname> が NULL の場合、 I<dirfd> でマークを付けるファイルシステムオブ"
2612 #: build/C/man2/fanotify_mark.2:209
2614 "If I<pathname> is NULL, and I<dirfd> takes the special value B<AT_FDCWD>, "
2615 "the current working directory is to be marked."
2617 "I<pathname> が NULL で、 I<dirfd> が特別な値 B<AT_FDCWD> の場合、 カレント"
2618 "ワーキングディレクトリがマークされる。"
2621 #: build/C/man2/fanotify_mark.2:215
2623 "If I<pathname> is absolute, it defines the filesystem object to be marked, "
2624 "and I<dirfd> is ignored."
2626 "I<pathname> が絶対パスの場合、 そのパス名によりマークを付けるファイルシステム"
2627 "オブジェクトが定義され、 I<dirfd> は無視される。"
2630 #: build/C/man2/fanotify_mark.2:226
2632 "If I<pathname> is relative, and I<dirfd> does not have the value "
2633 "B<AT_FDCWD>, then the filesystem object to be marked is determined by "
2634 "interpreting I<pathname> relative the directory referred to by I<dirfd>."
2636 "I<pathname> が相対パスで、 I<dirfd> が B<AT_FDCWD> でない場合、 マークを付け"
2637 "るファイルシステムオブジェクトは I<dirfd> が参照するディレクトリに対する相対"
2638 "パス I<pathname> を解釈して決定される。"
2641 #: build/C/man2/fanotify_mark.2:236
2643 "If I<pathname> is relative, and I<dirfd> has the value B<AT_FDCWD>, then the "
2644 "filesystem object to be marked is determined by interpreting I<pathname> "
2645 "relative the current working directory."
2647 "I<pathname> が相対パスで、 I<dirfd> が B<AT_FDCWD> の場合、 マークを付ける"
2648 "ファイルシステムオブジェクトはカレントワーキングディレクトリに対する相対パス "
2649 "I<pathname> を解釈して決定される。"
2652 #: build/C/man2/fanotify_mark.2:243
2654 "On success, B<fanotify_mark>() returns 0. On error, -1 is returned, and "
2655 "I<errno> is set to indicate the error."
2657 "成功すると B<fanotify_mark>() は 0 を返す。 エラーの場合、 -1 を返し、 "
2658 "I<errno> にエラーの原因を示す値を設定する。"
2661 #: build/C/man2/fanotify_mark.2:244 build/C/man2/inotify_add_watch.2:88
2662 #: build/C/man2/inotify_rm_watch.2:56
2668 #: build/C/man2/fanotify_mark.2:248
2669 msgid "An invalid file descriptor was passed in I<fanotify_fd>."
2670 msgstr "無効なファイルディスクリプターが I<fanotify_fd> で渡された。"
2673 #: build/C/man2/fanotify_mark.2:257
2675 "An invalid value was passed in I<flags> or I<mask>, or I<fanotify_fd> was "
2676 "not an fanotify file descriptor."
2678 "無効な値が I<flags> か I<mask> に指定されたか、 I<fanotify_fd> が fanotify "
2679 "ファイルディスクリプターでなかった。"
2682 #: build/C/man2/fanotify_mark.2:265
2684 "The fanotify file descriptor was opened with B<FAN_CLASS_NOTIF> and mask "
2685 "contains a flag for permission events (B<FAN_OPEN_PERM> or "
2686 "B<FAN_ACCESS_PERM>)."
2688 "fanotify ファイルディスクリプターが B<FAN_CLASS_NOTIF> でオープンされたが、 "
2689 "アクセス許可イベント (B<FAN_OPEN_PERM> か B<FAN_ACCESS_PERM>) のフラグがマス"
2693 #: build/C/man2/fanotify_mark.2:274
2695 "The filesystem object indicated by I<dirfd> and I<pathname> does not exist. "
2696 "This error also occurs when trying to remove a mark from an object which is "
2699 "I<dirfd> と I<pathname> で指定されたファイルシステムオブジェクトが存在しな"
2700 "い。 このエラーはマークされていないオブジェクトからマークを削除しようとした場"
2704 #: build/C/man2/fanotify_mark.2:277
2705 msgid "The necessary memory could not be allocated."
2706 msgstr "必要なメモリーを割り当てできなかった。"
2709 #: build/C/man2/fanotify_mark.2:277 build/C/man2/inotify_add_watch.2:112
2715 #: build/C/man2/fanotify_mark.2:283
2717 "The number of marks exceeds the limit of 8192 and the B<FAN_UNLIMITED_MARKS> "
2718 "flag was not specified when the fanotify file descriptor was created with "
2719 "B<fanotify_init>(2)."
2721 "マークの数が 8192 の上限を超過し、 B<fanotify_init>(2) で fanotify ファイル"
2722 "ディスクリプターが作成された際に B<FAN_UNLIMITED_MARKS> フラグが指定されてい"
2726 #: build/C/man2/fanotify_mark.2:289
2728 "This kernel does not implement B<fanotify_mark>(). The fanotify API is "
2729 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
2731 "このカーネルでは B<fanotify_mark>() が実装されていない。 fanotify API が利用"
2732 "できるのは、 カーネルで B<CONFIG_FANOTIFY> が有効になっている場合だけである。"
2735 #: build/C/man2/fanotify_mark.2:289
2741 #: build/C/man2/fanotify_mark.2:299
2743 "I<flags> contains B<FAN_MARK_ONLYDIR>, and I<dirfd> and I<pathname> do not "
2744 "specify a directory."
2746 "I<flags> に B<FAN_MARK_ONLYDIR> が含まれているが、 I<dirfd> と I<pathname> が"
2750 #: build/C/man2/fanotify_mark.2:303
2752 "B<fanotify_mark>() was introduced in version 2.6.36 of the Linux kernel and "
2753 "enabled in version 2.6.37."
2755 "B<fanotify_mark>() は Linux カーネルのバージョン 2.6.36 で導入され、 バージョ"
2759 #: build/C/man2/fanotify_mark.2:307
2760 msgid "The following bugs were present in Linux kernels before version 3.16:"
2761 msgstr "バージョン 3.16 より前の Linux カーネルでは以下のバグが存在した。"
2763 #. Fixed by commit 0a8dd2db579f7a0ac7033d6b857c3d5dbaa77563
2765 #: build/C/man2/fanotify_mark.2:317
2767 "If I<flags> contains B<FAN_MARK_FLUSH>, I<dirfd> and I<pathname> must "
2768 "specify a valid filesystem object, even though this object is not used."
2770 "I<flags> に B<FAN_MARK_FLUSH> が指定されている場合、 たとえそのオブジェクトが"
2771 "使用されない場合であっても、 I<dirfd> と I<pathname> には有効なファイルシス"
2772 "テムオブジェクトを指定しなければならない。"
2774 #. Fixed by commit d4c7cf6cffb1bc711a833b5e304ba5bcfe76398b
2776 #: build/C/man2/fanotify_mark.2:323
2777 msgid "B<readdir>(2) does not generate a B<FAN_ACCESS> event."
2778 msgstr "B<readdir>(2) は B<FAN_ACCESS> イベントを生成しない。"
2780 #. Fixed by commit cc299a98eb13a9853675a9cbb90b30b4011e1406
2782 #: build/C/man2/fanotify_mark.2:331
2784 "If B<fanotify_mark>(2) is called with B<FAN_MARK_FLUSH>, I<flags> is not "
2785 "checked for invalid values."
2787 "B<fanotify_mark>(2) が B<FAN_MARK_FLUSH> 付きで呼び出された場合、 I<flags> の"
2791 #: build/C/man2/fanotify_mark.2:334
2792 msgid "B<fanotify_init>(2), B<fanotify>(7)"
2793 msgstr "B<fanotify_init>(2), B<fanotify>(7)"
2796 #: build/C/man7/inotify.7:27
2802 #: build/C/man7/inotify.7:30
2803 msgid "inotify - monitoring filesystem events"
2804 msgstr "inotify - ファイルシステムイベントを監視する"
2807 #: build/C/man7/inotify.7:38
2809 "The I<inotify> API provides a mechanism for monitoring filesystem events. "
2810 "Inotify can be used to monitor individual files, or to monitor directories. "
2811 "When a directory is monitored, inotify will return events for the directory "
2812 "itself, and for files inside the directory."
2814 "I<inotify> API はファイルシステムイベントを監視するための機構を提供する。 "
2815 "inotify は個々のファイルやディレクトリを監視するのに使える。 ディレクトリを監"
2816 "視する場合、inotify はディレクトリ自身と ディレクトリ内のファイルのイベントを"
2820 #: build/C/man7/inotify.7:40
2821 msgid "The following system calls are used with this API:"
2822 msgstr "この API では以下のシステムコールが使用される。"
2825 #: build/C/man7/inotify.7:51
2827 "B<inotify_init>(2) creates an inotify instance and returns a file "
2828 "descriptor referring to the inotify instance. The more recent "
2829 "B<inotify_init1>(2) is like B<inotify_init>(2), but has a I<flags> argument "
2830 "that provides access to some extra functionality."
2832 "B<inotify_init>(2) は inotify インスタンスを作成し、inotify インスタンスを参"
2833 "照する ファイルディスクリプターを返す。 より新しい B<inotify_init1>(2) も "
2834 "B<inotify_init>(2) と同様だが、 こちらにはいくつかの追加の機能を利用するため"
2835 "の I<flags> 引き数がある。"
2838 #: build/C/man7/inotify.7:64
2840 "B<inotify_add_watch>(2) manipulates the \"watch list\" associated with an "
2841 "inotify instance. Each item (\"watch\") in the watch list specifies the "
2842 "pathname of a file or directory, along with some set of events that the "
2843 "kernel should monitor for the file referred to by that pathname. "
2844 "B<inotify_add_watch>(2) either creates a new watch item, or modifies an "
2845 "existing watch. Each watch has a unique \"watch descriptor\", an integer "
2846 "returned by B<inotify_add_watch>(2) when the watch is created."
2848 "B<inotify_add_watch>(2) は inotify インスタンスに関連づけられた「監視対象 "
2849 "(watch) リスト」を操作する。 監視対象リストの各アイテム (\"watch\") は、 ファ"
2850 "イルまたはディレクトリのパス名と、 そのパス名で参照されるファイルに対して "
2851 "カーネルが監視する複数のイベントの集合を指定する。 B<inotify_add_watch>(2) "
2852 "は新しい監視アイテムの作成や既存の監視対象の変更ができる。 各監視対象は一意の"
2853 "「監視対象ディスクリプター」を持つ。 これは監視対象を作成したときに "
2854 "B<inotify_add_watch>(2) から返される整数である。"
2857 #: build/C/man7/inotify.7:70
2859 "When events occur for monitored files and directories, those events are made "
2860 "available to the application as structured data that can be read from the "
2861 "inotify file descriptor using B<read>(2) (see below)."
2863 "監視しているファイルやディレクトリでイベントが起こると、 それらのイベントはア"
2864 "プリケーションから inotify ファイルディスクリプターから B<read>(2) を使って構"
2865 "造化データとして読み出すことができる (下記参照)。"
2868 #: build/C/man7/inotify.7:73
2869 msgid "B<inotify_rm_watch>(2) removes an item from an inotify watch list."
2871 "B<inotify_rm_watch>(2) は inotify の監視対象リストからアイテムを削除する。"
2874 #: build/C/man7/inotify.7:80
2876 "When all file descriptors referring to an inotify instance have been closed "
2877 "(using B<close>(2)), the underlying object and its resources are freed for "
2878 "reuse by the kernel; all associated watches are automatically freed."
2880 "inotify インスタンスを指している 全てのファイルディスクリプターが "
2881 "(B<close>(2) を使って) クローズされた場合、 その下層にあるオブジェクトとその"
2882 "リソースは、 カーネルで再利用するために解放される。 関連が切られた監視対象は"
2886 #: build/C/man7/inotify.7:89
2888 "With careful programming, an application can use inotify to efficiently "
2889 "monitor and cache the state of a set of filesystem objects. However, robust "
2890 "applications should allow for the fact that bugs in the monitoring logic or "
2891 "races of the kind described below may leave the cache inconsistent with the "
2892 "filesystem state. It is probably wise to to do some consistency checking, "
2893 "and rebuild the cache when inconsistencies are detected."
2895 "注意深くプログラミングすることで、 アプリケーションは inotify を使ってファイ"
2896 "ルシステムオブジェクトの集合の状態を効率的に監視しキャッシュしておくことがで"
2897 "きる。 しかしながら、ロバストなアプリケーションでは、監視ロジックのバグや以下"
2898 "に説明があるような種類の競合条件によりファイルシステムの状態とキャッシュが一"
2899 "致しない状態になることがあるという事実も考慮に入れておくべきである。 おそらく"
2900 "何らかの一貫性のチェックを行い、不一致が検出された場合にはキャッシュを再構築"
2904 #: build/C/man7/inotify.7:89
2906 msgid "Reading events from an inotify file descriptor"
2907 msgstr "inotify ファイルディスクリプターからのイベントの読み出し"
2910 #: build/C/man7/inotify.7:102
2912 "To determine what events have occurred, an application B<read>(2)s from the "
2913 "inotify file descriptor. If no events have so far occurred, then, assuming "
2914 "a blocking file descriptor, B<read>(2) will block until at least one event "
2915 "occurs (unless interrupted by a signal, in which case the call fails with "
2916 "the error B<EINTR>; see B<signal>(7))."
2918 "どのようなイベントが起こっていたかを知るには、 アプリケーションで inotify "
2919 "ファイルディスクリプターを B<read>(2) すればよい。 これまでに何もイベントが"
2920 "起こっていない場合、 停止 (blocking) モードのファイルディスクリプターであれ"
2921 "ば、 少なくとも 1 つのイベントが起こるまで B<read>(2) は停止する (シグナルに"
2922 "より割り込まれなかった場合。 シグナルによる割り込みがあった場合、呼び出しはエ"
2923 "ラー B<EINTR> で失敗する。 B<signal>(7) 参照)。"
2926 #: build/C/man7/inotify.7:106
2928 "Each successful B<read>(2) returns a buffer containing one or more of the "
2929 "following structures:"
2931 "B<read>(2) が成功すると、以下の構造体を 1 つ以上含むバッファーが返される:"
2933 #. FIXME . The type of the 'wd' field should probably be "int32_t".
2934 #. I submitted a patch to fix this. See the LKML thread
2935 #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008
2936 #. Glibc bug filed: http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
2938 #: build/C/man7/inotify.7:121
2941 "struct inotify_event {\n"
2942 " int wd; /* Watch descriptor */\n"
2943 " uint32_t mask; /* Mask describing event */\n"
2944 " uint32_t cookie; /* Unique cookie associating related\n"
2945 " events (for rename(2)) */\n"
2946 " uint32_t len; /* Size of I<name> field */\n"
2947 " char name[]; /* Optional null-terminated name */\n"
2950 "struct inotify_event {\n"
2951 " int wd; /* 監視対象ディスクリプター */\n"
2952 " uint32_t mask; /* イベントを示すマスク */\n"
2953 " uint32_t cookie; /* 関連するイベント群を関連づける\n"
2954 " 一意なクッキー (rename(2) 用) */\n"
2955 " uint32_t len; /* \\(aqname\\(aq フィールドのサイズ */\n"
2956 " char name[]; /* ヌルで終端された任意の名前 */\n"
2960 #: build/C/man7/inotify.7:128
2962 "I<wd> identifies the watch for which this event occurs. It is one of the "
2963 "watch descriptors returned by a previous call to B<inotify_add_watch>(2)."
2965 "I<wd> はイベント発生の監視対象を指定する。 これは、前もって行われた "
2966 "B<inotify_add_watch>(2) 呼び出しで返された監視対象ディスクリプターのうちの "
2970 #: build/C/man7/inotify.7:131
2972 "I<mask> contains bits that describe the event that occurred (see below)."
2974 "I<mask> には発生したイベント (下記参照) を記述するためのビットが含まれる。"
2977 #: build/C/man7/inotify.7:143
2979 "I<cookie> is a unique integer that connects related events. Currently this "
2980 "is used only for rename events, and allows the resulting pair of "
2981 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events to be connected by the "
2982 "application. For all other event types, I<cookie> is set to 0."
2984 "I<cookie> は関連するイベントを関連づけるための一意な整数である。\n"
2985 "現在のところ、この値は rename イベントに対してのみ使われており、\n"
2986 "結果のペアである B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントを\n"
2987 "アプリケーションで関連づけることができる。\n"
2988 "他のイベント種別の場合には、 I<cookie> は 0 に設定する。"
2991 #: build/C/man7/inotify.7:152
2993 "The I<name> field is present only when an event is returned for a file "
2994 "inside a watched directory; it identifies the file pathname relative to the "
2995 "watched directory. This pathname is null-terminated, and may include "
2996 "further null bytes (\\(aq\\e0\\(aq) to align subsequent reads to a suitable "
2999 "I<name> フィールドは監視しているディレクトリ内のファイルに対して イベントが返"
3000 "される場合のためにだけ存在する。 監視するディレクトリからのファイルの相対パス"
3001 "名を表す。 このパス名はヌルで終端され、 その後の読み込みで適切なアドレス境界"
3002 "に調整するために、 さらにヌルバイト (\\(aq\\e0\\(aq) が含まれる場合もある。"
3005 #: build/C/man7/inotify.7:162
3007 "The I<len> field counts all of the bytes in I<name>, including the null "
3008 "bytes; the length of each I<inotify_event> structure is thus I<sizeof(struct "
3009 "inotify_event)+len>."
3011 "I<len> フィールドはヌルバイトを含む I<name> の全てのバイト数を表す。\n"
3012 "よって、 I<inotify_event> 構造体のサイズは \n"
3013 "I<sizeof(struct inotify_event)+len> である。"
3016 #: build/C/man7/inotify.7:173
3018 "The behavior when the buffer given to B<read>(2) is too small to return "
3019 "information about the next event depends on the kernel version: in kernels "
3020 "before 2.6.21, B<read>(2) returns 0; since kernel 2.6.21, B<read>(2) fails "
3021 "with the error B<EINVAL>. Specifying a buffer of size"
3023 "B<read>(2) に渡されたバッファーが小さすぎて次のイベントに関する情報を返せ\n"
3024 "ない場合の動作はカーネルのバージョンにより異なる。 2.6.21 より前のカー\n"
3025 "ネルでは、 B<read>(2) は 0 を返す。 2.6.21 以降のカーネルでは、\n"
3026 "B<read>(2) はエラー B<EINVAL> で失敗する。\n"
3030 #: build/C/man7/inotify.7:175
3032 msgid " sizeof(struct inotify_event) + NAME_MAX + 1\n"
3033 msgstr " sizeof(struct inotify_event) + NAME_MAX + 1\n"
3036 #: build/C/man7/inotify.7:177
3037 msgid "will be sufficient to read at least one event."
3038 msgstr "を指定すれば、少なくとも 1 イベントで読み出しを行うには十分である。"
3041 #: build/C/man7/inotify.7:177
3043 msgid "inotify events"
3044 msgstr "inotify イベント"
3047 #: build/C/man7/inotify.7:197
3049 "The B<inotify_add_watch>(2) I<mask> argument and the I<mask> field of the "
3050 "I<inotify_event> structure returned when B<read>(2)ing an inotify file "
3051 "descriptor are both bit masks identifying inotify events. The following "
3052 "bits can be specified in I<mask> when calling B<inotify_add_watch>(2) and "
3053 "may be returned in the I<mask> field returned by B<read>(2):"
3055 "B<inotify_add_watch>(2) の I<mask> 引き数と、inotify ファイル構造体を "
3056 "B<read>(2) したときに返される I<inotify_event> 構造体の I<mask> フィールド"
3057 "は、ともに inotify イベントを識別するための ビットマスクである。 以下のビット"
3058 "が B<inotify_add_watch>(2) を呼ぶときの I<mask> に指定可能であり、 "
3059 "B<read>(2) で返される I<mask> フィールドで返される:"
3062 #: build/C/man7/inotify.7:198
3064 msgid "B<IN_ACCESS> (+)"
3065 msgstr "B<IN_ACCESS> (+)"
3068 #: build/C/man7/inotify.7:203
3069 msgid "File was accessed (e.g., B<read>(2), B<execve>(2))."
3070 msgstr "(B<read>(2), B<execve>(2) などで) ファイルがアクセスされた。"
3073 #: build/C/man7/inotify.7:203
3075 msgid "B<IN_ATTRIB> (*)"
3076 msgstr "B<IN_ATTRIB> (*)"
3079 #: build/C/man7/inotify.7:218
3081 "Metadata changed\\(emfor example, permissions (e.g., B<chmod>(2)), "
3082 "timestamps (e.g., B<utimensat>(2)), extended attributes (B<setxattr>(2)), "
3083 "link count (since Linux 2.6.25; e.g., for the target of B<link>(2) and for "
3084 "B<unlink>(2)), and user/group ID (e.g., B<chown>(2))."
3086 "メタデータが変更された。 メタデータとは、例えば、アクセス許可 (B<chmod>(2))、"
3087 "タイムスタンプ (B<utimensat>(2) など)、拡張属性 (B<setxattr>(2))、 リンクカウ"
3088 "ント (Linux 2.6.25 以降; B<link>(2) のリンク先や B<unlink>(2) など)、ユー"
3089 "ザー/グループ ID (B<chown>(2) など) などである。"
3092 #: build/C/man7/inotify.7:218
3094 msgid "B<IN_CLOSE_WRITE> (+)"
3095 msgstr "B<IN_CLOSE_WRITE> (+)"
3098 #: build/C/man7/inotify.7:221
3099 msgid "File opened for writing was closed."
3100 msgstr "書き込みのためにオープンされたファイルがクローズされた。"
3103 #: build/C/man7/inotify.7:221
3105 msgid "B<IN_CLOSE_NOWRITE> (*)"
3106 msgstr "B<IN_CLOSE_NOWRITE> (*)"
3109 #: build/C/man7/inotify.7:224
3110 msgid "File or directory not opened for writing was closed."
3112 "書き込み用としてはオープンされていないファイルやディレクトリがクローズされ"
3116 #: build/C/man7/inotify.7:224
3118 msgid "B<IN_CREATE> (+)"
3119 msgstr "B<IN_CREATE> (+)"
3122 #: build/C/man7/inotify.7:234
3124 "File/directory created in watched directory (e.g., B<open>(2) B<O_CREAT>, "
3125 "B<mkdir>(2), B<link>(2), B<symlink>(2), B<bind>(2) on a UNIX domain socket)."
3127 "監視対象ディレクトリ内でファイルやディレクトリが作成された (B<open>(2) "
3128 "B<O_CREAT>, B<mkdir>(2), B<link>(2), B<symlink>(2), UNIX ドメインソケットに対"
3129 "する B<bind>(2) など)。"
3132 #: build/C/man7/inotify.7:234
3134 msgid "B<IN_DELETE> (+)"
3135 msgstr "B<IN_DELETE> (+)"
3138 #: build/C/man7/inotify.7:237
3139 msgid "File/directory deleted from watched directory."
3140 msgstr "監視対象ディレクトリ内でファイルやディレクトリが削除された。"
3143 #: build/C/man7/inotify.7:237
3145 msgid "B<IN_DELETE_SELF>"
3146 msgstr "B<IN_DELETE_SELF>"
3149 #: build/C/man7/inotify.7:248
3151 "Watched file/directory was itself deleted. (This event also occurs if an "
3152 "object is moved to another filesystem, since B<mv>(1) in effect copies the "
3153 "file to the other filesystem and then deletes it from the original "
3154 "filesystem.) In addition, an B<IN_IGNORED> event will subsequently be "
3155 "generated for the watch descriptor."
3157 "監視対象のファイルやディレクトリ自身が削除あれた。 (このイベントはオブジェク"
3158 "トが別のファイルシステムに移動された場合にも発生する。 B<mv>(1) は実際には別"
3159 "のファイルシステムにファイルをコピーした後、元のファイルシステムからそのファ"
3160 "イルを削除するからである。) また、 結果的に監視ディスクリプターに対して "
3161 "B<IN_IGNORED> イベントも生成される。"
3164 #: build/C/man7/inotify.7:248
3166 msgid "B<IN_MODIFY> (+)"
3167 msgstr "B<IN_MODIFY> (+)"
3170 #: build/C/man7/inotify.7:253
3171 msgid "File was modified (e.g., B<write>(2), B<truncate>(2))."
3172 msgstr "ファイルが変更された (B<write>(2), B<truncate>(2) など)。"
3175 #: build/C/man7/inotify.7:253
3177 msgid "B<IN_MOVE_SELF>"
3178 msgstr "B<IN_MOVE_SELF>"
3181 #: build/C/man7/inotify.7:256
3182 msgid "Watched file/directory was itself moved."
3183 msgstr "監視対象のディレクトリまたはファイル自身が移動された。"
3186 #: build/C/man7/inotify.7:256
3188 msgid "B<IN_MOVED_FROM> (+)"
3189 msgstr "B<IN_MOVED_FROM> (+)"
3192 #: build/C/man7/inotify.7:260
3194 "Generated for the directory containing the old filename when a file is "
3197 "ファイル名の変更を行った際に変更前のファイル名が含まれるディレクトリに対して"
3201 #: build/C/man7/inotify.7:260
3203 msgid "B<IN_MOVED_TO> (+)"
3204 msgstr "B<IN_MOVED_TO> (+)"
3207 #: build/C/man7/inotify.7:264
3209 "Generated for the directory containing the new filename when a file is "
3212 "ファイル名の変更を行った際に新しいファイル名が含まれるディレクトリに対して生"
3216 #: build/C/man7/inotify.7:264
3218 msgid "B<IN_OPEN> (*)"
3219 msgstr "B<IN_OPEN> (*)"
3222 #: build/C/man7/inotify.7:267
3223 msgid "File or directory was opened."
3224 msgstr "ファイルやディレクトリがオープンされた。"
3227 #: build/C/man7/inotify.7:270
3228 msgid "When monitoring a directory:"
3229 msgstr "ディレクトリを監視する場合:"
3232 #: build/C/man7/inotify.7:273
3234 "the events marked above with an asterisk (*) can occur both for the "
3235 "directory itself and for objects inside the directory; and"
3237 "上記でアスタリスク (*) が付いたイベントは、 ディレクトリ自身とディレクトリ内"
3238 "のオブジェクトのどちらに対しても発生する。"
3241 #: build/C/man7/inotify.7:276
3243 "the events marked with a plus sign (+) occur only for objects inside the "
3244 "directory (not for the directory itself)."
3246 "上記でプラス記号 (+) が付いたイベントは、 ディレクトリ内のオブジェクトに対し"
3247 "てのみ発生する (ディレクトリ自身に対しては発生しない)。"
3250 #: build/C/man7/inotify.7:282
3252 "When events are generated for objects inside a watched directory, the "
3253 "I<name> field in the returned I<inotify_event> structure identifies the name "
3254 "of the file within the directory."
3256 "監視対象のディレクトリ内のオブジェクトに対してイベントが発生した場合、 "
3257 "I<inotify_event> 構造体で返される I<name> フィールドは、ディレクトリ内のファ"
3261 #: build/C/man7/inotify.7:290
3263 "The B<IN_ALL_EVENTS> macro is defined as a bit mask of all of the above "
3264 "events. This macro can be used as the I<mask> argument when calling "
3265 "B<inotify_add_watch>(2)."
3267 "B<IN_ALL_EVENTS> マクロは上記のイベント全てのマスクとして定義される。 このマ"
3268 "クロは B<inotify_add_watch>(2) を呼び出すときの I<mask> 引き数として使える。"
3271 #: build/C/man7/inotify.7:292
3272 msgid "Two additional convenience macros are defined:"
3273 msgstr "以下の 2 つの便利なマクロが定義されている。"
3276 #: build/C/man7/inotify.7:293
3282 #: build/C/man7/inotify.7:297
3283 msgid "Equates to B<IN_MOVED_FROM | IN_MOVED_TO>."
3284 msgstr "B<IN_MOVED_FROM | IN_MOVED_TO> と等価。"
3287 #: build/C/man7/inotify.7:297
3290 msgstr "B<IN_CLOSE>"
3293 #: build/C/man7/inotify.7:301
3294 msgid "Equates to B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE>."
3295 msgstr "B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE> と等価。"
3298 #: build/C/man7/inotify.7:307
3300 "The following further bits can be specified in I<mask> when calling "
3301 "B<inotify_add_watch>(2):"
3303 "その他にも以下のビットを B<inotify_add_watch>(2) を呼ぶときの I<mask> に指定"
3307 #: build/C/man7/inotify.7:308
3309 msgid "B<IN_DONT_FOLLOW> (since Linux 2.6.15)"
3310 msgstr "B<IN_DONT_FOLLOW> (Linux 2.6.15 以降)"
3313 #: build/C/man7/inotify.7:313
3314 msgid "Don't dereference I<pathname> if it is a symbolic link."
3316 "I<pathname> がシンボリックリンクである場合に辿らない。 (Linux 2.6.15 以降)"
3319 #: build/C/man7/inotify.7:313
3321 msgid "B<IN_EXCL_UNLINK> (since Linux 2.6.36)"
3322 msgstr "B<IN_EXCL_UNLINK> (Linux 2.6.36 以降)"
3324 #. commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6
3326 #: build/C/man7/inotify.7:329
3328 "By default, when watching events on the children of a directory, events are "
3329 "generated for children even after they have been unlinked from the "
3330 "directory. This can result in large numbers of uninteresting events for "
3331 "some applications (e.g., if watching I</tmp>, in which many applications "
3332 "create temporary files whose names are immediately unlinked). Specifying "
3333 "B<IN_EXCL_UNLINK> changes the default behavior, so that events are not "
3334 "generated for children after they have been unlinked from the watched "
3337 "デフォルトでは、あるディレクトリの子ファイルに関するイベントを監視 (watch) し"
3338 "た際、ディレクトリからその子ファイルが削除 (unlink) された場合であってもその"
3339 "子ファイルに対してイベントが生成される。このことは、アプリケーションによって"
3340 "はあまり興味のないイベントが大量に発生することにつながる (例えば、I</tmp> を"
3341 "監視している場合、たくさんのアプリケーションが、すぐにその名前が削除される一"
3342 "時ファイルをそのディレクトリに作成する)。 B<IN_EXCL_UNLINK> を指定するとこの"
3343 "デフォルトの動作を変更でき、監視対象のディレクトリから子ファイルが削除された"
3344 "後に子ファイルに関するイベントが生成されなくなる。"
3347 #: build/C/man7/inotify.7:329
3349 msgid "B<IN_MASK_ADD>"
3350 msgstr "B<IN_MASK_ADD>"
3353 #: build/C/man7/inotify.7:336
3355 "If a watch instance already exists for the filesystem object corresponding "
3356 "to I<pathname>, add (OR) the events in I<mask> to the watch mask (instead of "
3357 "replacing the mask)."
3359 "監視インスタンスが I<pathname> に対応するファイルシステムオブジェクトに対して"
3360 "すでに存在する場合に、 (マスクを置き換えるのではなく) 監視マスクに I<mask> で"
3361 "指定されたイベントを追加 (OR) する。"
3364 #: build/C/man7/inotify.7:336
3366 msgid "B<IN_ONESHOT>"
3367 msgstr "B<IN_ONESHOT>"
3370 #: build/C/man7/inotify.7:342
3372 "Monitor the filesystem object corresponding to I<pathname> for one event, "
3373 "then remove from watch list."
3375 "I<pathname> に対応するファイルシステムオブジェクトを 1 イベントについてだけ監"
3376 "視し、 イベントが発生したら監視対象リストから削除する。"
3379 #: build/C/man7/inotify.7:342
3381 msgid "B<IN_ONLYDIR> (since Linux 2.6.15)"
3382 msgstr "B<IN_ONLYDIR> (Linux 2.6.15 以降)"
3385 #: build/C/man7/inotify.7:349
3387 "Only watch I<pathname> if it is a directory. Using this flag provides an "
3388 "application with a race-free way of ensuring that the monitored object is a "
3391 "I<pathname> がディレクトリの場合のみ監視する。 このフラグを使うことで、アプリ"
3392 "ケーションは、競合状態を考慮せずに、監視するオブジェクトがディレクトリである"
3393 "ことを保証することができるようになる。"
3396 #: build/C/man7/inotify.7:355
3398 "The following bits may be set in the I<mask> field returned by B<read>(2):"
3399 msgstr "以下のビットが B<read>(2) で返される I<mask> フィールドに設定される:"
3402 #: build/C/man7/inotify.7:356
3404 msgid "B<IN_IGNORED>"
3405 msgstr "B<IN_IGNORED>"
3408 #: build/C/man7/inotify.7:362
3410 "Watch was removed explicitly (B<inotify_rm_watch>(2)) or automatically "
3411 "(file was deleted, or filesystem was unmounted). See also BUGS."
3413 "監視対象が (B<inotify_rm_watch>(2) により) 明示的に 削除された。もしくは "
3414 "(ファイルの削除、またはファイル システムのアンマウントにより) 自動的に削除さ"
3418 #: build/C/man7/inotify.7:362
3421 msgstr "B<IN_ISDIR>"
3424 #: build/C/man7/inotify.7:365
3425 msgid "Subject of this event is a directory."
3426 msgstr "このイベントの対象がディレクトリである。"
3429 #: build/C/man7/inotify.7:365
3431 msgid "B<IN_Q_OVERFLOW>"
3432 msgstr "B<IN_Q_OVERFLOW>"
3435 #: build/C/man7/inotify.7:370
3436 msgid "Event queue overflowed (I<wd> is -1 for this event)."
3437 msgstr "イベントキューが溢れた (このイベントの場合、I<wd> は -1 である)。"
3440 #: build/C/man7/inotify.7:370
3442 msgid "B<IN_UNMOUNT>"
3443 msgstr "B<IN_UNMOUNT>"
3446 #: build/C/man7/inotify.7:376
3448 "Filesystem containing watched object was unmounted. In addition, an "
3449 "B<IN_IGNORED> event will subsequently be generated for the watch descriptor."
3451 "監視対象オブジェクトを含むファイルシステムがアンマウントされた。さらに、この"
3452 "監視対象ディスクリプターに対して B<IN_IGNORED> イベントが生成される。"
3455 #: build/C/man7/inotify.7:377
3461 #: build/C/man7/inotify.7:385
3463 "Suppose an application is watching the directory I<dir> and the file I<dir/"
3464 "myfile> for all events. The examples below show some events that will be "
3465 "generated for these two objects."
3467 "アプリケーションがディレクトリ I<dir> とファイル I<dir/myfile> のすべてのイベ"
3468 "ントを監視しているとする。 以下に、これらの 2 つのオブジェクトに対して生成さ"
3472 #: build/C/man7/inotify.7:386
3474 msgid "fd = open(\"dir/myfile\", O_RDWR);"
3475 msgstr "fd = open(\"dir/myfile\", O_RDWR);"
3478 #: build/C/man7/inotify.7:394
3479 msgid "Generates B<IN_OPEN> events for both I<dir> and I<dir/myfile>."
3481 "I<dir> と I<dir/myfile> の両方に対して B<IN_OPEN> イベントが生成される。"
3484 #: build/C/man7/inotify.7:394
3486 msgid "read(fd, buf, count);"
3487 msgstr "read(fd, buf, count);"
3490 #: build/C/man7/inotify.7:402
3491 msgid "Generates B<IN_ACCESS> events for both I<dir> and I<dir/myfile>."
3493 "I<dir> と I<dir/myfile> の両方に対して B<IN_ACCESS> イベントが生成される"
3496 #: build/C/man7/inotify.7:402
3498 msgid "write(fd, buf, count);"
3499 msgstr "write(fd, buf, count);"
3502 #: build/C/man7/inotify.7:410
3503 msgid "Generates B<IN_MODIFY> events for both I<dir> and I<dir/myfile>."
3505 "I<dir> と I<dir/myfile> の両方に対して B<IN_MODIFY> イベントが生成される"
3508 #: build/C/man7/inotify.7:410
3510 msgid "fchmod(fd, mode);"
3511 msgstr "fchmod(fd, mode);"
3514 #: build/C/man7/inotify.7:418
3515 msgid "Generates B<IN_ATTRIB> events for both I<dir> and I<dir/myfile>."
3517 "I<dir> と I<dir/myfile> の両方に対して B<IN_ATTRIB> イベントが生成される"
3520 #: build/C/man7/inotify.7:418
3526 #: build/C/man7/inotify.7:426
3527 msgid "Generates B<IN_CLOSE_WRITE> events for both I<dir> and I<dir/myfile>."
3529 "I<dir> と I<dir/myfile> の両方に対して B<IN_CLOSE_WRITE> イベントが生成される"
3532 #: build/C/man7/inotify.7:435
3534 "Suppose an application is watching the directories I<dir1> and I<dir2>, and "
3535 "the file I<dir1/myfile>. The following examples show some events that may "
3538 "アプリケーションがディレクトリ I<dir1> と I<dir2>、およびファイル I<dir1/"
3539 "myfile> を監視しているとする。 以下に生成されるイベントの例を示す。"
3542 #: build/C/man7/inotify.7:436
3544 msgid "link(\"dir1/myfile\", \"dir2/new\");"
3545 msgstr "link(\"dir1/myfile\", \"dir2/new\");"
3548 #: build/C/man7/inotify.7:446
3550 "Generates an B<IN_ATTRIB> event for I<myfile> and an B<IN_CREATE> event for "
3553 "I<myfile> に対して B<IN_ATTRIB> イベントが生成され、 I<dir2> に対して "
3554 "B<IN_CREATE> イベントが生成される。"
3557 #: build/C/man7/inotify.7:446
3559 msgid "rename(\"dir1/myfile\", \"dir2/myfile\");"
3560 msgstr "rename(\"dir1/myfile\", \"dir2/myfile\");"
3563 #: build/C/man7/inotify.7:467
3565 "Generates an B<IN_MOVED_FROM> event for I<dir1>, an B<IN_MOVED_TO> event for "
3566 "I<dir2>, and an B<IN_MOVE_SELF> event for I<myfile>. The B<IN_MOVED_FROM> "
3567 "and B<IN_MOVED_TO> events will have the same I<cookie> value."
3569 "I<dir1> に対してイベント B<IN_MOVED_FROM> が、 I<dir2> に対してイベント "
3570 "B<IN_MOVED_TO> が、 I<myfile> に対してイベント B<IN_MOVE_SELF> が生成される。"
3571 "この際 イベント B<IN_MOVED_FROM> と B<IN_MOVED_TO> は同じ I<cookie> 値を持"
3575 #: build/C/man7/inotify.7:481
3577 "Suppose that I<dir1/xx> and I<dir2/yy> are (the only) links to the same "
3578 "file, and an application is watching I<dir1>, I<dir2>, I<dir1/xx>, and "
3579 "I<dir2/yy>. Executing the following calls in the order given below will "
3580 "generate the following events:"
3582 "I<dir1/xx> と I<dir2/yy> は同じファイルを参照するリンクで (他のリンクはないも"
3583 "のとする)、 アプリケーションは I<dir1>, I<dir2>, I<dir1/xx>, I<dir2/yy> を監"
3584 "視しているものとする。 以下に示す順序で下記の呼び出しを実行すると、以下のイベ"
3588 #: build/C/man7/inotify.7:482
3590 msgid "unlink(\"dir2/yy\");"
3591 msgstr "unlink(\"dir2/yy\");"
3594 #: build/C/man7/inotify.7:493
3596 "Generates an B<IN_ATTRIB> event for I<xx> (because its link count changes) "
3597 "and an B<IN_DELETE> event for I<dir2>."
3599 "I<xx> に対して B<IN_ATTRIB> イベントが生成され (リンク数が変化したため)、 "
3600 "I<dir2> に対して B<IN_DELETE> イベントが生成される。"
3603 #: build/C/man7/inotify.7:493
3605 msgid "unlink(\"dir1/xx\");"
3606 msgstr "unlink(\"dir1/xx\");"
3609 #: build/C/man7/inotify.7:506
3611 "Generates B<IN_ATTRIB>, B<IN_DELETE_SELF>, and B<IN_IGNORED> events for "
3612 "I<xx>, and an B<IN_DELETE> event for I<dir1>."
3614 "I<xx> に対してイベント B<IN_ATTRIB>, B<IN_DELETE_SELF>, B<IN_IGNORED> が生成"
3615 "され、 I<dir1> に対して B<IN_DELETE> イベントが生成される。"
3618 #: build/C/man7/inotify.7:513
3620 "Suppose an application is watching the directory I<dir> and (the empty) "
3621 "directory I<dir/subdir>. The following examples show some events that may "
3624 "アプリケーションがディレクトリ I<dir> と (空の) ディレクトリ I<dir/subdir> を"
3625 "監視しているものとする。 以下に生成されるイベントの例を示す。"
3628 #: build/C/man7/inotify.7:514
3630 msgid "mkdir(\"dir/new\", mode);"
3631 msgstr "mkdir(\"dir/new\", mode);"
3634 #: build/C/man7/inotify.7:520
3635 msgid "Generates an B<IN_CREATE | IN_ISDIR> event for I<dir>."
3636 msgstr "I<dir> に対して B<IN_CREATE | IN_ISDIR> イベントが生成される。"
3639 #: build/C/man7/inotify.7:520
3641 msgid "rmdir(\"dir/subdir\");"
3642 msgstr "rmdir(\"dir/subdir\");"
3645 #: build/C/man7/inotify.7:532
3647 "Generates B<IN_DELETE_SELF> and B<IN_IGNORED> events for I<subdir>, and an "
3648 "B<IN_DELETE | IN_ISDIR> event for I<dir>."
3650 "I<subdir> に対してイベント B<IN_DELETE_SELF> と B<IN_IGNORED> が生成され、 "
3651 "I<dir> に対して B<IN_DELETE | IN_ISDIR> イベントが生成される。"
3654 #: build/C/man7/inotify.7:533
3656 msgid "/proc interfaces"
3657 msgstr "/proc インターフェース"
3660 #: build/C/man7/inotify.7:536
3662 "The following interfaces can be used to limit the amount of kernel memory "
3663 "consumed by inotify:"
3665 "以下のインターフェースは、inotify で消費される カーネルメモリーの総量を制限す"
3669 #: build/C/man7/inotify.7:536
3671 msgid "I</proc/sys/fs/inotify/max_queued_events>"
3672 msgstr "I</proc/sys/fs/inotify/max_queued_events>"
3675 #: build/C/man7/inotify.7:545
3677 "The value in this file is used when an application calls B<inotify_init>(2) "
3678 "to set an upper limit on the number of events that can be queued to the "
3679 "corresponding inotify instance. Events in excess of this limit are dropped, "
3680 "but an B<IN_Q_OVERFLOW> event is always generated."
3682 "このファイルの値は、アプリケーションが B<inotify_init>(2) を呼び出すときに使"
3683 "用され、対応する inotify インスタンスについて キューに入れられるイベントの数"
3684 "の上限を設定する。 この制限を超えたイベントは破棄されるが、 B<IN_Q_OVERFLOW> "
3688 #: build/C/man7/inotify.7:545
3690 msgid "I</proc/sys/fs/inotify/max_user_instances>"
3691 msgstr "I</proc/sys/fs/inotify/max_user_instances>"
3694 #: build/C/man7/inotify.7:549
3696 "This specifies an upper limit on the number of inotify instances that can be "
3697 "created per real user ID."
3699 "1 つの実ユーザー ID に対して生成できる inotify インスタンスの数の上限を指定す"
3703 #: build/C/man7/inotify.7:549
3705 msgid "I</proc/sys/fs/inotify/max_user_watches>"
3706 msgstr "I</proc/sys/fs/inotify/max_user_watches>"
3709 #: build/C/man7/inotify.7:553
3711 "This specifies an upper limit on the number of watches that can be created "
3713 msgstr "作成可能な監視対象の数の実 UID 単位の上限を指定する。"
3716 #: build/C/man7/inotify.7:561
3718 "Inotify was merged into the 2.6.13 Linux kernel. The required library "
3719 "interfaces were added to glibc in version 2.4. (B<IN_DONT_FOLLOW>, "
3720 "B<IN_MASK_ADD>, and B<IN_ONLYDIR> were added in glibc version 2.5.)"
3722 "inotify は 2.6.13 の Linux カーネルに組込まれた。 これに必要なライブラリのイ"
3723 "ンターフェースは、 glibc のバージョン 2.4 に追加された (B<IN_DONT_FOLLOW>, "
3724 "B<IN_MASK_ADD>, B<IN_ONLYDIR> は glibc バージョン 2.5 で追加された)。"
3727 #: build/C/man7/inotify.7:563
3728 msgid "The inotify API is Linux-specific."
3729 msgstr "inotify API は Linux 独自のものである。"
3732 #: build/C/man7/inotify.7:570
3734 "Inotify file descriptors can be monitored using B<select>(2), B<poll>(2), "
3735 "and B<epoll>(7). When an event is available, the file descriptor indicates "
3738 "inotify ファイルディスクリプターは B<select>(2), B<poll>(2), B<epoll>(7) を"
3739 "使って監視できる。 イベントがある場合、ファイルディスクリプターは読み込み可能"
3743 #: build/C/man7/inotify.7:599
3745 "Since Linux 2.6.25, signal-driven I/O notification is available for inotify "
3746 "file descriptors; see the discussion of B<F_SETFL> (for setting the "
3747 "B<O_ASYNC> flag), B<F_SETOWN>, and B<F_SETSIG> in B<fcntl>(2). The "
3748 "I<siginfo_t> structure (described in B<sigaction>(2)) that is passed to the "
3749 "signal handler has the following fields set: I<si_fd> is set to the inotify "
3750 "file descriptor number; I<si_signo> is set to the signal number; I<si_code> "
3751 "is set to B<POLL_IN>; and B<POLLIN> is set in I<si_band>."
3753 "Linux 2.6.25 以降では、シグナル駆動 (signal-driven) I/O の通知が inotify ファ"
3754 "イルディスクリプターについて利用可能である。 B<fcntl>(2) に書かれている "
3755 "(B<O_ASYNC> フラグを設定するための) B<F_SETFL>, B<F_SETOWN>, B<F_SETSIG> の"
3756 "議論を参照のこと。 シグナルハンドラーに渡される I<siginfo_t> 構造体は、以下の"
3757 "フィールドが設定される (I<siginfo_t> は B<sigaction>(2) で説明されている)。 "
3758 "I<si_fd> には inotify ファイルディスクリプター番号が、 I<si_signo> にはシグナ"
3759 "ル番号が、 I<si_code> には B<POLL_IN> が、 I<si_band> には B<POLLIN> が設定さ"
3763 #: build/C/man7/inotify.7:612
3765 "If successive output inotify events produced on the inotify file descriptor "
3766 "are identical (same I<wd>, I<mask>, I<cookie>, and I<name>), then they are "
3767 "coalesced into a single event if the older event has not yet been read (but "
3768 "see BUGS). This reduces the amount of kernel memory required for the event "
3769 "queue, but also means that an application can't use inotify to reliably "
3770 "count file events."
3772 "inotify ファイルディスクリプターに対して 連続して生成される出力 inotify イベ"
3773 "ントが同一の場合 (I<wd>, I<mask>, I<cookie>, I<name> が等しい場合)、 前のイベ"
3774 "ントがまだ読み込まれていなければ、 連続するイベントが 1 つのイベントにまとめ"
3775 "られる (ただし「バグ」の節も参照のこと)。 これによりイベントキューに必要な"
3776 "カーネルメモリー量が減るが、 これはまたアプリケーションがファイルイベント数を"
3777 "信頼性を持って数えるのに inotify を使用できないということでもある。"
3780 #: build/C/man7/inotify.7:618
3782 "The events returned by reading from an inotify file descriptor form an "
3783 "ordered queue. Thus, for example, it is guaranteed that when renaming from "
3784 "one directory to another, events will be produced in the correct order on "
3785 "the inotify file descriptor."
3787 "inotify ファイルディスクリプターの読み込みで返されるイベントは、 順序付けられ"
3788 "たキューになる。 従って、たとえば、あるディレクトリの名前を別の名前に変更した"
3789 "場合、 inotify ファイルディスクリプターについての正しい順番で イベントが生成"
3793 #: build/C/man7/inotify.7:624
3795 "The B<FIONREAD> B<ioctl>(2) returns the number of bytes available to read "
3796 "from an inotify file descriptor."
3798 "B<FIONREAD> B<ioctl>(2) は inotify ファイルディスクリプターから何バイト読み"
3802 #: build/C/man7/inotify.7:631
3804 "The inotify API provides no information about the user or process that "
3805 "triggered the inotify event. In particular, there is no easy way for a "
3806 "process that is monitoring events via inotify to distinguish events that it "
3807 "triggers itself from those that are triggered by other processes."
3809 "inotify API では、inotify イベントが発生するきっかけとなったユーザーやプロセ"
3810 "スに関する情報は提供されない。とりわけ、inotify 経由でイベントを監視している"
3811 "プロセスが、自分自身がきっかけとなったイベントと他のプロセスがきっかけとなっ"
3812 "たイベントを区別する簡単な手段はない。"
3815 #: build/C/man7/inotify.7:644
3817 "Inotify reports only events that a user-space program triggers through the "
3818 "filesystem API. As a result, it does not catch remote events that occur on "
3819 "network filesystems. (Applications must fall back to polling the filesystem "
3820 "to catch such events.) Furthermore, various pseudo-filesystems such as I</"
3821 "proc>, I</sys>, and I</dev/pts> are not monitorable with inotify."
3823 "inotify は、ファイルシステム API 経由でユーザー空間プログラムがきっかけとなっ"
3824 "たイベントだけを報告する。 結果として、 inotify はネットワークファイルシステ"
3825 "ムで発生したリモートのイベントを捉えることはできない (このようなイベントを捉"
3826 "えるにはアプリケーションはファイルシステムをポーリングする必要がある)。 さら"
3827 "に、 I</proc>, I</sys>, I</dev/pts> といったいくつかの疑似ファイルシステムは "
3828 "inotify で監視することができない。"
3831 #: build/C/man7/inotify.7:651
3833 "The inotify API does not report file accesses and modifications that may "
3834 "occur because of B<mmap>(2), B<msync>(2), and B<munmap>(2)."
3836 "inotify API は B<mmap>(2), B<msync>(2), B<munmap>(2) により起こったファイルの"
3840 #: build/C/man7/inotify.7:655
3842 "The inotify API identifies affected files by filename. However, by the time "
3843 "an application processes an inotify event, the filename may already have "
3844 "been deleted or renamed."
3846 "inotify API では影響が受けるファイルをファイル名で特定する。\n"
3847 "しかしながら、アプリケーションが inotify イベントを処理する時点では、\n"
3848 "そのファイル名がすでに削除されたり変更されたりしている可能性がある。"
3851 #: build/C/man7/inotify.7:660
3853 "The inotify API identifies events via watch descriptors. It is the "
3854 "application's responsibility to cache a mapping (if one is needed) between "
3855 "watch descriptors and pathnames. Be aware that directory renamings may "
3856 "affect multiple cached pathnames."
3858 "inotify API では監視対象ディスクリプターを通してイベントが区別される。 (必要"
3859 "であれば) 監視対象ディスクリプターとパス名のマッピングをキャッシュしておくの"
3860 "はアプリケーションの役目である。 ディレクトリの名前変更の場合、キャッシュして"
3861 "いる複数のパス名に影響がある点に注意すること。"
3864 #: build/C/man7/inotify.7:665
3866 "Inotify monitoring of directories is not recursive: to monitor "
3867 "subdirectories under a directory, additional watches must be created. This "
3868 "can take a significant amount time for large directory trees."
3870 "inotify によるディレクトリの監視は再帰的に行われない: あるディレクトリ以下"
3872 "サブディレクトリを監視する場合、 監視対象を追加で作成しなければならない。\n"
3873 "大きなディレクトリツリーの場合には、この作業にかなり時間がかかることがある。"
3876 #: build/C/man7/inotify.7:674
3878 "If monitoring an entire directory subtree, and a new subdirectory is created "
3879 "in that tree or an existing directory is renamed into that tree, be aware "
3880 "that by the time you create a watch for the new subdirectory, new files (and "
3881 "subdirectories) may already exist inside the subdirectory. Therefore, you "
3882 "may want to scan the contents of the subdirectory immediately after adding "
3883 "the watch (and, if desired, recursively add watches for any subdirectories "
3884 "that it contains)."
3886 "ディレクトリツリー全体を監視していて、 そのツリー内に新しいサブディレクトリが"
3887 "作成されるか、 既存のディレクトリが名前が変更されそのツリー内に移動した場"
3888 "合、 新しいサブディレクトリに対する watch を作成するまでに、 新しいファイル "
3889 "(やサブディレクトリ) がそのサブディレクトリ内にすでに作成されている場合がある"
3890 "点に注意すること。 したがって、watch を追加した直後にサブディレクトリの内容を"
3891 "スキャンしたいと思う場合もあるだろう (必要ならそのサブディレクトリ内のサブ"
3892 "ディレクトリに対する watch も再帰的に追加することもあるだろう)。"
3895 #: build/C/man7/inotify.7:686
3897 "Note that the event queue can overflow. In this case, events are lost. "
3898 "Robust applications should handle the possibility of lost events "
3899 "gracefully. For example, it may be necessary to rebuild part or all of the "
3900 "application cache. (One simple, but possibly expensive, approach is to "
3901 "close the inotify file descriptor, empty the cache, create a new inotify "
3902 "file descriptor, and then re-create watches and cache entries for the "
3903 "objects to be monitored.)"
3905 "イベントキューはオーバーフローする場合があることに注意すること。 この場合、イ"
3906 "ベントは失なわれる。 ロバスト性が求められるアプリケーションでは、 イベントが"
3907 "失なわれる可能性も含めて適切に処理を行うべきである。 例えば、アプリケーション"
3908 "内のキャッシュの一部分または全てを再構築する必要があるかもしれない。 (単純だ"
3909 "が、おそらくコストがかかる方法は、 inotify ファイルディスクリプターをクローズ"
3910 "し、 キャッシュを空にし、 新しい inotify ファイルディスクリプターを作成し、 "
3911 "監視しているオブジェクトの監視対象ディスクリプターとキャッシュエントリーの再"
3915 #: build/C/man7/inotify.7:686
3917 msgid "Dealing with rename() events"
3918 msgstr "rename() イベントの取り扱い"
3921 #: build/C/man7/inotify.7:695
3923 "As noted above, the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair that is "
3924 "generated by B<rename>(2) can be matched up via their shared cookie value. "
3925 "However, the task of matching has some challenges."
3927 "上述の通り、 B<rename>(2) により生成される B<IN_MOVED_FROM> と "
3928 "B<IN_MOVED_TO> イベントの組は、共有される cookie 値によって対応を取ることがで"
3929 "きる。 しかし、対応を取る場合にはいくつか難しい点がある。"
3932 #: build/C/man7/inotify.7:712
3934 "These two events are usually consecutive in the event stream available when "
3935 "reading from the inotify file descriptor. However, this is not guaranteed. "
3936 "If multiple processes are triggering events for monitored objects, then (on "
3937 "rare occasions) an arbitrary number of other events may appear between the "
3938 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events. Furthermore, it is not "
3939 "guaranteed that the event pair is atomically inserted into the queue: there "
3940 "may be a brief interval where the B<IN_MOVED_FROM> has appeared, but the "
3941 "B<IN_MOVED_TO> has not."
3943 "これらの 2 つのイベントは、 inotify ファイルディスクリプターから読み出しを"
3944 "行った場合に、通常はイベントストリーム内で連続している。 しかしながら、連続し"
3945 "ていることは保証されていない。 複数のプロセスが監視対象オブジェクトでイベント"
3946 "を発生させた場合、 (めったに起こらないことだが) イベント B<IN_MOVED_FROM> と "
3947 "B<IN_MOVED_TO> の間に任意の数の他のイベントがはさまる可能性がある。 さらに、"
3948 "対となるイベントがアトミックにキューに挿入されることも保証されていない。 "
3949 "B<IN_MOVED_FROM> が現れたが B<IN_MOVED_TO> は現れていないという短い期間があり"
3953 #: build/C/man7/inotify.7:737
3955 "Matching up the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair generated by "
3956 "B<rename>(2) is thus inherently racy. (Don't forget that if an object is "
3957 "renamed outside of a monitored directory, there may not even be an "
3958 "B<IN_MOVED_TO> event.) Heuristic approaches (e.g., assume the events are "
3959 "always consecutive) can be used to ensure a match in most cases, but will "
3960 "inevitably miss some cases, causing the application to perceive the "
3961 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events as being unrelated. If watch "
3962 "descriptors are destroyed and re-created as a result, then those watch "
3963 "descriptors will be inconsistent with the watch descriptors in any pending "
3964 "events. (Re-creating the inotify file descriptor and rebuilding the cache "
3965 "may be useful to deal with this scenario.)"
3967 "したがって、 B<rename>(2) により生成された B<IN_MOVED_FROM> と "
3968 "B<IN_MOVED_TO> のイベントの組の対応を取るのは本質的に難しいことである (監視対"
3969 "象のディレクトリの外へオブジェクトの rename が行われた場合には "
3970 "B<IN_MOVED_TO> イベントは存在しさえしないことを忘れてはならない)。 (イベント"
3971 "は常に連続しているとの仮定を置くといった) 発見的な方法を使うと、ほとんどの場"
3972 "合でイベントの組をうまく見つけることができるが、 いくつかの場合に見逃すことが"
3973 "避けられず、 アプリケーションが B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントが"
3974 "無関係だとみなしてしまう可能性がある。 結果的に、監視対象ディスクリプターが破"
3975 "棄され再作成された場合、これらの監視対象ディスクリプターは、処理待ちイベント"
3976 "の監視対象ディスクリプターと一貫性のないものになってしまう (inotify ファイル"
3977 "ディスクリプターの再作成とキャッシュの再構成はこの状況に対処するのに有用な方"
3981 #: build/C/man7/inotify.7:754
3983 "Applications should also allow for the possibility that the B<IN_MOVED_FROM> "
3984 "event was the last event that could fit in the buffer returned by the "
3985 "current call to B<read>(2), and the accompanying B<IN_MOVED_TO> event might "
3986 "be fetched only on the next B<read>(2), which should be done with a (small) "
3987 "timeout to allow for the fact that insertion of the B<IN_MOVED_FROM>-"
3988 "B<IN_MOVED_TO> event pair is not atomic, and also the possibility that there "
3989 "may not be any B<IN_MOVED_TO> event."
3991 "また、アプリケーションは、 B<IN_MOVED_FROM> イベントが今行った B<read>(2) の"
3992 "呼び出しで返されたバッファーのちょうど一番最後のイベントで、 B<IN_MOVED_TO> "
3993 "イベントは次の B<read>(2) を行わないと取得できない可能性も考慮に入れる必要が"
3994 "ある。 2 つ目の B<read>(2) は (短い) タイムアウトで行うべきである。 これは、 "
3995 "B<IN_MOVED_FROM>-B<IN_MOVED_TO> のイベントペアのキューへの挿入はアトミックで"
3996 "はなく、 また B<IN_MOVED_TO> イベントが全く発生しない可能性もあるという事実を"
3997 "考慮に入れておく必要があるからである。"
4000 #: build/C/man7/inotify.7:758
4002 "As of kernel 3.17, calling B<fallocate>(2) does not create any inotify "
4005 "カーネル 3.17 時点では、 B<fallocate>(2) の呼び出しでは inotify イベントが生"
4008 #. FIXME . kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321
4009 #. implies that unmount events were buggy 2.6.11 to 2.6.36
4011 #: build/C/man7/inotify.7:766
4012 msgid "In kernels before 2.6.16, the B<IN_ONESHOT> I<mask> flag does not work."
4013 msgstr "2.6.16 以前のカーネルでは B<IN_ONESHOT> I<mask> フラグが働かない。"
4016 #: build/C/man7/inotify.7:776
4018 "As originally designed and implemented, the B<IN_ONESHOT> flag did not cause "
4019 "an B<IN_IGNORED> event to be generated when the watch was dropped after one "
4020 "event. However, as an unintended effect of other changes, since Linux "
4021 "2.6.36, an B<IN_IGNORED> event is generated in this case."
4023 "元々は設計/実装時の意図通り、 イベントが一つ発生し watch が削除された際に "
4024 "B<IN_ONESHOT> フラグでは B<IN_IGNORED> イベントが発生しなかった。 しかし、 別"
4025 "の変更での意図していなかった影響により、 Linux 2.6.36 以降では、 この場合に "
4026 "B<IN_IGNORED> イベントが生成される。"
4028 #. commit 1c17d18e3775485bf1e0ce79575eb637a94494a2
4030 #: build/C/man7/inotify.7:785
4032 "Before kernel 2.6.25, the kernel code that was intended to coalesce "
4033 "successive identical events (i.e., the two most recent events could "
4034 "potentially be coalesced if the older had not yet been read) instead "
4035 "checked if the most recent event could be coalesced with the I<oldest> "
4038 "カーネル 2.6.25 より前では、 連続する同一のイベントを一つにまとめることを意図"
4039 "したコード (古い方のイベントがまだ読み込まれていない場合に、 最新の 2 つのイ"
4040 "ベントを一つにまとめられる可能性がある) が、 最新のイベントが「最も古い」読み"
4041 "込まれていないイベントとまとめられるか をチェックするようになっていた。"
4043 #. FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=77111
4045 #: build/C/man7/inotify.7:815
4047 "When a watch descriptor is removed by calling B<inotify_rm_watch>(2) (or "
4048 "because a watch file is deleted or the filesystem that contains it is "
4049 "unmounted), any pending unread events for that watch descriptor remain "
4050 "available to read. As watch descriptors are subsequently allocated with "
4051 "B<inotify_add_watch>(2), the kernel cycles through the range of possible "
4052 "watch descriptors (0 to B<INT_MAX>) incrementally. When allocating a free "
4053 "watch descriptor, no check is made to see whether that watch descriptor "
4054 "number has any pending unread events in the inotify queue. Thus, it can "
4055 "happen that a watch descriptor is reallocated even when pending unread "
4056 "events exist for a previous incarnation of that watch descriptor number, "
4057 "with the result that the application might then read those events and "
4058 "interpret them as belonging to the file associated with the newly recycled "
4059 "watch descriptor. In practice, the likelihood of hitting this bug may be "
4060 "extremely low, since it requires that an application cycle through "
4061 "B<INT_MAX> watch descriptors, release a watch descriptor while leaving "
4062 "unread events for that watch descriptor in the queue, and then recycle that "
4063 "watch descriptor. For this reason, and because there have been no reports "
4064 "of the bug occurring in real-world applications, as of Linux 3.15, no kernel "
4065 "changes have yet been made to eliminate this possible bug."
4067 "B<inotify_rm_watch>(2) の呼び出しにより監視対象ディスクリプターが削除された場"
4068 "合 (なお、監視対象ファイルの削除や監視対象ファイルが含まれるファイルシステム"
4069 "のアンマウントによっても監視対象ディスクリプターは削除される)、 この監視対象"
4070 "ディスクリプター関連の処理待ちの未読み出しイベントは、 読み出し可能なままとな"
4071 "る。 監視対象ディスクリプターは B<inotify_add_watch>(2) によって後で割り当て"
4072 "られるため、 カーネルは利用可能な監視対象ディスクリプターの範囲 (0 から "
4073 "B<INT_MAX>) から昇順にサイクリックに割り当てを行う。未使用の監視対象ディスク"
4074 "リプターを割り当てる際、 その監視対象ディスクリプター番号に inotify キューで"
4075 "処理待ちの未読み出しイベントがあるかの確認は行われない。 したがって、監視対象"
4076 "ディスクリプターが再割り当てされた際に、 その監視対象ディスクリプターの一つ前"
4077 "の使用時に発生した処理待ちの未読み出しイベントが存在するということが起こりう"
4078 "る。 その結果、アプリケーションはこれらのイベントを読み出す可能性があり、 こ"
4079 "れらのイベントが新しく再利用された監視対象ディスクリプターに関連付けられた"
4080 "ファイルに属するものかを解釈する必要が出て来る。 実際のところ、このバグを踏む"
4081 "可能性は極めて低い。 それは、このバグを踏むためには、アプリケーションが "
4082 "B<INT_MAX> 個の監視対象ディスクリプターが一周させて、 キューに未読み出しイベ"
4083 "ントが残っている監視対象ディスクリプターを解放し、 その監視対象ディスクリプ"
4084 "ターを再利用する必要があるからである。 この理由と、実世界のアプリケーションで"
4085 "発生したというバグ報告がないことから、 Linux 3.15 時点では、この計算上は起こ"
4086 "りうるバグを取り除くためのカーネルの変更は行われていない。"
4089 #: build/C/man7/inotify.7:823
4091 "The following program demonstrates the usage of the inotify API. It marks "
4092 "the directories passed as a command-line arguments and waits for events of "
4093 "type B<IN_OPEN>, B<IN_CLOSE_NOWRITE> and B<IN_CLOSE_WRITE>."
4095 "以下のプログラムは inotify API の使用例を示したものである。 コマンドライン引"
4096 "き数で渡されたディレクトリに印を付け、 タイプが B<IN_OPEN>, "
4097 "B<IN_CLOSE_NOWRITE> B<IN_CLOSE_WRITE> のイベントを待つ。"
4100 #: build/C/man7/inotify.7:838
4102 "The following output was recorded while editing the file I</home/user/temp/"
4103 "foo> and listing directory I</tmp>. Before the file and the directory were "
4104 "opened, B<IN_OPEN> events occurred. After the file was closed, an "
4105 "B<IN_CLOSE_WRITE> event occurred. After the directory was closed, an "
4106 "B<IN_CLOSE_NOWRITE> event occurred. Execution of the program ended when the "
4107 "user pressed the ENTER key."
4109 "以下は、 ファイル I</home/user/temp/foo> を編集し、 ディレクトリ I</tmp> の一"
4110 "覧表示を行った場合の出力である。 対象のファイルとディレクトリがオープンされる"
4111 "前に、イベント B<IN_OPEN> が発生している。 対象ファイルがクローズされた後にイ"
4112 "ベント B<IN_CLOSE_WRITE> が発生している。 対象ディレクトリがクローズされた後"
4113 "にイベント B<IN_CLOSE_NOWRITE> が発生している。 ユーザーが ENTER キーを押する"
4117 #: build/C/man7/inotify.7:848
4120 "$ B<./a.out /tmp /home/user/temp>\n"
4121 "Press enter key to terminate.\n"
4122 "Listening for events.\n"
4123 "IN_OPEN: /home/user/temp/foo [file]\n"
4124 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
4125 "IN_OPEN: /tmp/ [directory]\n"
4126 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
4128 "$ B<./a.out /tmp /home/user/temp>\n"
4129 "Press enter key to terminate.\n"
4130 "Listening for events.\n"
4131 "IN_OPEN: /home/user/temp/foo [file]\n"
4132 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
4133 "IN_OPEN: /tmp/ [directory]\n"
4134 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
4137 #: build/C/man7/inotify.7:860
4140 "#include E<lt>errno.hE<gt>\n"
4141 "#include E<lt>poll.hE<gt>\n"
4142 "#include E<lt>stdio.hE<gt>\n"
4143 "#include E<lt>stdlib.hE<gt>\n"
4144 "#include E<lt>sys/inotify.hE<gt>\n"
4145 "#include E<lt>unistd.hE<gt>\n"
4147 "#include E<lt>errno.hE<gt>\n"
4148 "#include E<lt>poll.hE<gt>\n"
4149 "#include E<lt>stdio.hE<gt>\n"
4150 "#include E<lt>stdlib.hE<gt>\n"
4151 "#include E<lt>sys/inotify.hE<gt>\n"
4152 "#include E<lt>unistd.hE<gt>\n"
4155 #: build/C/man7/inotify.7:866
4158 "/* Read all available inotify events from the file descriptor 'fd'.\n"
4159 " wd is the table of watch descriptors for the directories in argv.\n"
4160 " argc is the length of wd and argv.\n"
4161 " argv is the list of watched directories.\n"
4162 " Entry 0 of wd and argv is unused. */\n"
4164 "/* Read all available inotify events from the file descriptor 'fd'.\n"
4165 " wd is the table of watch descriptors for the directories in argv.\n"
4166 " argc is the length of wd and argv.\n"
4167 " argv is the list of watched directories.\n"
4168 " Entry 0 of wd and argv is unused. */\n"
4171 #: build/C/man7/inotify.7:875
4175 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
4177 " /* Some systems cannot read integer variables if they are not\n"
4178 " properly aligned. On other systems, incorrect alignment may\n"
4179 " decrease performance. Hence, the buffer used for reading from\n"
4180 " the inotify file descriptor should have the same alignment as\n"
4181 " struct inotify_event. */\n"
4184 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
4186 " /* Some systems cannot read integer variables if they are not\n"
4187 " properly aligned. On other systems, incorrect alignment may\n"
4188 " decrease performance. Hence, the buffer used for reading from\n"
4189 " the inotify file descriptor should have the same alignment as\n"
4190 " struct inotify_event. */\n"
4193 #: build/C/man7/inotify.7:882
4197 " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
4198 " const struct inotify_event *event;\n"
4204 " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
4205 " const struct inotify_event *event;\n"
4211 #: build/C/man7/inotify.7:884
4213 msgid " /* Loop while events can be read from inotify file descriptor. */\n"
4214 msgstr " /* Loop while events can be read from inotify file descriptor. */\n"
4217 #: build/C/man7/inotify.7:886
4219 msgid " for (;;) {\n"
4220 msgstr " for (;;) {\n"
4223 #: build/C/man7/inotify.7:888
4225 msgid " /* Read some events. */\n"
4226 msgstr " /* Read some events. */\n"
4229 #: build/C/man7/inotify.7:894
4232 " len = read(fd, buf, sizeof buf);\n"
4233 " if (len == -1 && errno != EAGAIN) {\n"
4234 " perror(\"read\");\n"
4235 " exit(EXIT_FAILURE);\n"
4238 " len = read(fd, buf, sizeof buf);\n"
4239 " if (len == -1 && errno != EAGAIN) {\n"
4240 " perror(\"read\");\n"
4241 " exit(EXIT_FAILURE);\n"
4245 #: build/C/man7/inotify.7:898
4248 " /* If the nonblocking read() found no events to read, then\n"
4249 " it returns -1 with errno set to EAGAIN. In that case,\n"
4250 " we exit the loop. */\n"
4252 " /* If the nonblocking read() found no events to read, then\n"
4253 " it returns -1 with errno set to EAGAIN. In that case,\n"
4254 " we exit the loop. */\n"
4257 #: build/C/man7/inotify.7:906
4260 " for (ptr = buf; ptr E<lt> buf + len;\n"
4261 " ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
4263 " for (ptr = buf; ptr E<lt> buf + len;\n"
4264 " ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
4267 #: build/C/man7/inotify.7:908
4269 msgid " event = (const struct inotify_event *) ptr;\n"
4270 msgstr " event = (const struct inotify_event *) ptr;\n"
4273 #: build/C/man7/inotify.7:910
4275 msgid " /* Print event type */\n"
4276 msgstr " /* Print event type */\n"
4279 #: build/C/man7/inotify.7:917
4282 " if (event-E<gt>mask & IN_OPEN)\n"
4283 " printf(\"IN_OPEN: \");\n"
4284 " if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
4285 " printf(\"IN_CLOSE_NOWRITE: \");\n"
4286 " if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
4287 " printf(\"IN_CLOSE_WRITE: \");\n"
4289 " if (event-E<gt>mask & IN_OPEN)\n"
4290 " printf(\"IN_OPEN: \");\n"
4291 " if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
4292 " printf(\"IN_CLOSE_NOWRITE: \");\n"
4293 " if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
4294 " printf(\"IN_CLOSE_WRITE: \");\n"
4297 #: build/C/man7/inotify.7:919
4299 msgid " /* Print the name of the watched directory */\n"
4300 msgstr " /* Print the name of the watched directory */\n"
4303 #: build/C/man7/inotify.7:926
4306 " for (i = 1; i E<lt> argc; ++i) {\n"
4307 " if (wd[i] == event-E<gt>wd) {\n"
4308 " printf(\"%s/\", argv[i]);\n"
4313 " for (i = 1; i E<lt> argc; ++i) {\n"
4314 " if (wd[i] == event-E<gt>wd) {\n"
4315 " printf(\"%s/\", argv[i]);\n"
4321 #: build/C/man7/inotify.7:928
4323 msgid " /* Print the name of the file */\n"
4324 msgstr " /* Print the name of the file */\n"
4327 #: build/C/man7/inotify.7:931
4330 " if (event-E<gt>len)\n"
4331 " printf(\"%s\", event-E<gt>name);\n"
4333 " if (event-E<gt>len)\n"
4334 " printf(\"%s\", event-E<gt>name);\n"
4337 #: build/C/man7/inotify.7:933
4339 msgid " /* Print type of filesystem object */\n"
4340 msgstr " /* Print type of filesystem object */\n"
4343 #: build/C/man7/inotify.7:941
4346 " if (event-E<gt>mask & IN_ISDIR)\n"
4347 " printf(\" [directory]\\en\");\n"
4349 " printf(\" [file]\\en\");\n"
4354 " if (event-E<gt>mask & IN_ISDIR)\n"
4355 " printf(\" [directory]\\en\");\n"
4357 " printf(\" [file]\\en\");\n"
4363 #: build/C/man7/inotify.7:950
4367 "main(int argc, char* argv[])\n"
4370 " int fd, i, poll_num;\n"
4373 " struct pollfd fds[2];\n"
4376 "main(int argc, char* argv[])\n"
4379 " int fd, i, poll_num;\n"
4382 " struct pollfd fds[2];\n"
4385 #: build/C/man7/inotify.7:955
4388 " if (argc E<lt> 2) {\n"
4389 " printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
4390 " exit(EXIT_FAILURE);\n"
4393 " if (argc E<lt> 2) {\n"
4394 " printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
4395 " exit(EXIT_FAILURE);\n"
4399 #: build/C/man7/inotify.7:957
4401 msgid " printf(\"Press ENTER key to terminate.\\en\");\n"
4402 msgstr " printf(\"Press ENTER key to terminate.\\en\");\n"
4405 #: build/C/man7/inotify.7:959
4407 msgid " /* Create the file descriptor for accessing the inotify API */\n"
4408 msgstr " /* Create the file descriptor for accessing the inotify API */\n"
4411 #: build/C/man7/inotify.7:965
4414 " fd = inotify_init1(IN_NONBLOCK);\n"
4415 " if (fd == -1) {\n"
4416 " perror(\"inotify_init1\");\n"
4417 " exit(EXIT_FAILURE);\n"
4420 " fd = inotify_init1(IN_NONBLOCK);\n"
4421 " if (fd == -1) {\n"
4422 " perror(\"inotify_init1\");\n"
4423 " exit(EXIT_FAILURE);\n"
4427 #: build/C/man7/inotify.7:967
4429 msgid " /* Allocate memory for watch descriptors */\n"
4430 msgstr " /* Allocate memory for watch descriptors */\n"
4433 #: build/C/man7/inotify.7:973
4436 " wd = calloc(argc, sizeof(int));\n"
4437 " if (wd == NULL) {\n"
4438 " perror(\"calloc\");\n"
4439 " exit(EXIT_FAILURE);\n"
4442 " wd = calloc(argc, sizeof(int));\n"
4443 " if (wd == NULL) {\n"
4444 " perror(\"calloc\");\n"
4445 " exit(EXIT_FAILURE);\n"
4449 #: build/C/man7/inotify.7:977
4452 " /* Mark directories for events\n"
4453 " - file was opened\n"
4454 " - file was closed */\n"
4456 " /* Mark directories for events\n"
4457 " - file was opened\n"
4458 " - file was closed */\n"
4461 #: build/C/man7/inotify.7:987
4464 " for (i = 1; i E<lt> argc; i++) {\n"
4465 " wd[i] = inotify_add_watch(fd, argv[i],\n"
4466 " IN_OPEN | IN_CLOSE);\n"
4467 " if (wd[i] == -1) {\n"
4468 " fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4469 " perror(\"inotify_add_watch\");\n"
4470 " exit(EXIT_FAILURE);\n"
4474 " for (i = 1; i E<lt> argc; i++) {\n"
4475 " wd[i] = inotify_add_watch(fd, argv[i],\n"
4476 " IN_OPEN | IN_CLOSE);\n"
4477 " if (wd[i] == -1) {\n"
4478 " fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4479 " perror(\"inotify_add_watch\");\n"
4480 " exit(EXIT_FAILURE);\n"
4485 #: build/C/man7/inotify.7:998
4487 msgid " /* Inotify input */\n"
4488 msgstr " /* Inotify input */\n"
4491 #: build/C/man7/inotify.7:1003
4493 msgid " /* Wait for events and/or terminal input */\n"
4494 msgstr " /* Wait for events and/or terminal input */\n"
4497 #: build/C/man7/inotify.7:1013
4500 " printf(\"Listening for events.\\en\");\n"
4502 " poll_num = poll(fds, nfds, -1);\n"
4503 " if (poll_num == -1) {\n"
4504 " if (errno == EINTR)\n"
4506 " perror(\"poll\");\n"
4507 " exit(EXIT_FAILURE);\n"
4510 " printf(\"Listening for events.\\en\");\n"
4512 " poll_num = poll(fds, nfds, -1);\n"
4513 " if (poll_num == -1) {\n"
4514 " if (errno == EINTR)\n"
4516 " perror(\"poll\");\n"
4517 " exit(EXIT_FAILURE);\n"
4521 #: build/C/man7/inotify.7:1015
4523 msgid " if (poll_num E<gt> 0) {\n"
4524 msgstr " if (poll_num E<gt> 0) {\n"
4527 #: build/C/man7/inotify.7:1017
4529 msgid " if (fds[0].revents & POLLIN) {\n"
4530 msgstr " if (fds[0].revents & POLLIN) {\n"
4533 #: build/C/man7/inotify.7:1019
4535 msgid " /* Console input is available. Empty stdin and quit */\n"
4536 msgstr " /* Console input is available. Empty stdin and quit */\n"
4539 #: build/C/man7/inotify.7:1028
4541 msgid " /* Inotify events are available */\n"
4542 msgstr " /* Inotify events are available */\n"
4545 #: build/C/man7/inotify.7:1033
4548 " handle_events(fd, wd, argc, argv);\n"
4553 " handle_events(fd, wd, argc, argv);\n"
4559 #: build/C/man7/inotify.7:1035
4561 msgid " printf(\"Listening for events stopped.\\en\");\n"
4562 msgstr " printf(\"Listening for events stopped.\\en\");\n"
4565 #: build/C/man7/inotify.7:1037
4567 msgid " /* Close inotify file descriptor */\n"
4568 msgstr " /* Close inotify file descriptor */\n"
4571 #: build/C/man7/inotify.7:1039
4573 msgid " close(fd);\n"
4574 msgstr " close(fd);\n"
4577 #: build/C/man7/inotify.7:1043
4581 " exit(EXIT_SUCCESS);\n"
4585 " exit(EXIT_SUCCESS);\n"
4589 #: build/C/man7/inotify.7:1054
4591 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4592 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4593 "B<stat>(2), B<fanotify>(7)"
4595 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4596 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4597 "B<stat>(2), B<fanotify>(7)"
4600 #: build/C/man7/inotify.7:1057
4602 "I<Documentation/filesystems/inotify.txt> in the Linux kernel source tree"
4603 msgstr "Linux カーネルソース内の I<Documentation/filesystems/inotify.txt>"
4606 #: build/C/man2/inotify_add_watch.2:28
4608 msgid "INOTIFY_ADD_WATCH"
4609 msgstr "INOTIFY_ADD_WATCH"
4612 #: build/C/man2/inotify_add_watch.2:28
4618 #: build/C/man2/inotify_add_watch.2:31
4619 msgid "inotify_add_watch - add a watch to an initialized inotify instance"
4621 "inotify_add_watch - 初期化済み inotify インスタンスに監視対象を追加する"
4624 #: build/C/man2/inotify_add_watch.2:33 build/C/man2/inotify_rm_watch.2:32
4625 msgid "B<#include E<lt>sys/inotify.hE<gt>>"
4626 msgstr "B<#include E<lt>sys/inotify.hE<gt>>"
4629 #: build/C/man2/inotify_add_watch.2:35
4631 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4634 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4638 #: build/C/man2/inotify_add_watch.2:54
4640 "B<inotify_add_watch>() adds a new watch, or modifies an existing watch, for "
4641 "the file whose location is specified in I<pathname>; the caller must have "
4642 "read permission for this file. The I<fd> argument is a file descriptor "
4643 "referring to the inotify instance whose watch list is to be modified. The "
4644 "events to be monitored for I<pathname> are specified in the I<mask> bit-mask "
4645 "argument. See B<inotify>(7) for a description of the bits that can be set "
4648 "B<inotify_add_watch>() は、 I<pathname> で指定された位置にあるファイルを監視"
4649 "する監視アイテム (watch) の新規追加、 または既存の監視アイテムの変更を行う。 "
4650 "呼び出し元は、監視対象のファイルに対する読み出し許可を 持っていなければならな"
4651 "い。 I<fd> 引き数は、変更を行う監視対象リスト (watch list) を持つ inotify イ"
4652 "ンスタンスを参照するファイルディスクリプターである。 I<pathname> のどのイベン"
4653 "トを監視するかは、引き数のビットマスク I<mask> で指定する。 I<mask> に設定で"
4654 "きるビットの説明については B<inotify>(7) を参照のこと。"
4657 #: build/C/man2/inotify_add_watch.2:66
4659 "A successful call to B<inotify_add_watch>() returns a unique watch "
4660 "descriptor for this inotify instance, for the filesystem object that "
4661 "corresponds to I<pathname>. If the filesystem object was not previously "
4662 "being watched by this inotify instance, then the watch descriptor is newly "
4663 "allocated. If the filesystem object was already being watched (perhaps via "
4664 "a different link to the same object), then the descriptor for the existing "
4665 "watch is returned."
4667 "B<inotify_add_watch>() の呼び出しが成功すると、 I<pathname> に対応するファイ"
4668 "ルシステムオブジェクトに対する、 一意な監視対象ディスクリプター (watch "
4669 "descriptor) を、 対象の inotify インスタンスに対して返す。 そのファイルシステ"
4670 "ムオブジェクトが対象の inotify インスタンスによって以前に監視されていない場合"
4671 "には、 監視対象ディスクリプターは新規に割り当てられる。 ファイルシステムオブ"
4672 "ジェクトが (おそらく同じオブジェクトに対する異なるリンク経由で) すでに監視さ"
4673 "れている場合には、 既存の監視に対するディスクリプターが返される。"
4676 #: build/C/man2/inotify_add_watch.2:77
4678 "The watch descriptor is returned by later B<read>(2)s from the inotify file "
4679 "descriptor. These reads fetch I<inotify_event> structures (see "
4680 "B<inotify>(7)) indicating filesystem events; the watch descriptor inside "
4681 "this structure identifies the object for which the event occurred."
4683 "これ以降に inotify ファイルディスクリプターから B<read>(2) を行うと、監視対"
4684 "象ディスクリプターが返される。 これらの B<read>() を行うと、ファイルシステム"
4685 "イベントを示す I<inotify_event> 構造体が読み出される (B<inotify>(7) 参照)。"
4686 "この構造体内の監視対象ディスクリプターにより、 どのオブジェクトでそのイベント"
4690 #: build/C/man2/inotify_add_watch.2:84
4692 "On success, B<inotify_add_watch>() returns a nonnegative watch descriptor. "
4693 "On error, -1 is returned and I<errno> is set appropriately."
4695 "成功すると、 B<inotify_add_watch>() は非負の監視対象ディスクリプターを返"
4696 "す。 エラーの場合、-1 を返し、 I<errno> を適切に設定する。"
4699 #: build/C/man2/inotify_add_watch.2:85
4705 #: build/C/man2/inotify_add_watch.2:88
4706 msgid "Read access to the given file is not permitted."
4707 msgstr "指定されたファイルに対する読み出しアクセスが許可されていない。"
4710 #: build/C/man2/inotify_add_watch.2:91
4711 msgid "The given file descriptor is not valid."
4712 msgstr "指定されたファイルディスクリプターが有効ではない。"
4715 #: build/C/man2/inotify_add_watch.2:91
4721 #: build/C/man2/inotify_add_watch.2:95
4722 msgid "I<pathname> points outside of the process's accessible address space."
4724 "I<pathname> が指すアドレスがプロセスがアクセスできるアドレス空間外である。"
4727 #: build/C/man2/inotify_add_watch.2:100
4729 "The given event mask contains no valid events; or I<fd> is not an inotify "
4732 "指定されたイベントマスクに有効なイベントが含まれていない。 もしくは I<fd> が "
4733 "inotify ファイルディスクリプターではない。"
4736 #: build/C/man2/inotify_add_watch.2:100
4738 msgid "B<ENAMETOOLONG>"
4739 msgstr "B<ENAMETOOLONG>"
4742 #: build/C/man2/inotify_add_watch.2:104
4743 msgid "I<pathname> is too long."
4744 msgstr "I<pathname> が長過ぎる。"
4747 #: build/C/man2/inotify_add_watch.2:109
4749 "A directory component in I<pathname> does not exist or is a dangling "
4752 "I<pathname> のディレクトリ部分の構成要素が、存在しないか、\n"
4753 "リンク切れのシンボリックリンクである。"
4756 #: build/C/man2/inotify_add_watch.2:112
4757 msgid "Insufficient kernel memory was available."
4758 msgstr "カーネルメモリーが十分になかった。"
4761 #: build/C/man2/inotify_add_watch.2:116
4763 "The user limit on the total number of inotify watches was reached or the "
4764 "kernel failed to allocate a needed resource."
4766 "inotify 監視対象の総数がユーザーが追加できる上限に達していた。 もしくは、必要"
4767 "な資源の割り当てにカーネルが失敗した。"
4770 #: build/C/man2/inotify_add_watch.2:118 build/C/man2/inotify_rm_watch.2:69
4771 msgid "Inotify was merged into the 2.6.13 Linux kernel."
4772 msgstr "inotify は Linux カーネル 2.6.13 に組み込まれた。"
4775 #: build/C/man2/inotify_add_watch.2:124
4776 msgid "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4777 msgstr "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4780 #: build/C/man2/inotify_init.2:29
4782 msgid "INOTIFY_INIT"
4783 msgstr "INOTIFY_INIT"
4786 #: build/C/man2/inotify_init.2:29
4792 #: build/C/man2/inotify_init.2:32
4793 msgid "inotify_init, inotify_init1 - initialize an inotify instance"
4794 msgstr "inotify_init, inotify_init1 - inotify インスタンスを初期化する"
4797 #: build/C/man2/inotify_init.2:35
4799 msgid "B<#include E<lt>sys/inotify.hE<gt>>\n"
4800 msgstr "B<#include E<lt>sys/inotify.hE<gt>>\n"
4803 #: build/C/man2/inotify_init.2:38
4806 "B<int inotify_init(void);>\n"
4807 "B<int inotify_init1(int >I<flags>B<);>\n"
4809 "B<int inotify_init(void);>\n"
4810 "B<int inotify_init1(int >I<flags>B<);>\n"
4813 #: build/C/man2/inotify_init.2:42
4814 msgid "For an overview of the inotify API, see B<inotify>(7)."
4815 msgstr "inotify API の概要については B<inotify>(7) を参照。"
4818 #: build/C/man2/inotify_init.2:46
4820 "B<inotify_init>() initializes a new inotify instance and returns a file "
4821 "descriptor associated with a new inotify event queue."
4823 "B<inotify_init>() は、新規の inotify インスタンスを初期化し、作成された "
4824 "inotify イベントキュー に対応するファイルディスクリプターを返す。"
4827 #: build/C/man2/inotify_init.2:56
4829 "If I<flags> is 0, then B<inotify_init1>() is the same as "
4830 "B<inotify_init>(). The following values can be bitwise ORed in I<flags> to "
4831 "obtain different behavior:"
4833 "B<inotify_init1>() は、 I<flags> が 0 の場合、 B<inotify_init>() と同じであ"
4834 "る。 I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作"
4838 #: build/C/man2/inotify_init.2:56
4840 msgid "B<IN_NONBLOCK>"
4841 msgstr "B<IN_NONBLOCK>"
4844 #: build/C/man2/inotify_init.2:64
4846 "Set the B<O_NONBLOCK> file status flag on the new open file description. "
4847 "Using this flag saves extra calls to B<fcntl>(2) to achieve the same result."
4849 "新しく生成されるオープンファイル記述 (open file description) の BR "
4850 "O_NONBLOCK ファイルステータスフラグをセットする。 このフラグを使うことで、 "
4851 "B<O_NONBLOCK> をセットするために B<fcntl>(2) を追加で呼び出す必要がなくな"
4855 #: build/C/man2/inotify_init.2:64
4857 msgid "B<IN_CLOEXEC>"
4858 msgstr "B<IN_CLOEXEC>"
4861 #: build/C/man2/inotify_init.2:74
4863 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
4864 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
4867 "新しいファイルディスクリプターに対して close-on-exec (B<FD_CLOEXEC>) フラグ"
4868 "をセットする。 このフラグが役に立つ理由については、 B<open>(2) の "
4869 "B<O_CLOEXEC> フラグの説明を参照のこと。"
4872 #: build/C/man2/inotify_init.2:79
4874 "On success, these system calls return a new file descriptor. On error, -1 "
4875 "is returned, and I<errno> is set to indicate the error."
4877 "成功すると、これらのシステムコールは新しいファイルディスクリプターを返す。 エ"
4878 "ラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
4881 #: build/C/man2/inotify_init.2:85
4882 msgid "(B<inotify_init1>()) An invalid value was specified in I<flags>."
4883 msgstr "(B<inotify_init1>()) 無効な値が I<flags> に指定された。"
4886 #: build/C/man2/inotify_init.2:88
4888 "The user limit on the total number of inotify instances has been reached."
4889 msgstr "inotify インスタンスの総数がユーザー単位の上限に達していた。"
4892 #: build/C/man2/inotify_init.2:91
4894 "The system limit on the total number of file descriptors has been reached."
4895 msgstr "inotify ファイルディスクリプターの総数がシステムの上限に達していた。"
4898 #: build/C/man2/inotify_init.2:94
4899 msgid "Insufficient kernel memory is available."
4900 msgstr "カーネルメモリーが十分になかった。"
4903 #: build/C/man2/inotify_init.2:101
4905 "B<inotify_init>() first appeared in Linux 2.6.13; library support was added "
4906 "to glibc in version 2.4. B<inotify_init1>() was added in Linux 2.6.27; "
4907 "library support was added to glibc in version 2.9."
4909 "B<inotify_init>() は Linux 2.6.13 で初めて登場し、\n"
4910 "ライブラリによるサポートは glibc バージョン 2.4 で追加された。\n"
4911 "B<inotify_init1>() は Linux 2.6.27 で追加され、\n"
4912 "ライブラリによるサポートは glibc バージョン 2.9 で追加された。"
4915 #: build/C/man2/inotify_init.2:103
4916 msgid "These system calls are Linux-specific."
4917 msgstr "これらのシステムコールは Linux 独自である。"
4920 #: build/C/man2/inotify_init.2:107
4921 msgid "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4922 msgstr "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4925 #: build/C/man2/inotify_rm_watch.2:27
4927 msgid "INOTIFY_RM_WATCH"
4928 msgstr "INOTIFY_RM_WATCH"
4931 #: build/C/man2/inotify_rm_watch.2:27
4937 #: build/C/man2/inotify_rm_watch.2:30
4938 msgid "inotify_rm_watch - remove an existing watch from an inotify instance"
4940 "inotify_rm_watch - inotify インスタンスから既存の監視アイテムを削除する"
4942 #. Before glibc 2.10, the second argument was types as uint32_t.
4943 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
4945 #: build/C/man2/inotify_rm_watch.2:36
4946 msgid "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4947 msgstr "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4950 #: build/C/man2/inotify_rm_watch.2:42
4952 "B<inotify_rm_watch>() removes the watch associated with the watch "
4953 "descriptor I<wd> from the inotify instance associated with the file "
4956 "B<inotify_rm_watch>() は、監視対象ディスクリプター (watch descriptor) "
4957 "I<wd> に対応する監視アイテムを、 ファイルディスクリプター I<fd> に対応する "
4958 "inotify インスタンスから削除する。"
4961 #: build/C/man2/inotify_rm_watch.2:48
4963 "Removing a watch causes an B<IN_IGNORED> event to be generated for this "
4964 "watch descriptor. (See B<inotify>(7).)"
4966 "監視対象を削除すると、 この監視対象ディスクリプターに対して B<IN_IGNORED> イ"
4967 "ベントが生成される (B<inotify>(7) 参照)。"
4970 #: build/C/man2/inotify_rm_watch.2:55
4972 "On success, B<inotify_rm_watch>() returns zero. On error, -1 is returned "
4973 "and I<errno> is set to indicate the cause of the error."
4975 "成功すると、B<inotify_rm_watch>() は 0 を返す。 エラーの場合、-1 を返し、 "
4976 "I<errno> をエラーの原因を示す値に設定する。"
4979 #: build/C/man2/inotify_rm_watch.2:60
4980 msgid "I<fd> is not a valid file descriptor."
4981 msgstr "I<fd> が有効なファイルディスクリプターではない。"
4984 #: build/C/man2/inotify_rm_watch.2:67
4986 "The watch descriptor I<wd> is not valid; or I<fd> is not an inotify file "
4989 "監視対象ディスクリプター I<wd> が有効でない。もしくは、 I<fd> が inotify ファ"
4993 #: build/C/man2/inotify_rm_watch.2:75
4994 msgid "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"
4995 msgstr "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"