1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "POT-Creation-Date: 2015-01-04 23:49+0900\n"
10 "PO-Revision-Date: 2015-01-11 03:38+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.)"
79 msgstr "fanotify API はファイルシステムイベントの通知と横取り機能 (interception) を提供する。 ユースケースとしては、ウイルススキャンや階層型ストレージの管理などがある。 現在のところ、限定的なイベントのみがサポートされている。 特に、作成 (create)、削除 (delete)、移動 (move) イベントがサポートされていない (これらのイベントを通知する API の詳細については B<inotify>(7) を参照)。"
82 #: build/C/man7/fanotify.7:44
84 "Additional capabilities compared to the B<inotify>(7) API include the "
85 "ability to monitor all of the objects in a mounted filesystem, the ability "
86 "to make access permission decisions, and the possibility to read or modify "
87 "files before access by other applications."
88 msgstr "B<inotify>(7) API と比較して追加されている機能としては、 マウントされたファイルシステムの全オブジェクトを監視する機能、 アクセス許可の判定を行う機能、 他のアプリケーションによるアクセスの前にファイルを読み出したり変更したりする機能がある。"
91 #: build/C/man7/fanotify.7:52
93 "The following system calls are used with this API: B<fanotify_init>(2), "
94 "B<fanotify_mark>(2), B<read>(2), B<write>(2), and B<close>(2)."
95 msgstr "この API では以下のシステムコールを使用する: B<fanotify_init>(2), B<fanotify_mark>(2), B<read>(2), B<write>(2), B<close>(2)。"
98 #: build/C/man7/fanotify.7:52
100 msgid "fanotify_init(), fanotify_mark(), and notification groups"
101 msgstr "fanotify_init(), fanotify_mark() と通知グループ"
104 #: build/C/man7/fanotify.7:57
106 "The B<fanotify_init>(2) system call creates and initializes an fanotify "
107 "notification group and returns a file descriptor referring to it."
108 msgstr "B<fanotify_init>(2) システムコールは fanotify 通知グループを作成、初期化し、 この通知グループを参照するファイルディスクリプターを返す。"
111 #: build/C/man7/fanotify.7:61
113 "An fanotify notification group is a kernel-internal object that holds a list "
114 "of files, directories, and mount points for which events shall be created."
115 msgstr "fanotify 通知グループはカーネル内部のオブジェクトで、 イベントが作成されるファイル、 ディレクトリ、 マウントポイントのリストを保持する。"
118 #: build/C/man7/fanotify.7:72
120 "For each entry in an fanotify notification group, two bit masks exist: the "
121 "I<mark> mask and the I<ignore> mask. The mark mask defines file activities "
122 "for which an event shall be created. The ignore mask defines activities for "
123 "which no event shall be generated. Having these two types of masks permits "
124 "a mount point or directory to be marked for receiving events, while at the "
125 "same time ignoring events for specific objects under that mount point or "
127 msgstr "fanotify 通知グループの各エントリーには 2 つのビットマスクがある。 I<mark> マスクと I<ignore> マスクである。 mark マスクはどのファイル操作についてイベントを作成するかを定義する。 ignore マスクはどの操作についてイベントを作成しないかを定義する。 これらの 2 種類のマスクがあることで、 マウントポイントやディレクトリに対してイベントの受信を mark しておきつつ、 同時にそのマウントポイントやディレクトリ配下の特定のオブジェクトに対するイベントを無視する、 といったことができる。"
130 #: build/C/man7/fanotify.7:78
132 "The B<fanotify_mark>(2) system call adds a file, directory, or mount to a "
133 "notification group and specifies which events shall be reported (or "
134 "ignored), or removes or modifies such an entry."
135 msgstr "B<fanotify_mark>(2) システムコールは、ファイル、ディレクトリ、マウントを通知グループに追加し、 どのイベントを報告 (もしくは無視) するかを指定する。 また、このようなエントリーの削除、変更も行う。"
138 #: build/C/man7/fanotify.7:91
140 "A possible usage of the ignore mask is for a file cache. Events of interest "
141 "for a file cache are modification of a file and closing of the same. Hence, "
142 "the cached directory or mount point is to be marked to receive these "
143 "events. After receiving the first event informing that a file has been "
144 "modified, the corresponding cache entry will be invalidated. No further "
145 "modification events for this file are of interest until the file is closed. "
146 "Hence, the modify event can be added to the ignore mask. Upon receiving the "
147 "close event, the modify event can be removed from the ignore mask and the "
148 "file cache entry can be updated."
149 msgstr "ignore マスクの考えられる使用方法はファイルキャッシュに対してである。 ファイルキャッシュに関して興味のあるイベントは、ファイルの変更とファイルのクローズである。 それゆえ、 キャッシュされたディレクトリやマウントポイントは、 これらのイベントを受信するようにマークされる。 ファイルが変更されたという最初のイベントを受信した後は、 対応するキャッシュエントリーは無効化される。 そのファイルがクローズされるまでは、 このファイルに対する変更イベントは興味のない情報となる。 したがって、 変更イベントを ignore マスクに追加することができる。 クローズイベントを受信すると、 変更イベントを ignore イベントから削除し、 ファイルキャッシュエントリーを更新することができる。"
152 #: build/C/man7/fanotify.7:98
154 "The entries in the fanotify notification groups refer to files and "
155 "directories via their inode number and to mounts via their mount ID. If "
156 "files or directories are renamed or moved, the respective entries survive. "
157 "If files or directories are deleted or mounts are unmounted, the "
158 "corresponding entries are deleted."
159 msgstr "fanotify 通知グループのエントリーは、 ファイルやディレクトリでは inode 番号経由で参照され、 マウントではマウント ID 経由で参照される。 ファイルやディレクトリの名前が変更されたり、移動されたりした場合も、 関連するエントリーはそのまま残る。 ファイルやディレクトリが削除されたり、マウントがアンマウントされたりした場合には、 対応するエントリーは削除される。"
162 #: build/C/man7/fanotify.7:98
164 msgid "The event queue"
168 #: build/C/man7/fanotify.7:107
170 "As events occur on the filesystem objects monitored by a notification group, "
171 "the fanotify system generates events that are collected in a queue. These "
172 "events can then be read (using B<read>(2) or similar) from the fanotify "
173 "file descriptor returned by B<fanotify_init>(2)."
174 msgstr "通知グループにより監視されているファイルシステムオブジェクトでイベントが発生すると、 fanotify システムはイベントを生成し、 そのイベントはキューにまとめられる。 これらのイベントは、 B<fanotify_init>(2) が返した fanotify ファイルディスクリプターから (B<read>(2) などを使って) 読み出すことができる。"
177 #: build/C/man7/fanotify.7:121
179 "Two types of events are generated: I<notification> events and I<permission> "
180 "events. Notification events are merely informative and require no action to "
181 "be taken by the receiving application except for closing the file descriptor "
182 "passed in the event (see below). Permission events are requests to the "
183 "receiving application to decide whether permission for a file access shall "
184 "be granted. For these events, the recipient must write a response which "
185 "decides whether access is granted or not."
186 msgstr "2 種類のイベントが生成される。 I<notification> (通知) イベントと I<permission> (アクセス許可) イベントである。 通知イベントは単なる情報通知であり、 イベントで渡されたファイルディスクリプターをクローズする場合 (下記参照) を除き、 受信したアプリケーションでアクションを取る必要はない。 アクセス許可イベントは、 受信したアプリケーションがファイルアクセスの許可を承認するかを判定する必要がある。 この場合、 受信者はアクセスが許可されたか否かを決定する応答を書き込まなければならない。"
189 #: build/C/man7/fanotify.7:128
191 "An event is removed from the event queue of the fanotify group when it has "
192 "been read. Permission events that have been read are kept in an internal "
193 "list of the fanotify group until either a permission decision has been taken "
194 "by writing to the fanotify file descriptor or the fanotify file descriptor "
196 msgstr "イベントは、 読み出されると、 fanotify グループのイベントキューから削除される。 読み出されたアクセス許可イベントは、 fanotify ファイルディスクリプターにアクセス許可の判定が書き込まれるか、 fanotify ファイルディスクリプターがクローズされるまで、 fanotify グループの内部のリストに保持される。"
199 #: build/C/man7/fanotify.7:128
201 msgid "Reading fanotify events"
202 msgstr "fanotify イベントの読み出し"
205 #: build/C/man7/fanotify.7:140
207 "Calling B<read>(2) for the file descriptor returned by B<fanotify_init>(2) "
208 "blocks (if the flag B<FAN_NONBLOCK> is not specified in the call to "
209 "B<fanotify_init>(2)) until either a file event occurs or the call is "
210 "interrupted by a signal (see B<signal>(7))."
211 msgstr "B<fanotify_init>(2) が返したファイルディスクリプターに対する B<read>(2) を呼び出しは、 (B<fanotify_init>(2) の呼び出しでフラグ B<FAN_NONBLOCK> を指定しなかった場合) ファイルイベントが起こるか、呼び出しがシグナルによって割り込まれる (B<signal>(7) 参照) まで停止する。"
214 #: build/C/man7/fanotify.7:144
216 "After a successful B<read>(2), the read buffer contains one or more of the "
217 "following structures:"
218 msgstr "B<read>(2) が成功すると、読み出しバッファーには以下の構造体が 1 つ以上格納される。"
221 #: build/C/man7/fanotify.7:156
224 "struct fanotify_event_metadata {\n"
225 " __u32 event_len;\n"
228 " __u16 metadata_len;\n"
229 " __aligned_u64 mask;\n"
234 "struct fanotify_event_metadata {\n"
235 " __u32 event_len;\n"
238 " __u16 metadata_len;\n"
239 " __aligned_u64 mask;\n"
245 #: build/C/man7/fanotify.7:163
247 "For performance reasons, it is recommended to use a large buffer size (for "
248 "example, 4096 bytes), so that multiple events can be retrieved by a single "
250 msgstr "性能上の理由から、複数のイベントを一度の B<read>(2) で取得できるように大きめのバッファーサイズ (例えば 4096 バイト) を使用することを推奨する。"
253 #: build/C/man7/fanotify.7:168
255 "The return value of B<read>(2) is the number of bytes placed in the buffer, "
256 "or -1 in case of an error (but see BUGS)."
257 msgstr "B<read>(2) の返り値はバッファーに格納されたバイト数である。 エラーの場合は -1 が返される (ただし、バグも参照)。"
260 #: build/C/man7/fanotify.7:172
261 msgid "The fields of the I<fanotify_event_metadata> structure are as follows:"
262 msgstr "I<fanotify_event_metadata> 構造体のフィールドは以下のとおりである。"
265 #: build/C/man7/fanotify.7:172
268 msgstr "I<event_len>"
271 #: build/C/man7/fanotify.7:182
273 "This is the length of the data for the current event and the offset to the "
274 "next event in the buffer. In the current implementation, the value of "
275 "I<event_len> is always B<FAN_EVENT_METADATA_LEN>. However, the API is "
276 "designed to allow variable-length structures to be returned in the future."
277 msgstr "これは、 このイベントのデータ長であり、バッファー内の次のイベントへのオフセットである。 現在の実装では、 I<event_len> の値は常に B<FAN_EVENT_METADATA_LEN> である。 しかしながら、 API は将来可変長の構造体を返すことができるように設計されている。"
280 #: build/C/man7/fanotify.7:182
286 #: build/C/man7/fanotify.7:191
288 "This field holds a version number for the structure. It must be compared to "
289 "B<FANOTIFY_METADATA_VERSION> to verify that the structures returned at "
290 "runtime match the structures defined at compile time. In case of a "
291 "mismatch, the application should abandon trying to use the fanotify file "
293 msgstr "このフィールドには構造体のバージョン番号が入る。 実行時に返された構造体がコンパイル時の構造体と一致しているかを検査するには、 この値を B<FANOTIFY_METADATA_VERSION> を比較すること。 一致しない場合、 アプリケーションはその fanotify ファイルディスクリプターを使用するのを諦めるべきである。"
296 #: build/C/man7/fanotify.7:191
302 #: build/C/man7/fanotify.7:194
303 msgid "This field is not used."
304 msgstr "このフィールドは使用されない。"
307 #: build/C/man7/fanotify.7:194
309 msgid "I<metadata_len>"
310 msgstr "I<metadata_len>"
313 #: build/C/man7/fanotify.7:200
315 "This is the length of the structure. The field was introduced to facilitate "
316 "the implementation of optional headers per event type. No such optional "
317 "headers exist in the current implementation."
318 msgstr "この構造体の長さである。 このフィールドは、 イベント種別単位のオプションヘッダーの実装を扱うために導入された。 現在の実装ではこのようなオプションヘッダーは存在しない。"
321 #: build/C/man7/fanotify.7:200
327 #: build/C/man7/fanotify.7:203
328 msgid "This is a bit mask describing the event (see below)."
329 msgstr "イベントを示すビットマスクである (下記参照)"
332 #: build/C/man7/fanotify.7:203 build/C/man7/fanotify.7:360
338 #: build/C/man7/fanotify.7:211
340 "This is an open file descriptor for the object being accessed, or "
341 "B<FAN_NOFD> if a queue overflow occurred. The file descriptor can be used "
342 "to access the contents of the monitored file or directory. The reading "
343 "application is responsible for closing this file descriptor."
344 msgstr "これはアクセスされたオブジェクトに対するオープンされたファイルディスクリプターである。 または、キューのオーバーフローが発生した場合には B<FAN_NOFD> が入る。 ファイルディスクリプターは監視対象のファイルやディレクトリの内容にアクセスするのに使用できる。 読み出したアプリケーションは責任を持ってこのファイルディスクリプターをクローズしなければならない。"
347 #: build/C/man7/fanotify.7:224
349 "When calling B<fanotify_init>(2), the caller may specify (via the "
350 "I<event_f_flags> argument) various file status flags that are to be set on "
351 "the open file description that corresponds to this file descriptor. In "
352 "addition, the (kernel-internal) B<FMODE_NONOTIFY> file status flag is set "
353 "on the open file description. This flag suppresses fanotify event "
354 "generation. Hence, when the receiver of the fanotify event accesses the "
355 "notified file or directory using this file descriptor, no additional events "
357 msgstr "B<fanotify_init>(2) を呼び出す際、 呼び出し元はこのファイルディスクリプターに対応するオープンファイル記述にセットされた様々なファイル状態フラグを (I<event_f_flags> 引き数を使って) 指定することができる。 さらに、 (カーネル内部の) B<FMODE_NONOTIFY> ファイル状態フラグがオープンファイル記述にセットされる。 このフラグは fanotify イベントの生成を抑制する。 したがって、 fanotify イベントの受信者がこのファイルディスクリプターを使って通知されたファイルやディレクトリにアクセスした際に、 これ以上イベントが作成されなくなる。"
360 #: build/C/man7/fanotify.7:224
366 #: build/C/man7/fanotify.7:232
368 "This is the ID of the process that caused the event. A program listening to "
369 "fanotify events can compare this PID to the PID returned by B<getpid>(2), to "
370 "determine whether the event is caused by the listener itself, or is due to a "
371 "file access by another process."
372 msgstr "これはイベントが発生する原因となったプロセス ID である。 fanotify イベントを監視しているプログラムは、 この PID を B<getpid>(2) が返す PID と比較することで、 イベントが監視しているプログラム自身から発生したかどうか、 別のプロセスによるファイルアクセスにより発生したか、を判定できる。"
375 #: build/C/man7/fanotify.7:242
377 "The bit mask in I<mask> indicates which events have occurred for a single "
378 "filesystem object. Multiple bits may be set in this mask, if more than one "
379 "event occurred for the monitored filesystem object. In particular, "
380 "consecutive events for the same filesystem object and originating from the "
381 "same process may be merged into a single event, with the exception that two "
382 "permission events are never merged into one queue entry."
383 msgstr "I<mask> のビットマスクは、1 つのファイルシステムオブジェクトに対してどのイベントが発生したかを示す。 監視対象のファイルシステムオブジェクトに複数のイベントが発生した場合は、 このマスクに複数のビットがセットされることがある。 特に、 同じファイルシステムオブジェクトに対する連続するイベントが同じプロセスから生成された場合には、 一つのイベントにまとめられることがある。 例外として、 2 つのアクセス許可イベントが一つのキューエントリーにまとめられることは決してない。"
386 #: build/C/man7/fanotify.7:246
387 msgid "The bits that may appear in I<mask> are as follows:"
388 msgstr "I<mask> でセットされている可能性のあるビットは以下のとおりである。"
391 #: build/C/man7/fanotify.7:246 build/C/man2/fanotify_mark.2:136
393 msgid "B<FAN_ACCESS>"
394 msgstr "B<FAN_ACCESS>"
397 #: build/C/man7/fanotify.7:249
398 msgid "A file or a directory (but see BUGS) was accessed (read)."
399 msgstr "ファイルやディレクトリがアクセスされた (読み出しが行われた) (ただし、「バグ」の節も参照)。"
402 #: build/C/man7/fanotify.7:249 build/C/man2/fanotify_mark.2:148
408 #: build/C/man7/fanotify.7:252
409 msgid "A file or a directory was opened."
410 msgstr "ファイルやディレクトリがオープンされた。"
413 #: build/C/man7/fanotify.7:252 build/C/man2/fanotify_mark.2:139
415 msgid "B<FAN_MODIFY>"
416 msgstr "B<FAN_MODIFY>"
419 #: build/C/man7/fanotify.7:255
420 msgid "A file was modified."
421 msgstr "ファイルやディレクトリが変更された。"
424 #: build/C/man7/fanotify.7:255 build/C/man2/fanotify_mark.2:142
426 msgid "B<FAN_CLOSE_WRITE>"
427 msgstr "B<FAN_CLOSE_WRITE>"
430 #: build/C/man7/fanotify.7:262
432 "A file that was opened for writing (B<O_WRONLY> or B<O_RDWR>) was closed."
433 msgstr "書き込み用 (B<O_WRONLY> か B<O_RDWR>) にオープンされたファイルがクローズされた。"
436 #: build/C/man7/fanotify.7:262 build/C/man2/fanotify_mark.2:145
438 msgid "B<FAN_CLOSE_NOWRITE>"
439 msgstr "B<FAN_CLOSE_NOWRITE>"
442 #: build/C/man7/fanotify.7:267
444 "A file or directory that was opened read-only (B<O_RDONLY>) was closed."
445 msgstr "読み出し用 (B<O_RDONLY>) にオープンされたファイルがクローズされた。"
448 #: build/C/man7/fanotify.7:267
450 msgid "B<FAN_Q_OVERFLOW>"
451 msgstr "B<FAN_Q_OVERFLOW>"
454 #: build/C/man7/fanotify.7:274
456 "The event queue exceeded the limit of 16384 entries. This limit can be "
457 "overridden by specifying the B<FAN_UNLIMITED_QUEUE> flag when calling "
458 "B<fanotify_init>(2)."
459 msgstr "イベントキューが 16384 エントリーの上限を超過した。 この上限は B<fanotify_init>(2) 呼び出し時に B<FAN_UNLIMITED_QUEUE> フラグを指定することで上書きできる。"
462 #: build/C/man7/fanotify.7:274 build/C/man2/fanotify_mark.2:159
464 msgid "B<FAN_ACCESS_PERM>"
465 msgstr "B<FAN_ACCESS_PERM>"
468 #: build/C/man7/fanotify.7:283
470 "An application wants to read a file or directory, for example using "
471 "B<read>(2) or B<readdir>(2). The reader must write a response (as "
472 "described below) that determines whether the permission to access the "
473 "filesystem object shall be granted."
474 msgstr "アプリケーションが例えば B<read>(2) や B<readdir>(2) などを使ってファイルやディレクトリを読み出そうとした。 このイベントを読み出したプログラムは、 そのファイルシステムオブジェクトへのアクセス許可を承認するかを判定し (下記で説明するとおり) 応答を書き込まなければならない。"
477 #: build/C/man7/fanotify.7:283 build/C/man2/fanotify_mark.2:151
479 msgid "B<FAN_OPEN_PERM>"
480 msgstr "B<FAN_OPEN_PERM>"
483 #: build/C/man7/fanotify.7:288
485 "An application wants to open a file or directory. The reader must write a "
486 "response that determines whether the permission to open the filesystem "
487 "object shall be granted."
488 msgstr "アプリケーションがファイルやディレクトリをオープンしようとした。 このイベントを読み出したプログラムは、 そのファイルシステムオブジェクトのオープンを承認するかを判定し (下記で説明するとおり) 応答を書き込まなければならない。"
491 #: build/C/man7/fanotify.7:290
492 msgid "To check for any close event, the following bit mask may be used:"
493 msgstr "クローズイベントを確認するために以下のビットマスクを使うことができる。"
496 #: build/C/man7/fanotify.7:290 build/C/man2/fanotify_mark.2:186
499 msgstr "B<FAN_CLOSE>"
502 #: build/C/man7/fanotify.7:294
503 msgid "A file was closed. This is a synonym for:"
504 msgstr "ファイルがクローズされた。 以下の同義語である。"
507 #: build/C/man7/fanotify.7:296
509 msgid " FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE\n"
510 msgstr " FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE\n"
513 #: build/C/man7/fanotify.7:301
515 "The following macros are provided to iterate over a buffer containing "
516 "fanotify event metadata returned by a B<read>(2) from an fanotify file "
518 msgstr "fanotify ファイルディスクリプターからの B<read>(2) が返した fanotify イベントメタデータを含むバッファーに対して繰り返しを行うため、 以下のマクロが提供されている。"
521 #: build/C/man7/fanotify.7:301
523 msgid "B<FAN_EVENT_OK(meta, len)>"
524 msgstr "B<FAN_EVENT_OK(meta, len)>"
527 #: build/C/man7/fanotify.7:310
529 "This macro checks the remaining length I<len> of the buffer I<meta> against "
530 "the length of the metadata structure and the I<event_len> field of the first "
531 "metadata structure in the buffer."
532 msgstr "このマクロは、 バッファー I<meta> の残りの長さ I<len> を、 メタデータ構造体の長さとバッファーの最初のメタデータ構造体の I<event_len> フィールドと比較して検査する。"
535 #: build/C/man7/fanotify.7:310
537 msgid "B<FAN_EVENT_NEXT(meta, len)>"
538 msgstr "B<FAN_EVENT_NEXT(meta, len)>"
541 #: build/C/man7/fanotify.7:329
543 "This macro uses the length indicated in the I<event_len> field of the "
544 "metadata structure pointed to by I<meta> to calculate the address of the "
545 "next metadata structure that follows I<meta>. I<len> is the number of bytes "
546 "of metadata that currently remain in the buffer. The macro returns a "
547 "pointer to the next metadata structure that follows I<meta>, and reduces "
548 "I<len> by the number of bytes in the the metadata structure that has been "
549 "skipped over (i.e., it subtracts I<meta-E<gt>event_len> from I<len>)."
550 msgstr "このマクロは、 I<meta> が指すメタデータ構造体の I<event_len> フィールドで示された長さを使って、 I<meta> の次のメタデータ構造体のアドレスを計算する。 I<len> はバッファーに現在残っているメタデータのバイト数である。 このマクロは I<meta> の次のメタデータ構造体へのポインターを返し、 スキップされたメタデータ構造体のバイト数だけ I<len> を減算する (つまり、 I<len> から I<meta-E<gt>event_len> を引き算する)。"
553 #: build/C/man7/fanotify.7:331
554 msgid "In addition, there is:"
555 msgstr "また、 以下のマクロも用意されている。"
558 #: build/C/man7/fanotify.7:331
560 msgid "B<FAN_EVENT_METADATA_LEN>"
561 msgstr "B<FAN_EVENT_METADATA_LEN>"
564 #: build/C/man7/fanotify.7:337
566 "This macro returns the size (in bytes) of the structure "
567 "I<fanotify_event_metadata>. This is the minimum size (and currently the "
568 "only size) of any event metadata."
569 msgstr "このマクロは I<fanotify_event_metadata> 構造体の (バイト単位の) サイズを返す。 返される値はイベントメタデータの最小値である (現在のところ、これが唯一のサイズである)。"
572 #: build/C/man7/fanotify.7:337
574 msgid "Monitoring an fanotify file descriptor for events"
575 msgstr "fanotify ファイルディスクリプターのイベントを監視する"
578 #: build/C/man7/fanotify.7:344
580 "When an fanotify event occurs, the fanotify file descriptor indicates as "
581 "readable when passed to B<epoll>(7), B<poll>(2), or B<select>(2)."
582 msgstr "fanotify イベントが発生すると、 B<epoll>(7), B<poll>(2), B<select>(2) に fanotify ファイルディスクリプターが渡された場合には、そのファイルディスクリプターが読み出し可能であると通知される。"
585 #: build/C/man7/fanotify.7:344
587 msgid "Dealing with permission events"
588 msgstr "アクセス許可イベントの取り扱い"
591 #: build/C/man7/fanotify.7:349
593 "For permission events, the application must B<write>(2) a structure of the "
594 "following form to the fanotify file descriptor:"
595 msgstr "アクセス許可イベントでは、 アプリケーションは以下の形式の構造体を fanotify ファイルディスクリプターに B<write>(2) しなければならない。"
598 #: build/C/man7/fanotify.7:356
601 "struct fanotify_response {\n"
606 "struct fanotify_response {\n"
612 #: build/C/man7/fanotify.7:360
613 msgid "The fields of this structure are as follows:"
614 msgstr "この構造体のフィールドは以下のとおりである。"
617 #: build/C/man7/fanotify.7:364
619 "This is the file descriptor from the structure I<fanotify_event_metadata>."
620 msgstr "このフィールドは I<fanotify_event_metadata> 構造体で返されたファイルディスクリプターである。"
623 #: build/C/man7/fanotify.7:364
629 #: build/C/man7/fanotify.7:372
631 "This field indicates whether or not the permission is to be granted. Its "
632 "value must be either B<FAN_ALLOW> to allow the file operation or B<FAN_DENY> "
633 "to deny the file operation."
634 msgstr "このフィールドはアクセス許可を承認するかどうかを示す。 値は、このファイル操作を許可する B<FAN_ALLOW> か、 このファイル操作を拒否する B<FAN_DENY> のいずれかでなければならない。"
637 #: build/C/man7/fanotify.7:376
639 "If access is denied, the requesting application call will receive an "
641 msgstr "アクセスを拒否した場合、 アクセスを要求したアプリケーションは B<EPERM> エラーを受け取ることになる。"
644 #: build/C/man7/fanotify.7:376
646 msgid "Closing the fanotify file descriptor"
647 msgstr "fanotify ファイルディスクリプターのクローズ"
650 #: build/C/man7/fanotify.7:384
652 "When all file descriptors referring to the fanotify notification group are "
653 "closed, the fanotify group is released and its resources are freed for reuse "
654 "by the kernel. Upon B<close>(2), outstanding permission events will be set "
656 msgstr "fanotify 通知グループを参照するすべてのファイルディスクリプターがクローズされると、 fanotify グループは解放され、 カーネルが再利用できるようにそのリソースは解放される。 B<close>(2) の際に、 処理中であったアクセス許可イベントには許可が設定される。"
659 #: build/C/man7/fanotify.7:384
661 msgid "/proc/[pid]/fdinfo"
662 msgstr "/proc/[pid]/fdinfo"
665 #: build/C/man7/fanotify.7:394
667 "The file I</proc/[pid]/fdinfo/[fd]> contains information about fanotify "
668 "marks for file descriptor I<fd> of process I<pid>. See the kernel source "
669 "file I<Documentation/filesystems/proc.txt> for details."
670 msgstr "ファイル I</proc/[pid]/fdinfo/[fd]> には、 プロセス I<pid> のファイルディスクリプター I<fd> の fanotify マークに関する情報が格納される。 詳細はカーネルのソースファイル I<Documentation/filesystems/proc.txt> を参照。"
673 #: build/C/man7/fanotify.7:394 build/C/man2/fanotify_init.2:206
674 #: build/C/man2/fanotify_mark.2:243 build/C/man2/inotify_add_watch.2:84
675 #: build/C/man2/inotify_init.2:79 build/C/man2/inotify_rm_watch.2:55
681 #: build/C/man7/fanotify.7:399
683 "In addition to the usual errors for B<read>(2), the following errors can "
684 "occur when reading from the fanotify file descriptor:"
685 msgstr "通常の B<read>(2) のエラーに加え、 fanotify ファイルディスクリプターから読み出しを行った際に以下のエラーが発生することがある。"
688 #: build/C/man7/fanotify.7:399 build/C/man7/fanotify.7:433
689 #: build/C/man2/fanotify_init.2:207 build/C/man2/fanotify_mark.2:248
690 #: build/C/man2/fanotify_mark.2:257 build/C/man2/inotify_add_watch.2:95
691 #: build/C/man2/inotify_init.2:80 build/C/man2/inotify_rm_watch.2:60
697 #: build/C/man7/fanotify.7:402
698 msgid "The buffer is too small to hold the event."
699 msgstr "バッファーがイベントを保持するには小さすぎる。"
702 #: build/C/man7/fanotify.7:402 build/C/man2/fanotify_init.2:216
703 #: build/C/man2/inotify_init.2:85
709 #: build/C/man7/fanotify.7:409
711 "The per-process limit on the number of open files has been reached. See the "
712 "description of B<RLIMIT_NOFILE> in B<getrlimit>(2)."
713 msgstr "オープンしたファイル数のプロセス毎の上限に達した。 B<getrlimit>(2) の B<RLIMIT_NOFILE> の説明を参照。"
716 #: build/C/man7/fanotify.7:409 build/C/man2/inotify_init.2:88
722 #: build/C/man7/fanotify.7:416
724 "The system-wide limit on the number of open files has been reached. See I</"
725 "proc/sys/fs/file-max> in B<proc>(5)."
726 msgstr "オープンされたファイル数のシステム全体の上限に達した。 B<proc>(5) の I</proc/sys/fs/file-max> を参照。"
729 #: build/C/man7/fanotify.7:416
735 #: build/C/man7/fanotify.7:429
737 "This error is returned by B<read>(2) if B<O_RDWR> or B<O_WRONLY> was "
738 "specified in the I<event_f_flags> argument when calling B<fanotify_init>(2) "
739 "and an event occurred for a monitored file that is currently being executed."
740 msgstr "B<fanotify_init>(2) の呼び出し時に B<O_RDWR> か B<O_WRONLY> が I<event_f_flags> 引き数に指定されており、 現在実行中の監視対象のファイルに対してイベントが発生した際に、 このエラーが B<read>(2) から返される。"
743 #: build/C/man7/fanotify.7:433
745 "In addition to the usual errors for B<write>(2), the following errors can "
746 "occur when writing to the fanotify file descriptor:"
747 msgstr "通常の B<write>(2) のエラーに加え、 fanotify ファイルディスクリプターに書き込みを行った際に以下のエラーが発生することがある。"
750 #: build/C/man7/fanotify.7:439
752 "Fanotify access permissions are not enabled in the kernel configuration or "
753 "the value of I<response> in the response structure is not valid."
754 msgstr "fanotify アクセス許可がカーネルの設定で有効になっていない。 応答構造体の I<response> 値が無効である。"
757 #: build/C/man7/fanotify.7:439 build/C/man2/fanotify_mark.2:265
758 #: build/C/man2/inotify_add_watch.2:104
764 #: build/C/man7/fanotify.7:446
766 "The file descriptor I<fd> in the response structure is not valid. This may "
767 "occur when a response for the permission event has already been written."
768 msgstr "応答構造体のファイルディスクリプター I<fd> が無効である。 このエラーはアクセス許可イベントに対する応答がすでに書き込まれている際に発生する。"
771 #: build/C/man7/fanotify.7:446 build/C/man2/fanotify_init.2:233
772 #: build/C/man2/fanotify_mark.2:299 build/C/man7/inotify.7:553
773 #: build/C/man2/inotify_add_watch.2:116 build/C/man2/inotify_init.2:94
774 #: build/C/man2/inotify_rm_watch.2:67
780 #: build/C/man7/fanotify.7:450
782 "The fanotify API was introduced in version 2.6.36 of the Linux kernel and "
783 "enabled in version 2.6.37. Fdinfo support was added in version 3.8."
784 msgstr "fanotify API は Linux カーネルのバージョン 2.6.36 で導入され、 バージョン 2.6.37 で有効にされた。 fdinfo のサポートはバージョン 3.8 で追加された。"
787 #: build/C/man7/fanotify.7:450 build/C/man2/fanotify_init.2:237
788 #: build/C/man2/fanotify_mark.2:303 build/C/man7/inotify.7:561
789 #: build/C/man2/inotify_add_watch.2:118 build/C/man2/inotify_init.2:101
790 #: build/C/man2/inotify_rm_watch.2:69
792 msgid "CONFORMING TO"
796 #: build/C/man7/fanotify.7:452
797 msgid "The fanotify API is Linux-specific."
798 msgstr "fanotify API は Linux 独自のものである。"
801 #: build/C/man7/fanotify.7:452 build/C/man7/inotify.7:563
807 #: build/C/man7/fanotify.7:459
809 "The fanotify API is available only if the kernel was built with the "
810 "B<CONFIG_FANOTIFY> configuration option enabled. In addition, fanotify "
811 "permission handling is available only if the "
812 "B<CONFIG_FANOTIFY_ACCESS_PERMISSIONS> configuration option is enabled."
813 msgstr "fanotify API が利用できるのは、 カーネルが B<CONFIG_FANOTIFY> 設定オプションを有効にして作成されている場合だけである。 また、 fanotify アクセス許可の処理が利用できるのは B<CONFIG_FANOTIFY_ACCESS_PERMISSIONS> 設定オプションが有効になっている場合だけである。"
816 #: build/C/man7/fanotify.7:459 build/C/man7/inotify.7:624
818 msgid "Limitations and caveats"
822 #: build/C/man7/fanotify.7:464
824 "Fanotify reports only events that a user-space program triggers through the "
825 "filesystem API. As a result, it does not catch remote events that occur on "
826 "network filesystems."
827 msgstr "fanotify が報告するのはユーザー空間プログラムがファイルシステム API 経由で行ったイベントだけである。 その結果、 fanotify ではネットワークファイルシステム上で発生したリモートイベントは捕捉できない。"
830 #: build/C/man7/fanotify.7:471
832 "The fanotify API does not report file accesses and modifications that may "
833 "occur because of B<mmap>(2), B<msync>(2), and B<munmap>(2)."
835 "inotify API は B<mmap>(2), B<msync>(2), B<munmap>(2) により起こったファイルの"
839 #: build/C/man7/fanotify.7:476
841 "Events for directories are created only if the directory itself is opened, "
842 "read, and closed. Adding, removing, or changing children of a marked "
843 "directory does not create events for the monitored directory itself."
844 msgstr "ディレクトリのイベントは、ディレクトリ自身がオープン、読み出し、クローズされた場合にしか作成されない。 マークされたディレクトリでの子要素の追加、削除、変更では、監視対象のディレクトリ自身へのイベントは作成されない。"
847 #: build/C/man7/fanotify.7:484
849 "Fanotify monitoring of directories is not recursive: to monitor "
850 "subdirectories under a directory, additional marks must be created. (But "
851 "note that the fanotify API provides no way of detecting when a subdirectory "
852 "has been created under a marked directory, which makes recursive monitoring "
853 "difficult.) Monitoring mounts offers the capability to monitor a whole "
855 msgstr "fanotify のディレクトリの監視は再帰的ではない。 ディレクトリ内のサブディレクトリを監視するには、 追加で監視用のマークを作成しなければならない。 (ただし、 fanotify API では、サブディレクトリが監視対象としてマークされているディレクトリに作成された際に検出する手段は提供されていない点に注意すること。) マウントの監視を使うことで、 ディレクトリツリー全体を監視することができる。"
858 #: build/C/man7/fanotify.7:487
859 msgid "The event queue can overflow. In this case, events are lost."
860 msgstr "ベントキューはオーバーフローすることがある。 この場合、 イベントは失われる。"
863 #: build/C/man7/fanotify.7:487 build/C/man2/fanotify_init.2:239
864 #: build/C/man2/fanotify_mark.2:305 build/C/man7/inotify.7:754
870 #: build/C/man7/fanotify.7:490
871 msgid "As of Linux 3.17, the following bugs exist:"
872 msgstr "Linux 3.17 時点では、 以下のバグが存在する。"
875 #: build/C/man7/fanotify.7:490 build/C/man7/fanotify.7:499
876 #: build/C/man7/fanotify.7:503 build/C/man7/fanotify.7:512
877 #: build/C/man2/fanotify_init.2:242 build/C/man2/fanotify_init.2:250
878 #: build/C/man2/fanotify_mark.2:195 build/C/man2/fanotify_mark.2:201
879 #: build/C/man2/fanotify_mark.2:209 build/C/man2/fanotify_mark.2:215
880 #: build/C/man2/fanotify_mark.2:226 build/C/man2/fanotify_mark.2:307
881 #: build/C/man2/fanotify_mark.2:317 build/C/man2/fanotify_mark.2:323
882 #: build/C/man7/inotify.7:40 build/C/man7/inotify.7:51
883 #: build/C/man7/inotify.7:64 build/C/man7/inotify.7:70
884 #: build/C/man7/inotify.7:73 build/C/man7/inotify.7:270
885 #: build/C/man7/inotify.7:273
891 #: build/C/man7/fanotify.7:499
893 "On Linux, a filesystem object may be accessible through multiple paths, for "
894 "example, a part of a filesystem may be remounted using the I<--bind> option "
895 "of B<mount>(8). A listener that marked a mount will be notified only of "
896 "events that were triggered for a filesystem object using the same mount. "
897 "Any other event will pass unnoticed."
898 msgstr "Linux では、ファイルシステムオブジェクトは複数のパスでアクセス可能である。 例えば、 ファイルシステムの一部は B<mount>(8) の I<--bind> オプションを使って再マウントされることがある。 マークされたマウントの監視者は、 同じマウントを使ったファイルオブジェクトについてのみイベント通知を受ける。 それ以外のイベントは通知されない。"
901 #: build/C/man7/fanotify.7:503
902 msgid "Calling B<fallocate>(2) does not create any fanotify events."
903 msgstr "B<fallocate>(2) の呼び出しでは fanotify イベントが作成されない。"
905 #. FIXME . A patch was proposed.
907 #: build/C/man7/fanotify.7:512
909 "When an event is generated, no check is made to see whether the user ID of "
910 "the receiving process has authorization to read or write the file before "
911 "passing a file descriptor for that file. This poses a security risk, when "
912 "the B<CAP_SYS_ADMIN> capability is set for programs executed by unprivileged "
914 msgstr "イベントが生成された際に、 そのファイルのファイルディスクリプターを渡す前に、 イベントを受信するプロセスのユーザー ID がそのファイルに対する読み出し/書き込み許可があるかの確認は行われない。 非特権ユーザーによって実行されたプログラムに B<CAP_SYS_ADMIN> ケーパビリティーがセットされている場合には、 このことはセキュリティーリスクとなる。"
917 #: build/C/man7/fanotify.7:522
919 "If a call to B<read>(2) processes multiple events from the fanotify queue "
920 "and an error occurs, the return value will be the total length of the events "
921 "successfully copied to the user-space buffer before the error occurred. The "
922 "return value will not be -1, and I<errno> will not be set. Thus, the "
923 "reading application has no way to detect the error."
924 msgstr "B<read>(2) の呼び出しが fanotify キューから複数のイベントを処理している際に、 エラーが発生した場合、 返り値はエラーが発生する前までにユーザー空間バッファーに正常にコピーされたイベントの合計長となる。 返り値は -1 にならず、 I<errno> もセットされない。 したがって、 読み出しを行うアプリケーションではエラーを検出する方法はない。"
927 #: build/C/man7/fanotify.7:522 build/C/man7/inotify.7:815
933 #: build/C/man7/fanotify.7:532
935 "The following program demonstrates the usage of the fanotify API. It marks "
936 "the mount point passed as a command-line argument and waits for events of "
937 "type B<FAN_PERM_OPEN> and B<FAN_CLOSE_WRITE>. When a permission event "
938 "occurs, a B<FAN_ALLOW> response is given."
939 msgstr "以下のプログラムは fanotify API の使用法を示すものである。 コマンドライン引き数で渡されたマウントポイントを監視し、 種別が B<FAN_PERM_OPEN> と B<FAN_CLOSE_WRITE> のイベントを待つ。 アクセス許可イベントが発生には、 B<FAN_ALLOW> 応答を返す。"
942 #: build/C/man7/fanotify.7:542
944 "The following output was recorded while editing the file I</home/user/temp/"
945 "notes>. Before the file was opened, a B<FAN_OPEN_PERM> event occurred. "
946 "After the file was closed, a B<FAN_CLOSE_WRITE> event occurred. Execution "
947 "of the program ends when the user presses the ENTER key."
948 msgstr "以下の出力例はファイル I</home/user/temp/notes> を編集した際に記録されたものである。 ファイルをオープンする前に B<FAN_OPEN_PERM> イベントが発生している。 ファイルをクローズした後に B<FAN_CLOSE_WRITE> イベントが発生している。 エンターキーをユーザーが押すと、 このプログラムの実行は終了する。"
951 #: build/C/man7/fanotify.7:542 build/C/man7/inotify.7:838
953 msgid "Example output"
957 #: build/C/man7/fanotify.7:550
960 "# ./fanotify_example /home\n"
961 "Press enter key to terminate.\n"
962 "Listening for events.\n"
963 "FAN_OPEN_PERM: File /home/user/temp/notes\n"
964 "FAN_CLOSE_WRITE: File /home/user/temp/notes\n"
966 "# ./fanotify_example /home\n"
967 "Press enter key to terminate.\n"
968 "Listening for events.\n"
969 "FAN_OPEN_PERM: File /home/user/temp/notes\n"
970 "FAN_CLOSE_WRITE: File /home/user/temp/notes\n"
973 #: build/C/man7/fanotify.7:552 build/C/man7/inotify.7:850
975 msgid "Listening for events stopped.\n"
976 msgstr "Listening for events stopped.\n"
979 #: build/C/man7/fanotify.7:554 build/C/man7/inotify.7:852
981 msgid "Program source"
985 #: build/C/man7/fanotify.7:565
988 "#define _GNU_SOURCE /* Needed to get O_LARGEFILE definition */\n"
989 "#include E<lt>errno.hE<gt>\n"
990 "#include E<lt>fcntl.hE<gt>\n"
991 "#include E<lt>limits.hE<gt>\n"
992 "#include E<lt>poll.hE<gt>\n"
993 "#include E<lt>stdio.hE<gt>\n"
994 "#include E<lt>stdlib.hE<gt>\n"
995 "#include E<lt>sys/fanotify.hE<gt>\n"
996 "#include E<lt>unistd.hE<gt>\n"
998 "#define _GNU_SOURCE /* O_LARGEFILE の定義を得るために必要 */\n"
999 "#include E<lt>errno.hE<gt>\n"
1000 "#include E<lt>fcntl.hE<gt>\n"
1001 "#include E<lt>limits.hE<gt>\n"
1002 "#include E<lt>poll.hE<gt>\n"
1003 "#include E<lt>stdio.hE<gt>\n"
1004 "#include E<lt>stdlib.hE<gt>\n"
1005 "#include E<lt>sys/fanotify.hE<gt>\n"
1006 "#include E<lt>unistd.hE<gt>\n"
1009 #: build/C/man7/fanotify.7:567
1011 msgid "/* Read all available fanotify events from the file descriptor 'fd' */\n"
1012 msgstr "/* ファイルディスクリプター 'fd' から読み出しできる全 fanotify イベントを読み出す */\n"
1015 #: build/C/man7/fanotify.7:578
1019 "handle_events(int fd)\n"
1021 " const struct fanotify_event_metadata *metadata;\n"
1022 " struct fanotify_event_metadata buf[200];\n"
1024 " char path[PATH_MAX];\n"
1025 " ssize_t path_len;\n"
1026 " char procfd_path[PATH_MAX];\n"
1027 " struct fanotify_response response;\n"
1030 "handle_events(int fd)\n"
1032 " const struct fanotify_event_metadata *metadata;\n"
1033 " struct fanotify_event_metadata buf[200];\n"
1035 " char path[PATH_MAX];\n"
1036 " ssize_t path_len;\n"
1037 " char procfd_path[PATH_MAX];\n"
1038 " struct fanotify_response response;\n"
1041 #: build/C/man7/fanotify.7:580
1043 msgid " /* Loop while events can be read from fanotify file descriptor */\n"
1044 msgstr " /* fanotify ファイルディスクリプターからイベントが読み出せる間はループする */\n"
1047 #: build/C/man7/fanotify.7:582
1049 msgid " for(;;) {\n"
1050 msgstr " for(;;) {\n"
1053 #: build/C/man7/fanotify.7:584
1055 msgid " /* Read some events */\n"
1056 msgstr " /* イベントを読み出す */\n"
1059 #: build/C/man7/fanotify.7:590
1062 " len = read(fd, (void *) &buf, sizeof(buf));\n"
1063 " if (len == -1 && errno != EAGAIN) {\n"
1064 " perror(\"read\");\n"
1065 " exit(EXIT_FAILURE);\n"
1068 " len = read(fd, (void *) &buf, sizeof(buf));\n"
1069 " if (len == -1 && errno != EAGAIN) {\n"
1070 " perror(\"read\");\n"
1071 " exit(EXIT_FAILURE);\n"
1075 #: build/C/man7/fanotify.7:592
1077 msgid " /* Check if end of available data reached */\n"
1078 msgstr " /* 読み出せるデータの最後に達しているかチェックする */\n"
1081 #: build/C/man7/fanotify.7:595 build/C/man7/inotify.7:901
1084 " if (len E<lt>= 0)\n"
1087 " if (len E<lt>= 0)\n"
1091 #: build/C/man7/fanotify.7:597
1093 msgid " /* Point to the first event in the buffer */\n"
1094 msgstr " /* バッファーの最初のイベントを参照する */\n"
1097 #: build/C/man7/fanotify.7:599
1099 msgid " metadata = buf;\n"
1100 msgstr " metadata = buf;\n"
1103 #: build/C/man7/fanotify.7:601 build/C/man7/inotify.7:903
1105 msgid " /* Loop over all events in the buffer */\n"
1106 msgstr " /* バッファー内の全イベントを処理する */\n"
1109 #: build/C/man7/fanotify.7:603
1111 msgid " while (FAN_EVENT_OK(metadata, len)) {\n"
1112 msgstr " while (FAN_EVENT_OK(metadata, len)) {\n"
1115 #: build/C/man7/fanotify.7:605
1117 msgid " /* Check that run-time and compile-time structures match */\n"
1118 msgstr " /* 実行時とコンパイル時の構造体が一致するか確認する */\n"
1121 #: build/C/man7/fanotify.7:611
1124 " if (metadata-E<gt>vers != FANOTIFY_METADATA_VERSION) {\n"
1125 " fprintf(stderr,\n"
1126 " \"Mismatch of fanotify metadata version.\\en\");\n"
1127 " exit(EXIT_FAILURE);\n"
1130 " if (metadata-E<gt>vers != FANOTIFY_METADATA_VERSION) {\n"
1131 " fprintf(stderr,\n"
1132 " \"Mismatch of fanotify metadata version.\\en\");\n"
1133 " exit(EXIT_FAILURE);\n"
1137 #: build/C/man7/fanotify.7:615
1140 " /* metadata-E<gt>fd contains either FAN_NOFD, indicating a\n"
1141 " queue overflow, or a file descriptor (a nonnegative\n"
1142 " integer). Here, we simply ignore queue overflow. */\n"
1144 " /* metadata-E<gt>fd には、キューのオーバーフローを示す FAN_NOFD か、\n"
1145 " ファイルディスクリプター (負でない整数) のいずれかが入っている。\n"
1146 " ここではキューのオーバーフローは無視している。 */\n"
1149 #: build/C/man7/fanotify.7:617
1151 msgid " if (metadata-E<gt>fd E<gt>= 0) {\n"
1152 msgstr " if (metadata-E<gt>fd E<gt>= 0) {\n"
1155 #: build/C/man7/fanotify.7:619
1157 msgid " /* Handle open permission event */\n"
1158 msgstr " /* オープン許可イベントを処理する */\n"
1161 #: build/C/man7/fanotify.7:622
1164 " if (metadata-E<gt>mask & FAN_OPEN_PERM) {\n"
1165 " printf(\"FAN_OPEN_PERM: \");\n"
1167 " if (metadata-E<gt>mask & FAN_OPEN_PERM) {\n"
1168 " printf(\"FAN_OPEN_PERM: \");\n"
1171 #: build/C/man7/fanotify.7:624
1173 msgid " /* Allow file to be opened */\n"
1174 msgstr " /* ファイルのオープンを許可する */\n"
1177 #: build/C/man7/fanotify.7:630
1180 " response.fd = metadata-E<gt>fd;\n"
1181 " response.response = FAN_ALLOW;\n"
1182 " write(fd, &response,\n"
1183 " sizeof(struct fanotify_response));\n"
1186 " response.fd = metadata-E<gt>fd;\n"
1187 " response.response = FAN_ALLOW;\n"
1188 " write(fd, &response,\n"
1189 " sizeof(struct fanotify_response));\n"
1193 #: build/C/man7/fanotify.7:632
1195 msgid " /* Handle closing of writable file event */\n"
1196 msgstr " /* 書き込み可能ファイルのクローズイベントを処理する */\n"
1199 #: build/C/man7/fanotify.7:635
1202 " if (metadata-E<gt>mask & FAN_CLOSE_WRITE)\n"
1203 " printf(\"FAN_CLOSE_WRITE: \");\n"
1205 " if (metadata-E<gt>mask & FAN_CLOSE_WRITE)\n"
1206 " printf(\"FAN_CLOSE_WRITE: \");\n"
1209 #: build/C/man7/fanotify.7:637
1211 msgid " /* Retrieve and print pathname of the accessed file */\n"
1212 msgstr " /* アクセスされたファイルのパス名を取得し表示する */\n"
1215 #: build/C/man7/fanotify.7:646
1218 " snprintf(procfd_path, sizeof(procfd_path),\n"
1219 " \"/proc/self/fd/%d\", metadata-E<gt>fd);\n"
1220 " path_len = readlink(procfd_path, path,\n"
1221 " sizeof(path) - 1);\n"
1222 " if (path_len == -1) {\n"
1223 " perror(\"readlink\");\n"
1224 " exit(EXIT_FAILURE);\n"
1227 " snprintf(procfd_path, sizeof(procfd_path),\n"
1228 " \"/proc/self/fd/%d\", metadata-E<gt>fd);\n"
1229 " path_len = readlink(procfd_path, path,\n"
1230 " sizeof(path) - 1);\n"
1231 " if (path_len == -1) {\n"
1232 " perror(\"readlink\");\n"
1233 " exit(EXIT_FAILURE);\n"
1237 #: build/C/man7/fanotify.7:649
1240 " path[path_len] = '\\e0';\n"
1241 " printf(\"File %s\\en\", path);\n"
1243 " path[path_len] = '\\e0';\n"
1244 " printf(\"File %s\\en\", path);\n"
1247 #: build/C/man7/fanotify.7:651
1249 msgid " /* Close the file descriptor of the event */\n"
1250 msgstr " /* イベントのファイルディスクリプターをクローズする */\n"
1253 #: build/C/man7/fanotify.7:654
1256 " close(metadata-E<gt>fd);\n"
1259 " close(metadata-E<gt>fd);\n"
1263 #: build/C/man7/fanotify.7:656
1265 msgid " /* Advance to next event */\n"
1266 msgstr " /* 次のイベントに進む */\n"
1269 #: build/C/man7/fanotify.7:661
1272 " metadata = FAN_EVENT_NEXT(metadata, len);\n"
1277 " metadata = FAN_EVENT_NEXT(metadata, len);\n"
1283 #: build/C/man7/fanotify.7:669
1287 "main(int argc, char *argv[])\n"
1290 " int fd, poll_num;\n"
1292 " struct pollfd fds[2];\n"
1295 "main(int argc, char *argv[])\n"
1298 " int fd, poll_num;\n"
1300 " struct pollfd fds[2];\n"
1303 #: build/C/man7/fanotify.7:671
1305 msgid " /* Check mount point is supplied */\n"
1306 msgstr " /* マウントポイントが指定されたか確認する */\n"
1309 #: build/C/man7/fanotify.7:676
1312 " if (argc != 2) {\n"
1313 " fprintf(stderr, \"Usage: %s MOUNT\\en\", argv[0]);\n"
1314 " exit(EXIT_FAILURE);\n"
1317 " if (argc != 2) {\n"
1318 " fprintf(stderr, \"Usage: %s MOUNT\\en\", argv[0]);\n"
1319 " exit(EXIT_FAILURE);\n"
1323 #: build/C/man7/fanotify.7:678
1325 msgid " printf(\"Press enter key to terminate.\\en\");\n"
1326 msgstr " printf(\"Press enter key to terminate.\\en\");\n"
1329 #: build/C/man7/fanotify.7:680
1331 msgid " /* Create the file descriptor for accessing the fanotify API */\n"
1332 msgstr " /* fanotify API にアクセスするためのファイルディスクリプターを作成する */\n"
1335 #: build/C/man7/fanotify.7:687
1338 " fd = fanotify_init(FAN_CLOEXEC | FAN_CLASS_CONTENT | FAN_NONBLOCK,\n"
1339 " O_RDONLY | O_LARGEFILE);\n"
1340 " if (fd == -1) {\n"
1341 " perror(\"fanotify_init\");\n"
1342 " exit(EXIT_FAILURE);\n"
1345 " fd = fanotify_init(FAN_CLOEXEC | FAN_CLASS_CONTENT | FAN_NONBLOCK,\n"
1346 " O_RDONLY | O_LARGEFILE);\n"
1347 " if (fd == -1) {\n"
1348 " perror(\"fanotify_init\");\n"
1349 " exit(EXIT_FAILURE);\n"
1353 #: build/C/man7/fanotify.7:692
1356 " /* Mark the mount for:\n"
1357 " - permission events before opening files\n"
1358 " - notification events after closing a write-enabled\n"
1359 " file descriptor */\n"
1361 " /* 指定されたマウントに対して以下を監視するようにマークを付ける:\n"
1362 " - ファイルのオープン前のアクセス許可イベント\n"
1363 " - 書き込み可能なファイルディスクリプターのクローズ後の\n"
1367 #: build/C/man7/fanotify.7:699
1370 " if (fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT,\n"
1371 " FAN_OPEN_PERM | FAN_CLOSE_WRITE, AT_FDCWD,\n"
1372 " argv[1]) == -1) {\n"
1373 " perror(\"fanotify_mark\");\n"
1374 " exit(EXIT_FAILURE);\n"
1377 " if (fanotify_mark(fd, FAN_MARK_ADD | FAN_MARK_MOUNT,\n"
1378 " FAN_OPEN_PERM | FAN_CLOSE_WRITE, AT_FDCWD,\n"
1379 " argv[1]) == -1) {\n"
1380 " perror(\"fanotify_mark\");\n"
1381 " exit(EXIT_FAILURE);\n"
1385 #: build/C/man7/fanotify.7:701 build/C/man7/inotify.7:989
1387 msgid " /* Prepare for polling */\n"
1388 msgstr " /* ポーリングの準備 */\n"
1391 #: build/C/man7/fanotify.7:703 build/C/man7/inotify.7:991
1393 msgid " nfds = 2;\n"
1394 msgstr " nfds = 2;\n"
1397 #: build/C/man7/fanotify.7:705 build/C/man7/inotify.7:993
1399 msgid " /* Console input */\n"
1400 msgstr " /* コンソールの入力 */\n"
1403 #: build/C/man7/fanotify.7:708 build/C/man7/inotify.7:996
1406 " fds[0].fd = STDIN_FILENO;\n"
1407 " fds[0].events = POLLIN;\n"
1409 " fds[0].fd = STDIN_FILENO;\n"
1410 " fds[0].events = POLLIN;\n"
1413 #: build/C/man7/fanotify.7:710
1415 msgid " /* Fanotify input */\n"
1416 msgstr " /* fanotify の入力 */\n"
1419 #: build/C/man7/fanotify.7:713 build/C/man7/inotify.7:1001
1422 " fds[1].fd = fd;\n"
1423 " fds[1].events = POLLIN;\n"
1425 " fds[1].fd = fd;\n"
1426 " fds[1].events = POLLIN;\n"
1429 #: build/C/man7/fanotify.7:715
1431 msgid " /* This is the loop to wait for incoming events */\n"
1432 msgstr " /* イベントの発生を待つループ */\n"
1435 #: build/C/man7/fanotify.7:717
1437 msgid " printf(\"Listening for events.\\en\");\n"
1438 msgstr " printf(\"Listening for events.\\en\");\n"
1441 #: build/C/man7/fanotify.7:723
1445 " poll_num = poll(fds, nfds, -1);\n"
1446 " if (poll_num == -1) {\n"
1447 " if (errno == EINTR) /* Interrupted by a signal */\n"
1448 " continue; /* Restart poll() */\n"
1451 " poll_num = poll(fds, nfds, -1);\n"
1452 " if (poll_num == -1) {\n"
1453 " if (errno == EINTR) /* シグナルに割り込まれた場合 */\n"
1454 " continue; /* poll() を再開する */\n"
1457 #: build/C/man7/fanotify.7:727
1460 " perror(\"poll\"); /* Unexpected error */\n"
1461 " exit(EXIT_FAILURE);\n"
1464 " perror(\"poll\"); /* 予期しないエラー */\n"
1465 " exit(EXIT_FAILURE);\n"
1469 #: build/C/man7/fanotify.7:730
1472 " if (poll_num E<gt> 0) {\n"
1473 " if (fds[0].revents & POLLIN) {\n"
1475 " if (poll_num E<gt> 0) {\n"
1476 " if (fds[0].revents & POLLIN) {\n"
1479 #: build/C/man7/fanotify.7:732
1481 msgid " /* Console input is available: empty stdin and quit */\n"
1482 msgstr " /* コンソールからの入力がある場合: 空の標準入力であれば終了 */\n"
1485 #: build/C/man7/fanotify.7:737 build/C/man7/inotify.7:1024
1488 " while (read(STDIN_FILENO, &buf, 1) E<gt> 0 && buf != '\\en')\n"
1493 " while (read(STDIN_FILENO, &buf, 1) E<gt> 0 && buf != '\\en')\n"
1499 #: build/C/man7/fanotify.7:739 build/C/man7/inotify.7:1026
1501 msgid " if (fds[1].revents & POLLIN) {\n"
1502 msgstr " if (fds[1].revents & POLLIN) {\n"
1505 #: build/C/man7/fanotify.7:741
1507 msgid " /* Fanotify events are available */\n"
1508 msgstr " /* fanotify イベントがある場合 */\n"
1511 #: build/C/man7/fanotify.7:746
1514 " handle_events(fd);\n"
1519 " handle_events(fd);\n"
1525 #: build/C/man7/fanotify.7:750
1528 " printf(\"Listening for events stopped.\\en\");\n"
1529 " exit(EXIT_SUCCESS);\n"
1532 " printf(\"Listening for events stopped.\\en\");\n"
1533 " exit(EXIT_SUCCESS);\n"
1537 #: build/C/man7/fanotify.7:751 build/C/man2/fanotify_init.2:260
1538 #: build/C/man2/fanotify_mark.2:331 build/C/man7/inotify.7:1044
1539 #: build/C/man2/inotify_add_watch.2:120 build/C/man2/inotify_init.2:103
1540 #: build/C/man2/inotify_rm_watch.2:71
1546 #: build/C/man7/fanotify.7:756
1547 msgid "B<fanotify_init>(2), B<fanotify_mark>(2), B<inotify>(7)"
1548 msgstr "B<fanotify_init>(2), B<fanotify_mark>(2), B<inotify>(7)"
1551 #: build/C/man7/fanotify.7:756 build/C/man2/fanotify_init.2:263
1552 #: build/C/man2/fanotify_mark.2:334 build/C/man7/inotify.7:1057
1553 #: build/C/man2/inotify_add_watch.2:124 build/C/man2/inotify_init.2:107
1554 #: build/C/man2/inotify_rm_watch.2:75
1560 #: build/C/man7/fanotify.7:764 build/C/man2/fanotify_init.2:271
1561 #: build/C/man2/fanotify_mark.2:342 build/C/man7/inotify.7:1065
1562 #: build/C/man2/inotify_add_watch.2:132 build/C/man2/inotify_init.2:115
1563 #: build/C/man2/inotify_rm_watch.2:83
1565 "This page is part of release 3.76 of the Linux I<man-pages> project. A "
1566 "description of the project, information about reporting bugs, and the latest "
1567 "version of this page, can be found at \\%http://www.kernel.org/doc/man-"
1570 "この man ページは Linux I<man-pages> プロジェクトのリリース 3.76 の一部\n"
1571 "である。プロジェクトの説明とバグ報告に関する情報は\n"
1572 "http://www.kernel.org/doc/man-pages/ に書かれている。"
1575 #: build/C/man2/fanotify_init.2:24
1577 msgid "FANOTIFY_INIT"
1578 msgstr "FANOTIFY_INIT"
1581 #: build/C/man2/fanotify_init.2:24 build/C/man2/fanotify_mark.2:24
1587 #: build/C/man2/fanotify_init.2:27
1588 msgid "fanotify_init - create and initialize fanotify group"
1589 msgstr "fanotify_init - fanotify グループを作成し、初期化する"
1592 #: build/C/man2/fanotify_init.2:27 build/C/man2/fanotify_mark.2:28
1593 #: build/C/man2/inotify_add_watch.2:31 build/C/man2/inotify_init.2:32
1594 #: build/C/man2/inotify_rm_watch.2:30
1600 #: build/C/man2/fanotify_init.2:29
1601 msgid "B<#include E<lt>fcntl.hE<gt>>"
1602 msgstr "B<#include E<lt>fcntl.hE<gt>>"
1605 #: build/C/man2/fanotify_init.2:31
1606 msgid "B<#include E<lt>sys/fanotify.hE<gt>>"
1607 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>"
1610 #: build/C/man2/fanotify_init.2:33
1612 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1613 ">I<event_f_flags>B<);>"
1615 "B<int fanotify_init(unsigned int >I<flags>B<, unsigned int "
1616 ">I<event_f_flags>B<);>"
1619 #: build/C/man2/fanotify_init.2:36 build/C/man2/fanotify_mark.2:39
1620 msgid "For an overview of the fanotify API, see B<fanotify>(7)."
1621 msgstr "fanotify API の概要については B<fanotify>(7) を参照。"
1624 #: build/C/man2/fanotify_init.2:40
1626 "B<fanotify_init>() initializes a new fanotify group and returns a file "
1627 "descriptor for the event queue associated with the group."
1628 msgstr "B<fanotify_init>() は新しい fanotify グループを初期化し、 このグループに関連付けられたイベントキューに対するファイルディスクリプターを返す。"
1631 #: build/C/man2/fanotify_init.2:51
1633 "The file descriptor is used in calls to B<fanotify_mark>(2) to specify the "
1634 "files, directories, and mounts for which fanotify events shall be created. "
1635 "These events are received by reading from the file descriptor. Some events "
1636 "are only informative, indicating that a file has been accessed. Other "
1637 "events can be used to determine whether another application is permitted to "
1638 "access a file or directory. Permission to access filesystem objects is "
1639 "granted by writing to the file descriptor."
1640 msgstr "このファイルディスクリプターは、 B<fanotify_mark>(2) の呼び出しで fanotify イベントが作成されるファイル、 ディレクトリ、 マウントを指定するのに使用できる。 B<fanotify_mark>(2) で指定したファイル、 これらのイベントは、 このファイルディスクリプターからの読み出しで受信する。 いくつかのイベントは、 ファイルがアクセスされたことを示す単なる情報である。 他のいくつかのイベントは、 別のアプリケーションがファイルやディレクトリにアクセスする許可を与えるかを判定するのに使用される。 ファイルシステムオブジェクトへのアクセス許可イベントについては、 承認結果をこのファイルディスクリプターに書き込む。"
1643 #: build/C/man2/fanotify_init.2:54
1645 "Multiple programs may be using the fanotify interface at the same time to "
1646 "monitor the same files."
1647 msgstr "複数のプログラムが同時に fanotify インターフェースを使って同じファイルを同時に監視することができる。"
1650 #: build/C/man2/fanotify_init.2:58
1652 "In the current implementation, the number of fanotify groups per user is "
1653 "limited to 128. This limit cannot be overridden."
1654 msgstr "現在の実装では、 ユーザーあたりの fanotify グループ数は 128 に制限されている。 この制限は上書きすることができない。"
1657 #: build/C/man2/fanotify_init.2:67
1659 "Calling B<fanotify_init>() requires the B<CAP_SYS_ADMIN> capability. This "
1660 "constraint might be relaxed in future versions of the API. Therefore, "
1661 "certain additional capability checks have been implemented as indicated "
1663 msgstr "B<fanotify_init>() を呼び出すには B<CAP_SYS_ADMIN> ケーパビリティーが必要である。 この制約は将来のバージョンの API で緩和される可能性がある。 そのため、 以下に示すケーパビリティーチェックのいくつかが実装されている。"
1666 #: build/C/man2/fanotify_init.2:73
1668 "The I<flags> argument contains a multi-bit field defining the notification "
1669 "class of the listening application and further single bit fields specifying "
1670 "the behavior of the file descriptor."
1671 msgstr "I<flags> 引き数は、 イベントを待つアプリケーションの通知クラスを定義する複数ビットのフィールドである。 これに加えて、 このファイルディスクリプターの動作を示す 1 ビットのフィールドがある。"
1674 #: build/C/man2/fanotify_init.2:77
1676 "If multiple listeners for permission events exist, the notification class is "
1677 "used to establish the sequence in which the listeners receive the events."
1678 msgstr "アクセス許可イベントを監視しているプログラムが複数いる場合、 通知クラスを使って監視するプログラムのイベント受信順序が管理される。"
1681 #: build/C/man2/fanotify_init.2:80
1683 "Only one of the following notification classes may be specified in I<flags>:"
1684 msgstr "以下の通知クラスのいずれか一つだけを I<flags> に指定できる。"
1687 #: build/C/man2/fanotify_init.2:80
1689 msgid "B<FAN_CLASS_PRE_CONTENT>"
1690 msgstr "B<FAN_CLASS_PRE_CONTENT>"
1693 #: build/C/man2/fanotify_init.2:88
1695 "This value allows the receipt of events notifying that a file has been "
1696 "accessed and events for permission decisions if a file may be accessed. It "
1697 "is intended for event listeners that need to access files before they "
1698 "contain their final data. This notification class might be used by "
1699 "hierarchical storage managers, for example."
1700 msgstr "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのアクセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント受信者がファイルが最終的なデータを格納する前にそのファイルにアクセスする必要がある場合に使用される。 この通知クラスは例えば階層型ストレージ管理などで使用される。"
1703 #: build/C/man2/fanotify_init.2:88
1705 msgid "B<FAN_CLASS_CONTENT>"
1706 msgstr "B<FAN_CLASS_CONTENT>"
1709 #: build/C/man2/fanotify_init.2:96
1711 "This value allows the receipt of events notifying that a file has been "
1712 "accessed and events for permission decisions if a file may be accessed. It "
1713 "is intended for event listeners that need to access files when they already "
1714 "contain their final content. This notification class might be used by "
1715 "malware detection programs, for example."
1716 msgstr "この値は、 ファイルがアクセスされたことを通知するイベントと、 ファイルへのアクセスするかの許可の判断を求めるイベントを受信することを示す。 これはイベント受信者がファイルに最終的なデータが格納された際にそのファイルにアクセスする必要がある場合に使用される。 この通知クラスは例えばウイルス検知プログラムなどで使用される。"
1719 #: build/C/man2/fanotify_init.2:96
1721 msgid "B<FAN_CLASS_NOTIF>"
1722 msgstr "B<FAN_CLASS_NOTIF>"
1725 #: build/C/man2/fanotify_init.2:103
1727 "This is the default value. It does not need to be specified. This value "
1728 "only allows the receipt of events notifying that a file has been accessed. "
1729 "Permission decisions before the file is accessed are not possible."
1730 msgstr "これはデフォルト値である。 この値を指定する必要はない。 この値は、 ファイルがアクセスされたことを通知するイベントの受信だけを行うことを意味する。 ファイルがアクセスする前にアクセス許可の判定を行うことはできない。"
1733 #: build/C/man2/fanotify_init.2:111
1735 "Listeners with different notification classes will receive events in the "
1736 "order B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, B<FAN_CLASS_NOTIF>. "
1737 "The order of notification for listeners in the same notification class is "
1739 msgstr "異なる通知クラスの受信者は B<FAN_CLASS_PRE_CONTENT>, B<FAN_CLASS_CONTENT>, B<FAN_CLASS_NOTIF> の順序でイベントを受信する。 同じ通知クラスの受信者での通知順序は不定である。"
1742 #: build/C/man2/fanotify_init.2:114
1743 msgid "The following bits can additionally be set in I<flags>:"
1744 msgstr "I<flags> には以下のビットを追加でセットすることができる。"
1747 #: build/C/man2/fanotify_init.2:114
1749 msgid "B<FAN_CLOEXEC>"
1750 msgstr "B<FAN_CLOEXEC>"
1753 #: build/C/man2/fanotify_init.2:123
1755 "Set the close-on-exec flag (B<FD_CLOEXEC>) on the new file descriptor. See "
1756 "the description of the B<O_CLOEXEC> flag in B<open>(2)."
1757 msgstr "close-on-exec フラグ (B<FD_CLOEXEC>) を新しいファイルディスクリプターにセットする。 B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
1760 #: build/C/man2/fanotify_init.2:123
1762 msgid "B<FAN_NONBLOCK>"
1763 msgstr "B<FAN_NONBLOCK>"
1766 #: build/C/man2/fanotify_init.2:133
1768 "Enable the nonblocking flag (B<O_NONBLOCK>) for the file descriptor. "
1769 "Reading from the file descriptor will not block. Instead, if no data is "
1770 "available, B<read>(2) will fail with the error B<EAGAIN>."
1771 msgstr "ノンブロッキングフラグ (B<O_NONBLOCK>) をそのファイルディスクリプターで有効にする。 このファイルディスクリプターからの読み出しは停止しない。 その代わり、 読みだし可能なデータが何もない場合、 B<read>(2) はエラー B<EAGAIN> で失敗する。"
1774 #: build/C/man2/fanotify_init.2:133
1776 msgid "B<FAN_UNLIMITED_QUEUE>"
1777 msgstr "B<FAN_UNLIMITED_QUEUE>"
1780 #: build/C/man2/fanotify_init.2:139
1782 "Remove the limit of 16384 events for the event queue. Use of this flag "
1783 "requires the B<CAP_SYS_ADMIN> capability."
1784 msgstr "そのイベントキューの 16384 イベントの上限を削除する。 このフラグを使用するには B<CAP_SYS_ADMIN> ケーパビリティーが必要である。"
1787 #: build/C/man2/fanotify_init.2:139
1789 msgid "B<FAN_UNLIMITED_MARKS>"
1790 msgstr "B<FAN_UNLIMITED_MARKS>"
1793 #: build/C/man2/fanotify_init.2:145
1795 "Remove the limit of 8192 marks. Use of this flag requires the "
1796 "B<CAP_SYS_ADMIN> capability."
1797 msgstr "8192 マークの上限を削除する。 このフラグを使用するには B<CAP_SYS_ADMIN> ケーパビリティーが必要である。"
1800 #: build/C/man2/fanotify_init.2:158
1802 "The I<event_f_flags> argument defines the file status flags that will be set "
1803 "on the open file descriptions that are created for fanotify events. For "
1804 "details of these flags, see the description of the I<flags> values in "
1805 "B<open>(2). I<event_f_flags> includes a multi-bit field for the access "
1806 "mode. This field can take the following values:"
1807 msgstr "I<event_f_flags> 引き数は fanotify イベントが作成されるオープンファイル記述にセットされるファイル状態フラグを定義する。 これらのフラグの詳細については B<open>(2) の I<flags> 値の説明を参照のこと。 I<event_f_flags> にはアクセスモードのビットを複数入れることができる。 このフィールドには以下の値も指定することができる。"
1810 #: build/C/man2/fanotify_init.2:158
1813 msgstr "B<O_RDONLY>"
1816 #: build/C/man2/fanotify_init.2:161
1817 msgid "This value allows only read access."
1818 msgstr "読み出しアクセスのみを許可する。"
1821 #: build/C/man2/fanotify_init.2:161
1824 msgstr "B<O_WRONLY>"
1827 #: build/C/man2/fanotify_init.2:164
1828 msgid "This value allows only write access."
1829 msgstr "書き込みアクセスのみを許可する。"
1832 #: build/C/man2/fanotify_init.2:164
1838 #: build/C/man2/fanotify_init.2:167
1839 msgid "This value allows read and write access."
1840 msgstr "読み出しと書き込みの両方を許可する。"
1843 #: build/C/man2/fanotify_init.2:171
1845 "Additional bits can be set in I<event_f_flags>. The most useful values are:"
1846 msgstr "他のビットも I<event_f_flags> もセットすることができる。 役立つであろう値は以下である。"
1849 #: build/C/man2/fanotify_init.2:171
1851 msgid "B<O_LARGEFILE>"
1852 msgstr "B<O_LARGEFILE>"
1855 #: build/C/man2/fanotify_init.2:178
1857 "Enable support for files exceeding 2 GB. Failing to set this flag will "
1858 "result in an B<EOVERFLOW> error when trying to open a large file which is "
1859 "monitored by an fanotify group on a 32-bit system."
1860 msgstr "2 GB を超えるファイルのサポートを有効にする。 このフラグのセットに失敗すると、 32 ビットシステムで fanotify グループが監視するラージファイルをオープンしようとした際に B<EOVERFLOW> エラーとなる。"
1863 #: build/C/man2/fanotify_init.2:178
1865 msgid "B<O_CLOEXEC>"
1866 msgstr "B<O_CLOEXEC>"
1869 #: build/C/man2/fanotify_init.2:186
1871 "Enable the close-on-exec flag for the file descriptor. See the description "
1872 "of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this may be useful."
1873 msgstr "このファイルディスクリプターで close-on-exec フラグを有効にする。 このフラグが役立つ理由については B<open>(2) の B<O_CLOEXEC> フラグの説明を参照。"
1876 #: build/C/man2/fanotify_init.2:199
1878 "The following are also allowable: B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, "
1879 "B<O_NONBLOCK>, and B<O_SYNC>. Specifying any other flag in I<event_f_flags> "
1880 "yields the error B<EINVAL> (but see BUGS)."
1881 msgstr "B<O_APPEND>, B<O_DSYNC>, B<O_NOATIME>, B<O_NONBLOCK>, B<O_SYNC> も指定することができる。 I<event_f_flags> にこれ以外のフラグを指定すると、 エラー B<EINVAL> が起こる (ただし、バグを参照)。"
1884 #: build/C/man2/fanotify_init.2:199 build/C/man2/fanotify_mark.2:236
1885 #: build/C/man2/inotify_add_watch.2:77 build/C/man2/inotify_init.2:74
1886 #: build/C/man2/inotify_rm_watch.2:48
1888 msgid "RETURN VALUE"
1892 #: build/C/man2/fanotify_init.2:206
1894 "On success, B<fanotify_init>() returns a new file descriptor. On error, -1 "
1895 "is returned, and I<errno> is set to indicate the error."
1896 msgstr "成功すると B<fanotify_init>() は新しいファイルディスクリプターを返す。 エラーの場合、 -1 を返し、 I<errno> にエラーを示す値を設定する。"
1899 #: build/C/man2/fanotify_init.2:216
1901 "An invalid value was passed in I<flags> or I<event_f_flags>. "
1902 "B<FAN_ALL_INIT_FLAGS> defines all allowable bits for I<flags>."
1903 msgstr "I<flags> か I<event_f_flags> に無効な値が渡された。 B<FAN_ALL_INIT_FLAGS> で I<flags> に指定できる全ビットが定義されている。"
1906 #: build/C/man2/fanotify_init.2:219
1907 msgid "The number of fanotify groups for this user exceeds 128."
1908 msgstr "このユーザーの fanotify グループ数が 128 を超過した。"
1911 #: build/C/man2/fanotify_init.2:219 build/C/man2/fanotify_mark.2:274
1912 #: build/C/man2/inotify_add_watch.2:109 build/C/man2/inotify_init.2:91
1918 #: build/C/man2/fanotify_init.2:222
1919 msgid "The allocation of memory for the notification group failed."
1920 msgstr "通知グループへのメモリー割り当てが失敗した。"
1923 #: build/C/man2/fanotify_init.2:222 build/C/man2/fanotify_mark.2:283
1929 #: build/C/man2/fanotify_init.2:228
1931 "This kernel does not implement B<fanotify_init>(). The fanotify API is "
1932 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
1933 msgstr "このカーネルは B<fanotify_init>() を実装していない。 fanotify API が利用できるのは、 カーネルが B<CONFIG_FANOTIFY> を有効にして作成されている場合だけである。"
1936 #: build/C/man2/fanotify_init.2:228
1942 #: build/C/man2/fanotify_init.2:233
1944 "The operation is not permitted because the caller lacks the B<CAP_SYS_ADMIN> "
1946 msgstr "呼び出し元が B<CAP_SYS_ADMIN> ケーパビリティーを持っていないので、操作が許可されない。"
1949 #: build/C/man2/fanotify_init.2:237
1951 "B<fanotify_init>() was introduced in version 2.6.36 of the Linux kernel and "
1952 "enabled in version 2.6.37."
1953 msgstr "B<fanotify_init>() は Linux カーネルのバージョン 2.6.36 で導入され、 バージョン 2.6.37 で有効になった。"
1956 #: build/C/man2/fanotify_init.2:239 build/C/man2/fanotify_mark.2:305
1957 #: build/C/man2/inotify_add_watch.2:120 build/C/man2/inotify_rm_watch.2:71
1958 msgid "This system call is Linux-specific."
1959 msgstr "このシステムコールは Linux 独自である。"
1962 #: build/C/man2/fanotify_init.2:242
1963 msgid "As of Linux 3.17, the following bug exists:"
1964 msgstr "Linux 3.17 時点では、 以下のバグが存在する。"
1966 #. FIXME . Patch proposed: https://lkml.org/lkml/2014/9/24/967
1968 #: build/C/man2/fanotify_init.2:248
1969 msgid "The B<O_CLOEXEC> is ignored when passed in I<event_f_flags>."
1970 msgstr "B<O_CLOEXEC> が I<event_f_flags> に指定された場合、 無視される。"
1973 #: build/C/man2/fanotify_init.2:250
1974 msgid "The following bug was present in Linux kernels before version 3.14:"
1975 msgstr "バージョン 3.14 より前の Linux カーネルには以下のバグが存在する。"
1977 #. Fixed by commit 48149e9d3a7e924010a0daab30a6197b7d7b6580
1979 #: build/C/man2/fanotify_init.2:260
1981 "The I<event_f_flags> argument is not checked for invalid flags. Flags that "
1982 "are intended only for internal use, such as B<FMODE_EXEC>, can be set, and "
1983 "will consequently be set for the file descriptors returned when reading from "
1984 "the fanotify file descriptor."
1985 msgstr "I<event_f_flags> 引き数に無効なフラグがないかのチェックが行われない。 B<FMODE_EXEC> などの内部での使用のみが意図されたフラグを指定することができ、 その場合 fanotify ファイルディスクリプターからの読み出し時に返されるファイルディスクリプターにそのフラグがセットされる。"
1988 #: build/C/man2/fanotify_init.2:263
1989 msgid "B<fanotify_mark>(2), B<fanotify>(7)"
1990 msgstr "B<fanotify_mark>(2), B<fanotify>(7)"
1993 #: build/C/man2/fanotify_mark.2:24
1995 msgid "FANOTIFY_MARK"
1996 msgstr "FANOTIFY_MARK"
1999 #: build/C/man2/fanotify_mark.2:28
2001 "fanotify_mark - add, remove, or modify an fanotify mark on a filesystem "
2006 #: build/C/man2/fanotify_mark.2:31
2008 msgid "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2009 msgstr "B<#include E<lt>sys/fanotify.hE<gt>>\n"
2012 #: build/C/man2/fanotify_mark.2:35
2015 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2016 "B< uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2018 "B<int fanotify_mark(int >I<fanotify_fd>B<, unsigned int >I<flags>B<,>\n"
2019 "B< uint64_t >I<mask>B<, int >I<dirfd>B<, const char *>I<pathname>B<);>\n"
2022 #: build/C/man2/fanotify_mark.2:44
2024 "B<fanotify_mark>(2) adds, removes, or modifies an fanotify mark on a "
2025 "filesystem object. The caller must have read permission on the filesystem "
2026 "object that is to be marked."
2030 #: build/C/man2/fanotify_mark.2:49
2032 "The I<fanotify_fd> argument is a file descriptor returned by "
2033 "B<fanotify_init>(2)."
2037 #: build/C/man2/fanotify_mark.2:53
2039 "I<flags> is a bit mask describing the modification to perform. It must "
2040 "include exactly one of the following values:"
2044 #: build/C/man2/fanotify_mark.2:53
2046 msgid "B<FAN_MARK_ADD>"
2047 msgstr "B<FAN_MARK_ADD>"
2050 #: build/C/man2/fanotify_mark.2:62
2052 "The events in I<mask> will be added to the mark mask (or to the ignore "
2053 "mask). I<mask> must be nonempty or the error B<EINVAL> will occur."
2057 #: build/C/man2/fanotify_mark.2:62
2059 msgid "B<FAN_MARK_REMOVE>"
2060 msgstr "B<FAN_MARK_REMOVE>"
2063 #: build/C/man2/fanotify_mark.2:71
2065 "The events in argument I<mask> will be removed from the mark mask (or from "
2066 "the ignore mask). I<mask> must be nonempty or the error B<EINVAL> will "
2071 #: build/C/man2/fanotify_mark.2:71
2073 msgid "B<FAN_MARK_FLUSH>"
2074 msgstr "B<FAN_MARK_FLUSH>"
2077 #: build/C/man2/fanotify_mark.2:86
2079 "Remove either all mount or all non-mount marks from the fanotify group. If "
2080 "I<flag> contains B<FAN_MARK_MOUNT>, all marks for mounts are removed from "
2081 "the group. Otherwise, all marks for directories and files are removed. No "
2082 "flag other than B<FAN_MARK_MOUNT> can be used in conjunction with "
2083 "B<FAN_MARK_FLUSH>. I<mask> is ignored."
2087 #: build/C/man2/fanotify_mark.2:90
2089 "If none of the values above is specified, or more than one is specified, the "
2090 "call fails with the error B<EINVAL>."
2094 #: build/C/man2/fanotify_mark.2:94
2096 "In addition, zero or more of the following values may be ORed into I<flags>:"
2100 #: build/C/man2/fanotify_mark.2:94
2102 msgid "B<FAN_MARK_DONT_FOLLOW>"
2103 msgstr "B<FAN_MARK_DONT_FOLLOW>"
2106 #: build/C/man2/fanotify_mark.2:105
2108 "If I<pathname> is a symbolic link, mark the link itself, rather than the "
2109 "file to which it refers. (By default, B<fanotify_mark>() dereferences "
2110 "I<pathname> if it is a symbolic link.)"
2114 #: build/C/man2/fanotify_mark.2:105
2116 msgid "B<FAN_MARK_ONLYDIR>"
2117 msgstr "B<FAN_MARK_ONLYDIR>"
2120 #: build/C/man2/fanotify_mark.2:110
2122 "If the filesystem object to be marked is not a directory, the error "
2123 "B<ENOTDIR> shall be raised."
2127 #: build/C/man2/fanotify_mark.2:110
2129 msgid "B<FAN_MARK_MOUNT>"
2130 msgstr "B<FAN_MARK_MOUNT>"
2133 #: build/C/man2/fanotify_mark.2:121
2135 "Mark the mount point specified by I<pathname>. If I<pathname> is not itself "
2136 "a mount point, the mount point containing I<pathname> will be marked. All "
2137 "directories, subdirectories, and the contained files of the mount point will "
2142 #: build/C/man2/fanotify_mark.2:121
2144 msgid "B<FAN_MARK_IGNORED_MASK>"
2145 msgstr "B<FAN_MARK_IGNORED_MASK>"
2148 #: build/C/man2/fanotify_mark.2:126
2150 "The events in I<mask> shall be added to or removed from the ignore mask."
2154 #: build/C/man2/fanotify_mark.2:126
2156 msgid "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2157 msgstr "B<FAN_MARK_IGNORED_SURV_MODIFY>"
2160 #: build/C/man2/fanotify_mark.2:132
2162 "The ignore mask shall survive modify events. If this flag is not set, the "
2163 "ignore mask is cleared when a modify event occurs for the ignored file or "
2168 #: build/C/man2/fanotify_mark.2:136
2170 "I<mask> defines which events shall be listened for (or which shall be "
2171 "ignored). It is a bit mask composed of the following values:"
2175 #: build/C/man2/fanotify_mark.2:139
2177 "Create an event when a file or directory (but see BUGS) is accessed (read)."
2181 #: build/C/man2/fanotify_mark.2:142
2182 msgid "Create an event when a file is modified (write)."
2186 #: build/C/man2/fanotify_mark.2:145
2187 msgid "Create an event when a writable file is closed."
2191 #: build/C/man2/fanotify_mark.2:148
2192 msgid "Create an event when a read-only file or directory is closed."
2196 #: build/C/man2/fanotify_mark.2:151
2197 msgid "Create an event when a file or directory is opened."
2201 #: build/C/man2/fanotify_mark.2:159
2203 "Create an event when a permission to open a file or directory is requested. "
2204 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2205 "B<FAN_CLASS_CONTENT> is required."
2209 #: build/C/man2/fanotify_mark.2:167
2211 "Create an event when a permission to read a file or directory is requested. "
2212 "An fanotify file descriptor created with B<FAN_CLASS_PRE_CONTENT> or "
2213 "B<FAN_CLASS_CONTENT> is required."
2217 #: build/C/man2/fanotify_mark.2:167
2219 msgid "B<FAN_ONDIR>"
2220 msgstr "B<FAN_ONDIR>"
2223 #: build/C/man2/fanotify_mark.2:176
2225 "Create events for directories\\(emfor example, when B<opendir>(3), "
2226 "B<readdir>(3) (but see BUGS), and B<closedir>(3) are called. Without this "
2227 "flag, only events for files are created."
2231 #: build/C/man2/fanotify_mark.2:176
2233 msgid "B<FAN_EVENT_ON_CHILD>"
2234 msgstr "B<FAN_EVENT_ON_CHILD>"
2237 #: build/C/man2/fanotify_mark.2:184
2239 "Events for the immediate children of marked directories shall be created. "
2240 "The flag has no effect when marking mounts. Note that events are not "
2241 "generated for children of the subdirectories of marked directories. To "
2242 "monitor complete directory trees it is necessary to mark the relevant mount."
2246 #: build/C/man2/fanotify_mark.2:186
2247 msgid "The following composed value is defined:"
2251 #: build/C/man2/fanotify_mark.2:190
2252 msgid "A file is closed (B<FAN_CLOSE_WRITE>|B<FAN_CLOSE_NOWRITE>)."
2256 #: build/C/man2/fanotify_mark.2:195
2258 "The filesystem object to be marked is determined by the file descriptor "
2259 "I<dirfd> and the pathname specified in I<pathname>:"
2263 #: build/C/man2/fanotify_mark.2:201
2265 "If I<pathname> is NULL, I<dirfd> defines the filesystem object to be marked."
2269 #: build/C/man2/fanotify_mark.2:209
2271 "If I<pathname> is NULL, and I<dirfd> takes the special value B<AT_FDCWD>, "
2272 "the current working directory is to be marked."
2276 #: build/C/man2/fanotify_mark.2:215
2278 "If I<pathname> is absolute, it defines the filesystem object to be marked, "
2279 "and I<dirfd> is ignored."
2283 #: build/C/man2/fanotify_mark.2:226
2285 "If I<pathname> is relative, and I<dirfd> does not have the value "
2286 "B<AT_FDCWD>, then the filesystem object to be marked is determined by "
2287 "interpreting I<pathname> relative the directory referred to by I<dirfd>."
2291 #: build/C/man2/fanotify_mark.2:236
2293 "If I<pathname> is relative, and I<dirfd> has the value B<AT_FDCWD>, then the "
2294 "filesystem object to be marked is determined by interpreting I<pathname> "
2295 "relative the current working directory."
2299 #: build/C/man2/fanotify_mark.2:243
2301 "On success, B<fanotify_mark>() returns 0. On error, -1 is returned, and "
2302 "I<errno> is set to indicate the error."
2306 #: build/C/man2/fanotify_mark.2:244 build/C/man2/inotify_add_watch.2:88
2307 #: build/C/man2/inotify_rm_watch.2:56
2313 #: build/C/man2/fanotify_mark.2:248
2314 msgid "An invalid file descriptor was passed in I<fanotify_fd>."
2318 #: build/C/man2/fanotify_mark.2:257
2320 "An invalid value was passed in I<flags> or I<mask>, or I<fanotify_fd> was "
2321 "not an fanotify file descriptor."
2325 #: build/C/man2/fanotify_mark.2:265
2327 "The fanotify file descriptor was opened with B<FAN_CLASS_NOTIF> and mask "
2328 "contains a flag for permission events (B<FAN_OPEN_PERM> or "
2329 "B<FAN_ACCESS_PERM>)."
2333 #: build/C/man2/fanotify_mark.2:274
2335 "The filesystem object indicated by I<dirfd> and I<pathname> does not exist. "
2336 "This error also occurs when trying to remove a mark from an object which is "
2341 #: build/C/man2/fanotify_mark.2:277
2342 msgid "The necessary memory could not be allocated."
2346 #: build/C/man2/fanotify_mark.2:277 build/C/man2/inotify_add_watch.2:112
2352 #: build/C/man2/fanotify_mark.2:283
2354 "The number of marks exceeds the limit of 8192 and the B<FAN_UNLIMITED_MARKS> "
2355 "flag was not specified when the fanotify file descriptor was created with "
2356 "B<fanotify_init>(2)."
2360 #: build/C/man2/fanotify_mark.2:289
2362 "This kernel does not implement B<fanotify_mark>(). The fanotify API is "
2363 "available only if the kernel was configured with B<CONFIG_FANOTIFY>."
2367 #: build/C/man2/fanotify_mark.2:289
2373 #: build/C/man2/fanotify_mark.2:299
2375 "I<flags> contains B<FAN_MARK_ONLYDIR>, and I<dirfd> and I<pathname> do not "
2376 "specify a directory."
2380 #: build/C/man2/fanotify_mark.2:303
2382 "B<fanotify_mark>() was introduced in version 2.6.36 of the Linux kernel and "
2383 "enabled in version 2.6.37."
2387 #: build/C/man2/fanotify_mark.2:307
2388 msgid "The following bugs were present in Linux kernels before version 3.16:"
2391 #. Fixed by commit 0a8dd2db579f7a0ac7033d6b857c3d5dbaa77563
2393 #: build/C/man2/fanotify_mark.2:317
2395 "If I<flags> contains B<FAN_MARK_FLUSH>, I<dirfd> and I<pathname> must "
2396 "specify a valid filesystem object, even though this object is not used."
2399 #. Fixed by commit d4c7cf6cffb1bc711a833b5e304ba5bcfe76398b
2401 #: build/C/man2/fanotify_mark.2:323
2402 msgid "B<readdir>(2) does not generate a B<FAN_ACCESS> event."
2405 #. Fixed by commit cc299a98eb13a9853675a9cbb90b30b4011e1406
2407 #: build/C/man2/fanotify_mark.2:331
2409 "If B<fanotify_mark>(2) is called with B<FAN_MARK_FLUSH>, I<flags> is not "
2410 "checked for invalid values."
2414 #: build/C/man2/fanotify_mark.2:334
2415 msgid "B<fanotify_init>(2), B<fanotify>(7)"
2416 msgstr "B<fanotify_init>(2), B<fanotify>(7)"
2419 #: build/C/man7/inotify.7:27
2425 #: build/C/man7/inotify.7:30
2426 msgid "inotify - monitoring filesystem events"
2427 msgstr "inotify - ファイルシステムイベントを監視する"
2430 #: build/C/man7/inotify.7:38
2432 "The I<inotify> API provides a mechanism for monitoring filesystem events. "
2433 "Inotify can be used to monitor individual files, or to monitor directories. "
2434 "When a directory is monitored, inotify will return events for the directory "
2435 "itself, and for files inside the directory."
2437 "I<inotify> API はファイルシステムイベントを監視するための機構を提供する。 "
2438 "inotify は個々のファイルやディレクトリを監視するのに使える。 ディレクトリを監"
2439 "視する場合、inotify はディレクトリ自身と ディレクトリ内のファイルのイベントを"
2443 #: build/C/man7/inotify.7:40
2444 msgid "The following system calls are used with this API:"
2445 msgstr "この API では以下のシステムコールが使用される。"
2448 #: build/C/man7/inotify.7:51
2450 "B<inotify_init>(2) creates an inotify instance and returns a file "
2451 "descriptor referring to the inotify instance. The more recent "
2452 "B<inotify_init1>(2) is like B<inotify_init>(2), but has a I<flags> argument "
2453 "that provides access to some extra functionality."
2455 "B<inotify_init>(2) は inotify インスタンスを作成し、inotify インスタンスを参"
2456 "照する ファイルディスクリプターを返す。 より新しい B<inotify_init1>(2) も "
2457 "B<inotify_init>(2) と同様だが、 こちらにはいくつかの追加の機能を利用するため"
2458 "の I<flags> 引き数がある。"
2461 #: build/C/man7/inotify.7:64
2463 "B<inotify_add_watch>(2) manipulates the \"watch list\" associated with an "
2464 "inotify instance. Each item (\"watch\") in the watch list specifies the "
2465 "pathname of a file or directory, along with some set of events that the "
2466 "kernel should monitor for the file referred to by that pathname. "
2467 "B<inotify_add_watch>(2) either creates a new watch item, or modifies an "
2468 "existing watch. Each watch has a unique \"watch descriptor\", an integer "
2469 "returned by B<inotify_add_watch>(2) when the watch is created."
2471 "B<inotify_add_watch>(2) は inotify インスタンスに関連づけられた「監視対象 "
2472 "(watch) リスト」を操作する。 監視対象リストの各アイテム (\"watch\") は、 ファ"
2473 "イルまたはディレクトリのパス名と、 そのパス名で参照されるファイルに対して "
2474 "カーネルが監視する複数のイベントの集合を指定する。 B<inotify_add_watch>(2) "
2475 "は新しい監視アイテムの作成や既存の監視対象の変更ができる。 各監視対象は一意の"
2476 "「監視対象ディスクリプター」を持つ。 これは監視対象を作成したときに "
2477 "B<inotify_add_watch>(2) から返される整数である。"
2480 #: build/C/man7/inotify.7:70
2482 "When events occur for monitored files and directories, those events are made "
2483 "available to the application as structured data that can be read from the "
2484 "inotify file descriptor using B<read>(2) (see below)."
2486 "監視しているファイルやディレクトリでイベントが起こると、 それらのイベントはア"
2487 "プリケーションから inotify ファイルディスクリプターから B<read>(2) を使って構造"
2488 "化データとして読み出すことができる (下記参照)。"
2491 #: build/C/man7/inotify.7:73
2492 msgid "B<inotify_rm_watch>(2) removes an item from an inotify watch list."
2494 "B<inotify_rm_watch>(2) は inotify の監視対象リストからアイテムを削除する。"
2497 #: build/C/man7/inotify.7:80
2499 "When all file descriptors referring to an inotify instance have been closed "
2500 "(using B<close>(2)), the underlying object and its resources are freed for "
2501 "reuse by the kernel; all associated watches are automatically freed."
2503 "inotify インスタンスを指している 全てのファイルディスクリプターが (B<close>(2) "
2504 "を使って) クローズされた場合、 その下層にあるオブジェクトとそのリソースは、 "
2505 "カーネルで再利用するために解放される。 関連が切られた監視対象は自動的に解放さ"
2509 #: build/C/man7/inotify.7:89
2511 "With careful programming, an application can use inotify to efficiently "
2512 "monitor and cache the state of a set of filesystem objects. However, robust "
2513 "applications should allow for the fact that bugs in the monitoring logic or "
2514 "races of the kind described below may leave the cache inconsistent with the "
2515 "filesystem state. It is probably wise to to do some consistency checking, "
2516 "and rebuild the cache when inconsistencies are detected."
2518 "注意深くプログラミングすることで、 アプリケーションは inotify を使ってファイ"
2519 "ルシステムオブジェクトの集合の状態を効率的に監視しキャッシュしておくことがで"
2520 "きる。 しかしながら、ロバストなアプリケーションでは、監視ロジックのバグや以下"
2521 "に説明があるような種類の競合条件によりファイルシステムの状態とキャッシュが一"
2522 "致しない状態になることがあるという事実も考慮に入れておくべきである。 おそらく"
2523 "何らかの一貫性のチェックを行い、不一致が検出された場合にはキャッシュを再構築"
2527 #: build/C/man7/inotify.7:89
2529 msgid "Reading events from an inotify file descriptor"
2530 msgstr "inotify ファイルディスクリプターからのイベントの読み出し"
2533 #: build/C/man7/inotify.7:102
2535 "To determine what events have occurred, an application B<read>(2)s from the "
2536 "inotify file descriptor. If no events have so far occurred, then, assuming "
2537 "a blocking file descriptor, B<read>(2) will block until at least one event "
2538 "occurs (unless interrupted by a signal, in which case the call fails with "
2539 "the error B<EINTR>; see B<signal>(7))."
2541 "どのようなイベントが起こっていたかを知るには、 アプリケーションで inotify "
2542 "ファイルディスクリプターを B<read>(2) すればよい。 これまでに何もイベントが起"
2543 "こっていない場合、 停止 (blocking) モードのファイルディスクリプターであれば、 "
2544 "少なくとも 1 つのイベントが起こるまで B<read>(2) は停止する (シグナルにより"
2545 "割り込まれなかった場合。 シグナルによる割り込みがあった場合、呼び出しはエ"
2546 "ラー B<EINTR> で失敗する。 B<signal>(7) 参照)。"
2549 #: build/C/man7/inotify.7:106
2551 "Each successful B<read>(2) returns a buffer containing one or more of the "
2552 "following structures:"
2553 msgstr "B<read>(2) が成功すると、以下の構造体を 1 つ以上含むバッファーが返される:"
2555 #. FIXME . The type of the 'wd' field should probably be "int32_t".
2556 #. I submitted a patch to fix this. See the LKML thread
2557 #. "[patch] Fix type errors in inotify interfaces", 18 Nov 2008
2558 #. Glibc bug filed: http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
2560 #: build/C/man7/inotify.7:121
2563 "struct inotify_event {\n"
2564 " int wd; /* Watch descriptor */\n"
2565 " uint32_t mask; /* Mask describing event */\n"
2566 " uint32_t cookie; /* Unique cookie associating related\n"
2567 " events (for rename(2)) */\n"
2568 " uint32_t len; /* Size of I<name> field */\n"
2569 " char name[]; /* Optional null-terminated name */\n"
2572 "struct inotify_event {\n"
2573 " int wd; /* 監視対象ディスクリプター */\n"
2574 " uint32_t mask; /* イベントを示すマスク */\n"
2575 " uint32_t cookie; /* 関連するイベント群を関連づける\n"
2576 " 一意なクッキー (rename(2) 用) */\n"
2577 " uint32_t len; /* \\(aqname\\(aq フィールドのサイズ */\n"
2578 " char name[]; /* ヌルで終端された任意の名前 */\n"
2582 #: build/C/man7/inotify.7:128
2584 "I<wd> identifies the watch for which this event occurs. It is one of the "
2585 "watch descriptors returned by a previous call to B<inotify_add_watch>(2)."
2587 "I<wd> はイベント発生の監視対象を指定する。 これは、前もって行われた "
2588 "B<inotify_add_watch>(2) 呼び出しで返された監視対象ディスクリプターのうちの 1 "
2592 #: build/C/man7/inotify.7:131
2594 "I<mask> contains bits that describe the event that occurred (see below)."
2596 "I<mask> には発生したイベント (下記参照) を記述するためのビットが含まれる。"
2599 #: build/C/man7/inotify.7:143
2601 "I<cookie> is a unique integer that connects related events. Currently this "
2602 "is used only for rename events, and allows the resulting pair of "
2603 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events to be connected by the "
2604 "application. For all other event types, I<cookie> is set to 0."
2606 "I<cookie> は関連するイベントを関連づけるための一意な整数である。\n"
2607 "現在のところ、この値は rename イベントに対してのみ使われており、\n"
2608 "結果のペアである B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントを\n"
2609 "アプリケーションで関連づけることができる。\n"
2610 "他のイベント種別の場合には、 I<cookie> は 0 に設定する。"
2613 #: build/C/man7/inotify.7:152
2615 "The I<name> field is present only when an event is returned for a file "
2616 "inside a watched directory; it identifies the file pathname relative to the "
2617 "watched directory. This pathname is null-terminated, and may include "
2618 "further null bytes (\\(aq\\e0\\(aq) to align subsequent reads to a suitable "
2621 "I<name> フィールドは監視しているディレクトリ内のファイルに対して イベントが返"
2622 "される場合のためにだけ存在する。 監視するディレクトリからのファイルの相対パス"
2623 "名を表す。 このパス名はヌルで終端され、 その後の読み込みで適切なアドレス境界"
2624 "に調整するために、 さらにヌルバイト (\\(aq\\e0\\(aq) が含まれる場合もある。"
2627 #: build/C/man7/inotify.7:162
2629 "The I<len> field counts all of the bytes in I<name>, including the null "
2630 "bytes; the length of each I<inotify_event> structure is thus I<sizeof(struct "
2631 "inotify_event)+len>."
2633 "I<len> フィールドはヌルバイトを含む I<name> の全てのバイト数を表す。\n"
2634 "よって、 I<inotify_event> 構造体のサイズは \n"
2635 "I<sizeof(struct inotify_event)+len> である。"
2638 #: build/C/man7/inotify.7:173
2640 "The behavior when the buffer given to B<read>(2) is too small to return "
2641 "information about the next event depends on the kernel version: in kernels "
2642 "before 2.6.21, B<read>(2) returns 0; since kernel 2.6.21, B<read>(2) fails "
2643 "with the error B<EINVAL>. Specifying a buffer of size"
2645 "B<read>(2) に渡されたバッファーが小さすぎて次のイベントに関する情報を返せ\n"
2646 "ない場合の動作はカーネルのバージョンにより異なる。 2.6.21 より前のカー\n"
2647 "ネルでは、 B<read>(2) は 0 を返す。 2.6.21 以降のカーネルでは、\n"
2648 "B<read>(2) はエラー B<EINVAL> で失敗する。\n"
2652 #: build/C/man7/inotify.7:175
2654 msgid " sizeof(struct inotify_event) + NAME_MAX + 1\n"
2655 msgstr " sizeof(struct inotify_event) + NAME_MAX + 1\n"
2658 #: build/C/man7/inotify.7:177
2659 msgid "will be sufficient to read at least one event."
2660 msgstr "を指定すれば、少なくとも 1 イベントで読み出しを行うには十分である。"
2663 #: build/C/man7/inotify.7:177
2665 msgid "inotify events"
2666 msgstr "inotify イベント"
2669 #: build/C/man7/inotify.7:197
2671 "The B<inotify_add_watch>(2) I<mask> argument and the I<mask> field of the "
2672 "I<inotify_event> structure returned when B<read>(2)ing an inotify file "
2673 "descriptor are both bit masks identifying inotify events. The following "
2674 "bits can be specified in I<mask> when calling B<inotify_add_watch>(2) and "
2675 "may be returned in the I<mask> field returned by B<read>(2):"
2677 "B<inotify_add_watch>(2) の I<mask> 引き数と、inotify ファイル構造体を "
2678 "B<read>(2) したときに返される I<inotify_event> 構造体の I<mask> フィールド"
2679 "は、ともに inotify イベントを識別するための ビットマスクである。 以下のビット"
2680 "が B<inotify_add_watch>(2) を呼ぶときの I<mask> に指定可能であり、 "
2681 "B<read>(2) で返される I<mask> フィールドで返される:"
2684 #: build/C/man7/inotify.7:198
2686 msgid "B<IN_ACCESS> (+)"
2687 msgstr "B<IN_ACCESS> (+)"
2690 #: build/C/man7/inotify.7:203
2691 msgid "File was accessed (e.g., B<read>(2), B<execve>(2))."
2692 msgstr "(B<read>(2), B<execve>(2) などで) ファイルがアクセスされた。"
2695 #: build/C/man7/inotify.7:203
2697 msgid "B<IN_ATTRIB> (*)"
2698 msgstr "B<IN_ATTRIB> (*)"
2701 #: build/C/man7/inotify.7:218
2703 "Metadata changed\\(emfor example, permissions (e.g., B<chmod>(2)), "
2704 "timestamps (e.g., B<utimensat>(2)), extended attributes (B<setxattr>(2)), "
2705 "link count (since Linux 2.6.25; e.g., for the target of B<link>(2) and for "
2706 "B<unlink>(2)), and user/group ID (e.g., B<chown>(2))."
2708 "メタデータが変更された。 メタデータとは、例えば、アクセス許可 (B<chmod>(2))、"
2709 "タイムスタンプ (B<utimensat>(2) など)、拡張属性 (B<setxattr>(2))、 リンクカウ"
2710 "ント (Linux 2.6.25 以降; B<link>(2) のリンク先や B<unlink>(2) など)、ユー"
2711 "ザー/グループ ID (B<chown>(2) など) などである。"
2714 #: build/C/man7/inotify.7:218
2716 msgid "B<IN_CLOSE_WRITE> (+)"
2717 msgstr "B<IN_CLOSE_WRITE> (+)"
2720 #: build/C/man7/inotify.7:221
2721 msgid "File opened for writing was closed."
2722 msgstr "書き込みのためにオープンされたファイルがクローズされた。"
2725 #: build/C/man7/inotify.7:221
2727 msgid "B<IN_CLOSE_NOWRITE> (*)"
2728 msgstr "B<IN_CLOSE_NOWRITE> (*)"
2731 #: build/C/man7/inotify.7:224
2732 msgid "File or directory not opened for writing was closed."
2734 "書き込み用としてはオープンされていないファイルやディレクトリがクローズされ"
2738 #: build/C/man7/inotify.7:224
2740 msgid "B<IN_CREATE> (+)"
2741 msgstr "B<IN_CREATE> (+)"
2744 #: build/C/man7/inotify.7:234
2746 "File/directory created in watched directory (e.g., B<open>(2) B<O_CREAT>, "
2747 "B<mkdir>(2), B<link>(2), B<symlink>(2), B<bind>(2) on a UNIX domain socket)."
2749 "監視対象ディレクトリ内でファイルやディレクトリが作成された (B<open>(2) "
2750 "B<O_CREAT>, B<mkdir>(2), B<link>(2), B<symlink>(2), UNIX ドメインソケットに対"
2751 "する B<bind>(2) など)。"
2754 #: build/C/man7/inotify.7:234
2756 msgid "B<IN_DELETE> (+)"
2757 msgstr "B<IN_DELETE> (+)"
2760 #: build/C/man7/inotify.7:237
2761 msgid "File/directory deleted from watched directory."
2762 msgstr "監視対象ディレクトリ内でファイルやディレクトリが削除された。"
2765 #: build/C/man7/inotify.7:237
2767 msgid "B<IN_DELETE_SELF>"
2768 msgstr "B<IN_DELETE_SELF>"
2771 #: build/C/man7/inotify.7:248
2773 "Watched file/directory was itself deleted. (This event also occurs if an "
2774 "object is moved to another filesystem, since B<mv>(1) in effect copies the "
2775 "file to the other filesystem and then deletes it from the original "
2776 "filesystem.) In addition, an B<IN_IGNORED> event will subsequently be "
2777 "generated for the watch descriptor."
2779 "監視対象のファイルやディレクトリ自身が削除あれた。 (このイベントはオブジェク"
2780 "トが別のファイルシステムに移動された場合にも発生する。 B<mv>(1) は実際には別"
2781 "のファイルシステムにファイルをコピーした後、元のファイルシステムからそのファ"
2782 "イルを削除するからである。) また、 結果的に監視ディスクリプターに対して "
2783 "B<IN_IGNORED> イベントも生成される。"
2786 #: build/C/man7/inotify.7:248
2788 msgid "B<IN_MODIFY> (+)"
2789 msgstr "B<IN_MODIFY> (+)"
2792 #: build/C/man7/inotify.7:253
2793 msgid "File was modified (e.g., B<write>(2), B<truncate>(2))."
2794 msgstr "ファイルが変更された (B<write>(2), B<truncate>(2) など)。"
2797 #: build/C/man7/inotify.7:253
2799 msgid "B<IN_MOVE_SELF>"
2800 msgstr "B<IN_MOVE_SELF>"
2803 #: build/C/man7/inotify.7:256
2804 msgid "Watched file/directory was itself moved."
2805 msgstr "監視対象のディレクトリまたはファイル自身が移動された。"
2808 #: build/C/man7/inotify.7:256
2810 msgid "B<IN_MOVED_FROM> (+)"
2811 msgstr "B<IN_MOVED_FROM> (+)"
2814 #: build/C/man7/inotify.7:260
2816 "Generated for the directory containing the old filename when a file is "
2819 "ファイル名の変更を行った際に変更前のファイル名が含まれるディレクトリに対して"
2823 #: build/C/man7/inotify.7:260
2825 msgid "B<IN_MOVED_TO> (+)"
2826 msgstr "B<IN_MOVED_TO> (+)"
2829 #: build/C/man7/inotify.7:264
2831 "Generated for the directory containing the new filename when a file is "
2834 "ファイル名の変更を行った際に新しいファイル名が含まれるディレクトリに対して生"
2838 #: build/C/man7/inotify.7:264
2840 msgid "B<IN_OPEN> (*)"
2841 msgstr "B<IN_OPEN> (*)"
2844 #: build/C/man7/inotify.7:267
2845 msgid "File or directory was opened."
2846 msgstr "ファイルやディレクトリがオープンされた。"
2849 #: build/C/man7/inotify.7:270
2850 msgid "When monitoring a directory:"
2851 msgstr "ディレクトリを監視する場合:"
2854 #: build/C/man7/inotify.7:273
2856 "the events marked above with an asterisk (*) can occur both for the "
2857 "directory itself and for objects inside the directory; and"
2858 msgstr "上記でアスタリスク (*) が付いたイベントは、 ディレクトリ自身とディレクトリ内のオブジェクトのどちらに対しても発生する。"
2861 #: build/C/man7/inotify.7:276
2863 "the events marked with a plus sign (+) occur only for objects inside the "
2864 "directory (not for the directory itself)."
2865 msgstr "上記でプラス記号 (+) が付いたイベントは、 ディレクトリ内のオブジェクトに対してのみ発生する (ディレクトリ自身に対しては発生しない)。"
2868 #: build/C/man7/inotify.7:282
2870 "When events are generated for objects inside a watched directory, the "
2871 "I<name> field in the returned I<inotify_event> structure identifies the name "
2872 "of the file within the directory."
2873 msgstr "監視対象のディレクトリ内のオブジェクトに対してイベントが発生した場合、 I<inotify_event> 構造体で返される I<name> フィールドは、ディレクトリ内のファイル名を表す。"
2876 #: build/C/man7/inotify.7:290
2878 "The B<IN_ALL_EVENTS> macro is defined as a bit mask of all of the above "
2879 "events. This macro can be used as the I<mask> argument when calling "
2880 "B<inotify_add_watch>(2)."
2882 "B<IN_ALL_EVENTS> マクロは上記のイベント全てのマスクとして定義される。 このマ"
2883 "クロは B<inotify_add_watch>(2) を呼び出すときの I<mask> 引き数として使える。"
2886 #: build/C/man7/inotify.7:292
2887 msgid "Two additional convenience macros are defined:"
2888 msgstr "以下の 2 つの便利なマクロが定義されている。"
2891 #: build/C/man7/inotify.7:293
2897 #: build/C/man7/inotify.7:297
2898 msgid "Equates to B<IN_MOVED_FROM | IN_MOVED_TO>."
2899 msgstr "B<IN_MOVED_FROM | IN_MOVED_TO> と等価。"
2902 #: build/C/man7/inotify.7:297
2905 msgstr "B<IN_CLOSE>"
2908 #: build/C/man7/inotify.7:301
2909 msgid "Equates to B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE>."
2910 msgstr "B<IN_CLOSE_WRITE | IN_CLOSE_NOWRITE> と等価。"
2913 #: build/C/man7/inotify.7:307
2915 "The following further bits can be specified in I<mask> when calling "
2916 "B<inotify_add_watch>(2):"
2918 "その他にも以下のビットを B<inotify_add_watch>(2) を呼ぶときの I<mask> に指定"
2922 #: build/C/man7/inotify.7:308
2924 msgid "B<IN_DONT_FOLLOW> (since Linux 2.6.15)"
2925 msgstr "B<IN_DONT_FOLLOW> (Linux 2.6.15 以降)"
2928 #: build/C/man7/inotify.7:313
2929 msgid "Don't dereference I<pathname> if it is a symbolic link."
2931 "I<pathname> がシンボリックリンクである場合に辿らない。 (Linux 2.6.15 以降)"
2934 #: build/C/man7/inotify.7:313
2936 msgid "B<IN_EXCL_UNLINK> (since Linux 2.6.36)"
2937 msgstr "B<IN_EXCL_UNLINK> (Linux 2.6.36 以降)"
2939 #. commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6
2941 #: build/C/man7/inotify.7:329
2943 "By default, when watching events on the children of a directory, events are "
2944 "generated for children even after they have been unlinked from the "
2945 "directory. This can result in large numbers of uninteresting events for "
2946 "some applications (e.g., if watching I</tmp>, in which many applications "
2947 "create temporary files whose names are immediately unlinked). Specifying "
2948 "B<IN_EXCL_UNLINK> changes the default behavior, so that events are not "
2949 "generated for children after they have been unlinked from the watched "
2952 "デフォルトでは、あるディレクトリの子ファイルに関するイベントを監視 (watch) し"
2953 "た際、ディレクトリからその子ファイルが削除 (unlink) された場合であってもその"
2954 "子ファイルに対してイベントが生成される。このことは、アプリケーションによって"
2955 "はあまり興味のないイベントが大量に発生することにつながる (例えば、I</tmp> を"
2956 "監視している場合、たくさんのアプリケーションが、すぐにその名前が削除される一"
2957 "時ファイルをそのディレクトリに作成する)。 B<IN_EXCL_UNLINK> を指定するとこの"
2958 "デフォルトの動作を変更でき、監視対象のディレクトリから子ファイルが削除された"
2959 "後に子ファイルに関するイベントが生成されなくなる。"
2962 #: build/C/man7/inotify.7:329
2964 msgid "B<IN_MASK_ADD>"
2965 msgstr "B<IN_MASK_ADD>"
2968 #: build/C/man7/inotify.7:336
2970 "If a watch instance already exists for the filesystem object corresponding "
2971 "to I<pathname>, add (OR) the events in I<mask> to the watch mask (instead of "
2972 "replacing the mask)."
2973 msgstr "監視インスタンスが I<pathname> に対応するファイルシステムオブジェクトに対してすでに存在する場合に、 (マスクを置き換えるのではなく) 監視マスクに I<mask> で指定されたイベントを追加 (OR) する。"
2976 #: build/C/man7/inotify.7:336
2978 msgid "B<IN_ONESHOT>"
2979 msgstr "B<IN_ONESHOT>"
2982 #: build/C/man7/inotify.7:342
2984 "Monitor the filesystem object corresponding to I<pathname> for one event, "
2985 "then remove from watch list."
2986 msgstr "I<pathname> に対応するファイルシステムオブジェクトを 1 イベントについてだけ監視し、 イベントが発生したら監視対象リストから削除する。"
2989 #: build/C/man7/inotify.7:342
2991 msgid "B<IN_ONLYDIR> (since Linux 2.6.15)"
2992 msgstr "B<IN_ONLYDIR> (Linux 2.6.15 以降)"
2995 #: build/C/man7/inotify.7:349
2997 "Only watch I<pathname> if it is a directory. Using this flag provides an "
2998 "application with a race-free way of ensuring that the monitored object is a "
3000 msgstr "I<pathname> がディレクトリの場合のみ監視する。 このフラグを使うことで、アプリケーションは、競合状態を考慮せずに、監視するオブジェクトがディレクトリであることを保証することができるようになる。"
3003 #: build/C/man7/inotify.7:355
3005 "The following bits may be set in the I<mask> field returned by B<read>(2):"
3006 msgstr "以下のビットが B<read>(2) で返される I<mask> フィールドに設定される:"
3009 #: build/C/man7/inotify.7:356
3011 msgid "B<IN_IGNORED>"
3012 msgstr "B<IN_IGNORED>"
3015 #: build/C/man7/inotify.7:362
3017 "Watch was removed explicitly (B<inotify_rm_watch>(2)) or automatically "
3018 "(file was deleted, or filesystem was unmounted). See also BUGS."
3020 "監視対象が (B<inotify_rm_watch>(2) により) 明示的に 削除された。もしくは "
3021 "(ファイルの削除、またはファイル システムのアンマウントにより) 自動的に削除さ"
3025 #: build/C/man7/inotify.7:362
3028 msgstr "B<IN_ISDIR>"
3031 #: build/C/man7/inotify.7:365
3032 msgid "Subject of this event is a directory."
3033 msgstr "このイベントの対象がディレクトリである。"
3036 #: build/C/man7/inotify.7:365
3038 msgid "B<IN_Q_OVERFLOW>"
3039 msgstr "B<IN_Q_OVERFLOW>"
3042 #: build/C/man7/inotify.7:370
3043 msgid "Event queue overflowed (I<wd> is -1 for this event)."
3044 msgstr "イベントキューが溢れた (このイベントの場合、I<wd> は -1 である)。"
3047 #: build/C/man7/inotify.7:370
3049 msgid "B<IN_UNMOUNT>"
3050 msgstr "B<IN_UNMOUNT>"
3053 #: build/C/man7/inotify.7:376
3055 "Filesystem containing watched object was unmounted. In addition, an "
3056 "B<IN_IGNORED> event will subsequently be generated for the watch descriptor."
3058 "監視対象オブジェクトを含むファイルシステムがアンマウントされた。さらに、この"
3059 "監視対象ディスクリプターに対して B<IN_IGNORED> イベントが生成される。"
3062 #: build/C/man7/inotify.7:377
3068 #: build/C/man7/inotify.7:385
3070 "Suppose an application is watching the directory I<dir> and the file I<dir/"
3071 "myfile> for all events. The examples below show some events that will be "
3072 "generated for these two objects."
3074 "アプリケーションがディレクトリ I<dir> とファイル I<dir/myfile> のすべてのイベ"
3075 "ントを監視しているとする。 以下に、これらの 2 つのオブジェクトに対して生成さ"
3079 #: build/C/man7/inotify.7:386
3081 msgid "fd = open(\"dir/myfile\", O_RDWR);"
3082 msgstr "fd = open(\"dir/myfile\", O_RDWR);"
3085 #: build/C/man7/inotify.7:394
3086 msgid "Generates B<IN_OPEN> events for both I<dir> and I<dir/myfile>."
3088 "I<dir> と I<dir/myfile> の両方に対して B<IN_OPEN> イベントが生成される。"
3091 #: build/C/man7/inotify.7:394
3093 msgid "read(fd, buf, count);"
3094 msgstr "read(fd, buf, count);"
3097 #: build/C/man7/inotify.7:402
3098 msgid "Generates B<IN_ACCESS> events for both I<dir> and I<dir/myfile>."
3100 "I<dir> と I<dir/myfile> の両方に対して B<IN_ACCESS> イベントが生成される"
3103 #: build/C/man7/inotify.7:402
3105 msgid "write(fd, buf, count);"
3106 msgstr "write(fd, buf, count);"
3109 #: build/C/man7/inotify.7:410
3110 msgid "Generates B<IN_MODIFY> events for both I<dir> and I<dir/myfile>."
3112 "I<dir> と I<dir/myfile> の両方に対して B<IN_MODIFY> イベントが生成される"
3115 #: build/C/man7/inotify.7:410
3117 msgid "fchmod(fd, mode);"
3118 msgstr "fchmod(fd, mode);"
3121 #: build/C/man7/inotify.7:418
3122 msgid "Generates B<IN_ATTRIB> events for both I<dir> and I<dir/myfile>."
3124 "I<dir> と I<dir/myfile> の両方に対して B<IN_ATTRIB> イベントが生成される"
3127 #: build/C/man7/inotify.7:418
3133 #: build/C/man7/inotify.7:426
3134 msgid "Generates B<IN_CLOSE_WRITE> events for both I<dir> and I<dir/myfile>."
3136 "I<dir> と I<dir/myfile> の両方に対して B<IN_CLOSE_WRITE> イベントが生成される"
3139 #: build/C/man7/inotify.7:435
3141 "Suppose an application is watching the directories I<dir1> and I<dir2>, and "
3142 "the file I<dir1/myfile>. The following examples show some events that may "
3145 "アプリケーションがディレクトリ I<dir1> と I<dir2>、およびファイル I<dir1/"
3146 "myfile> を監視しているとする。 以下に生成されるイベントの例を示す。"
3149 #: build/C/man7/inotify.7:436
3151 msgid "link(\"dir1/myfile\", \"dir2/new\");"
3152 msgstr "link(\"dir1/myfile\", \"dir2/new\");"
3155 #: build/C/man7/inotify.7:446
3157 "Generates an B<IN_ATTRIB> event for I<myfile> and an B<IN_CREATE> event for "
3160 "I<myfile> に対して B<IN_ATTRIB> イベントが生成され、 I<dir2> に対して "
3161 "B<IN_CREATE> イベントが生成される。"
3164 #: build/C/man7/inotify.7:446
3166 msgid "rename(\"dir1/myfile\", \"dir2/myfile\");"
3167 msgstr "rename(\"dir1/myfile\", \"dir2/myfile\");"
3170 #: build/C/man7/inotify.7:467
3172 "Generates an B<IN_MOVED_FROM> event for I<dir1>, an B<IN_MOVED_TO> event for "
3173 "I<dir2>, and an B<IN_MOVE_SELF> event for I<myfile>. The B<IN_MOVED_FROM> "
3174 "and B<IN_MOVED_TO> events will have the same I<cookie> value."
3176 "I<dir1> に対してイベント B<IN_MOVED_FROM> が、 I<dir2> に対してイベント "
3177 "B<IN_MOVED_TO> が、 I<myfile> に対してイベント B<IN_MOVE_SELF> が生成される。"
3178 "この際 イベント B<IN_MOVED_FROM> と B<IN_MOVED_TO> は同じ I<cookie> 値を持"
3182 #: build/C/man7/inotify.7:481
3184 "Suppose that I<dir1/xx> and I<dir2/yy> are (the only) links to the same "
3185 "file, and an application is watching I<dir1>, I<dir2>, I<dir1/xx>, and "
3186 "I<dir2/yy>. Executing the following calls in the order given below will "
3187 "generate the following events:"
3189 "I<dir1/xx> と I<dir2/yy> は同じファイルを参照するリンクで (他のリンクはないも"
3190 "のとする)、 アプリケーションは I<dir1>, I<dir2>, I<dir1/xx>, I<dir2/yy> を監"
3191 "視しているものとする。 以下に示す順序で下記の呼び出しを実行すると、以下のイベ"
3195 #: build/C/man7/inotify.7:482
3197 msgid "unlink(\"dir2/yy\");"
3198 msgstr "unlink(\"dir2/yy\");"
3201 #: build/C/man7/inotify.7:493
3203 "Generates an B<IN_ATTRIB> event for I<xx> (because its link count changes) "
3204 "and an B<IN_DELETE> event for I<dir2>."
3206 "I<xx> に対して B<IN_ATTRIB> イベントが生成され (リンク数が変化したため)、 "
3207 "I<dir2> に対して B<IN_DELETE> イベントが生成される。"
3210 #: build/C/man7/inotify.7:493
3212 msgid "unlink(\"dir1/xx\");"
3213 msgstr "unlink(\"dir1/xx\");"
3216 #: build/C/man7/inotify.7:506
3218 "Generates B<IN_ATTRIB>, B<IN_DELETE_SELF>, and B<IN_IGNORED> events for "
3219 "I<xx>, and an B<IN_DELETE> event for I<dir1>."
3221 "I<xx> に対してイベント B<IN_ATTRIB>, B<IN_DELETE_SELF>, B<IN_IGNORED> が生成"
3222 "され、 I<dir1> に対して B<IN_DELETE> イベントが生成される。"
3225 #: build/C/man7/inotify.7:513
3227 "Suppose an application is watching the directory I<dir> and (the empty) "
3228 "directory I<dir/subdir>. The following examples show some events that may "
3231 "アプリケーションがディレクトリ I<dir> と (空の) ディレクトリ I<dir/subdir> を"
3232 "監視しているものとする。 以下に生成されるイベントの例を示す。"
3235 #: build/C/man7/inotify.7:514
3237 msgid "mkdir(\"dir/new\", mode);"
3238 msgstr "mkdir(\"dir/new\", mode);"
3241 #: build/C/man7/inotify.7:520
3242 msgid "Generates an B<IN_CREATE | IN_ISDIR> event for I<dir>."
3243 msgstr "I<dir> に対して B<IN_CREATE | IN_ISDIR> イベントが生成される。"
3246 #: build/C/man7/inotify.7:520
3248 msgid "rmdir(\"dir/subdir\");"
3249 msgstr "rmdir(\"dir/subdir\");"
3252 #: build/C/man7/inotify.7:532
3254 "Generates B<IN_DELETE_SELF> and B<IN_IGNORED> events for I<subdir>, and an "
3255 "B<IN_DELETE | IN_ISDIR> event for I<dir>."
3257 "I<subdir> に対してイベント B<IN_DELETE_SELF> と B<IN_IGNORED> が生成され、 "
3258 "I<dir> に対して B<IN_DELETE | IN_ISDIR> イベントが生成される。"
3261 #: build/C/man7/inotify.7:533
3263 msgid "/proc interfaces"
3264 msgstr "/proc インターフェース"
3267 #: build/C/man7/inotify.7:536
3269 "The following interfaces can be used to limit the amount of kernel memory "
3270 "consumed by inotify:"
3272 "以下のインターフェースは、inotify で消費される カーネルメモリの総量を制限する"
3276 #: build/C/man7/inotify.7:536
3278 msgid "I</proc/sys/fs/inotify/max_queued_events>"
3279 msgstr "I</proc/sys/fs/inotify/max_queued_events>"
3282 #: build/C/man7/inotify.7:545
3284 "The value in this file is used when an application calls B<inotify_init>(2) "
3285 "to set an upper limit on the number of events that can be queued to the "
3286 "corresponding inotify instance. Events in excess of this limit are dropped, "
3287 "but an B<IN_Q_OVERFLOW> event is always generated."
3289 "このファイルの値は、アプリケーションが B<inotify_init>(2) を呼び出すときに使"
3290 "用され、対応する inotify インスタンスについて キューに入れられるイベントの数"
3291 "の上限を設定する。 この制限を超えたイベントは破棄されるが、 B<IN_Q_OVERFLOW> "
3295 #: build/C/man7/inotify.7:545
3297 msgid "I</proc/sys/fs/inotify/max_user_instances>"
3298 msgstr "I</proc/sys/fs/inotify/max_user_instances>"
3301 #: build/C/man7/inotify.7:549
3303 "This specifies an upper limit on the number of inotify instances that can be "
3304 "created per real user ID."
3306 "1 つの実ユーザ ID に対して生成できる inotify インスタンスの数の上限を指定す"
3310 #: build/C/man7/inotify.7:549
3312 msgid "I</proc/sys/fs/inotify/max_user_watches>"
3313 msgstr "I</proc/sys/fs/inotify/max_user_watches>"
3316 #: build/C/man7/inotify.7:553
3318 "This specifies an upper limit on the number of watches that can be created "
3320 msgstr "作成可能な監視対象の数の実 UID 単位の上限を指定する。"
3323 #: build/C/man7/inotify.7:561
3325 "Inotify was merged into the 2.6.13 Linux kernel. The required library "
3326 "interfaces were added to glibc in version 2.4. (B<IN_DONT_FOLLOW>, "
3327 "B<IN_MASK_ADD>, and B<IN_ONLYDIR> were added in glibc version 2.5.)"
3329 "inotify は 2.6.13 の Linux カーネルに組込まれた。 これに必要なライブラリのイ"
3330 "ンターフェースは、 glibc のバージョン 2.4 に追加された (B<IN_DONT_FOLLOW>, "
3331 "B<IN_MASK_ADD>, B<IN_ONLYDIR> は glibc バージョン 2.5 で追加された)。"
3334 #: build/C/man7/inotify.7:563
3335 msgid "The inotify API is Linux-specific."
3336 msgstr "inotify API は Linux 独自のものである。"
3339 #: build/C/man7/inotify.7:570
3341 "Inotify file descriptors can be monitored using B<select>(2), B<poll>(2), "
3342 "and B<epoll>(7). When an event is available, the file descriptor indicates "
3345 "inotify ファイルディスクリプターは B<select>(2), B<poll>(2), B<epoll>(7) を"
3346 "使って監視できる。 イベントがある場合、ファイルディスクリプターは読み込み可能と"
3350 #: build/C/man7/inotify.7:599
3352 "Since Linux 2.6.25, signal-driven I/O notification is available for inotify "
3353 "file descriptors; see the discussion of B<F_SETFL> (for setting the "
3354 "B<O_ASYNC> flag), B<F_SETOWN>, and B<F_SETSIG> in B<fcntl>(2). The "
3355 "I<siginfo_t> structure (described in B<sigaction>(2)) that is passed to the "
3356 "signal handler has the following fields set: I<si_fd> is set to the inotify "
3357 "file descriptor number; I<si_signo> is set to the signal number; I<si_code> "
3358 "is set to B<POLL_IN>; and B<POLLIN> is set in I<si_band>."
3360 "Linux 2.6.25 以降では、シグナル駆動 (signal-driven) I/O の通知が inotify ファ"
3361 "イルディスクリプターについて利用可能である。 B<fcntl>(2) に書かれている "
3362 "(B<O_ASYNC> フラグを設定するための) B<F_SETFL>, B<F_SETOWN>, B<F_SETSIG> の"
3363 "議論を参照のこと。 シグナルハンドラに渡される I<siginfo_t> 構造体は、以下の"
3364 "フィールドが設定される (I<siginfo_t> は B<sigaction>(2) で説明されている)。 "
3365 "I<si_fd> には inotify ファイルディスクリプター番号が、 I<si_signo> にはシグナル"
3366 "番号が、 I<si_code> には B<POLL_IN> が、 I<si_band> には B<POLLIN> が設定され"
3370 #: build/C/man7/inotify.7:612
3372 "If successive output inotify events produced on the inotify file descriptor "
3373 "are identical (same I<wd>, I<mask>, I<cookie>, and I<name>), then they are "
3374 "coalesced into a single event if the older event has not yet been read (but "
3375 "see BUGS). This reduces the amount of kernel memory required for the event "
3376 "queue, but also means that an application can't use inotify to reliably "
3377 "count file events."
3379 "inotify ファイルディスクリプターに対して 連続して生成される出力 inotify イベン"
3380 "トが同一の場合 (I<wd>, I<mask>, I<cookie>, I<name> が等しい場合)、 前のイベン"
3381 "トがまだ読み込まれていなければ、 連続するイベントが 1 つのイベントにまとめら"
3382 "れる (ただし「バグ」の節も参照のこと)。 これによりイベントキューに必要なカー"
3383 "ネルメモリ量が減るが、 これはまたアプリケーションがファイルイベント数を信頼性"
3384 "を持って数えるのに inotify を使用できないということでもある。"
3387 #: build/C/man7/inotify.7:618
3389 "The events returned by reading from an inotify file descriptor form an "
3390 "ordered queue. Thus, for example, it is guaranteed that when renaming from "
3391 "one directory to another, events will be produced in the correct order on "
3392 "the inotify file descriptor."
3394 "inotify ファイルディスクリプターの読み込みで返されるイベントは、 順序付けられた"
3395 "キューになる。 従って、たとえば、あるディレクトリの名前を別の名前に変更した場"
3396 "合、 inotify ファイルディスクリプターについての正しい順番で イベントが生成され"
3400 #: build/C/man7/inotify.7:624
3402 "The B<FIONREAD> B<ioctl>(2) returns the number of bytes available to read "
3403 "from an inotify file descriptor."
3405 "B<FIONREAD> B<ioctl>(2) は inotify ファイルディスクリプターから何バイト読み込"
3409 #: build/C/man7/inotify.7:631
3411 "The inotify API provides no information about the user or process that "
3412 "triggered the inotify event. In particular, there is no easy way for a "
3413 "process that is monitoring events via inotify to distinguish events that it "
3414 "triggers itself from those that are triggered by other processes."
3416 "inotify API では、inotify イベントが発生するきっかけとなったユーザやプロセス"
3417 "に関する情報は提供されない。とりわけ、inotify 経由でイベントを監視しているプ"
3418 "ロセスが、自分自身がきっかけとなったイベントと他のプロセスがきっかけとなった"
3419 "イベントを区別する簡単な手段はない。"
3422 #: build/C/man7/inotify.7:644
3424 "Inotify reports only events that a user-space program triggers through the "
3425 "filesystem API. As a result, it does not catch remote events that occur on "
3426 "network filesystems. (Applications must fall back to polling the filesystem "
3427 "to catch such events.) Furthermore, various pseudo-filesystems such as I</"
3428 "proc>, I</sys>, and I</dev/pts> are not monitorable with inotify."
3430 "inotify は、ファイルシステム API 経由でユーザー空間プログラムがきっかけとなっ"
3431 "たイベントだけを報告する。 結果として、 inotify はネットワークファイルシステ"
3432 "ムで発生したリモートのイベントを捉えることはできない (このようなイベントを捉"
3433 "えるにはアプリケーションはファイルシステムをポーリングする必要がある)。 さら"
3434 "に、 I</proc>, I</sys>, I</dev/pts> といったいくつかの疑似ファイルシステムは "
3435 "inotify で監視することができない。"
3438 #: build/C/man7/inotify.7:651
3440 "The inotify API does not report file accesses and modifications that may "
3441 "occur because of B<mmap>(2), B<msync>(2), and B<munmap>(2)."
3443 "inotify API は B<mmap>(2), B<msync>(2), B<munmap>(2) により起こったファイルの"
3447 #: build/C/man7/inotify.7:655
3449 "The inotify API identifies affected files by filename. However, by the time "
3450 "an application processes an inotify event, the filename may already have "
3451 "been deleted or renamed."
3453 "inotify API では影響が受けるファイルをファイル名で特定する。\n"
3454 "しかしながら、アプリケーションが inotify イベントを処理する時点では、\n"
3455 "そのファイル名がすでに削除されたり変更されたりしている可能性がある。"
3458 #: build/C/man7/inotify.7:660
3460 "The inotify API identifies events via watch descriptors. It is the "
3461 "application's responsibility to cache a mapping (if one is needed) between "
3462 "watch descriptors and pathnames. Be aware that directory renamings may "
3463 "affect multiple cached pathnames."
3465 "inotify API では監視対象ディスクリプターを通してイベントが区別される。 (必要で"
3466 "あれば) 監視対象ディスクリプターとパス名のマッピングをキャッシュしておくのはア"
3467 "プリケーションの役目である。 ディレクトリの名前変更の場合、キャッシュしている"
3468 "複数のパス名に影響がある点に注意すること。"
3471 #: build/C/man7/inotify.7:665
3473 "Inotify monitoring of directories is not recursive: to monitor "
3474 "subdirectories under a directory, additional watches must be created. This "
3475 "can take a significant amount time for large directory trees."
3477 "inotify によるディレクトリの監視は再帰的に行われない: あるディレクトリ以下"
3479 "サブディレクトリを監視する場合、 監視対象を追加で作成しなければならない。\n"
3480 "大きなディレクトリツリーの場合には、この作業にかなり時間がかかることがある。"
3483 #: build/C/man7/inotify.7:674
3485 "If monitoring an entire directory subtree, and a new subdirectory is created "
3486 "in that tree or an existing directory is renamed into that tree, be aware "
3487 "that by the time you create a watch for the new subdirectory, new files (and "
3488 "subdirectories) may already exist inside the subdirectory. Therefore, you "
3489 "may want to scan the contents of the subdirectory immediately after adding "
3490 "the watch (and, if desired, recursively add watches for any subdirectories "
3491 "that it contains)."
3493 "ディレクトリツリー全体を監視していて、 そのツリー内に新しいサブディレクトリが"
3494 "作成されるか、 既存のディレクトリが名前が変更されそのツリー内に移動した場"
3495 "合、 新しいサブディレクトリに対する watch を作成するまでに、 新しいファイル "
3496 "(やサブディレクトリ) がそのサブディレクトリ内にすでに作成されている場合がある"
3497 "点に注意すること。 したがって、watch を追加した直後にサブディレクトリの内容を"
3498 "スキャンしたいと思う場合もあるだろう (必要ならそのサブディレクトリ内のサブ"
3499 "ディレクトリに対する watch も再帰的に追加することもあるだろう)。"
3502 #: build/C/man7/inotify.7:686
3504 "Note that the event queue can overflow. In this case, events are lost. "
3505 "Robust applications should handle the possibility of lost events "
3506 "gracefully. For example, it may be necessary to rebuild part or all of the "
3507 "application cache. (One simple, but possibly expensive, approach is to "
3508 "close the inotify file descriptor, empty the cache, create a new inotify "
3509 "file descriptor, and then re-create watches and cache entries for the "
3510 "objects to be monitored.)"
3512 "イベントキューはオーバーフローする場合があることに注意すること。 この場合、イ"
3513 "ベントは失なわれる。 ロバスト性が求められるアプリケーションでは、 イベントが"
3514 "失なわれる可能性も含めて適切に処理を行うべきである。 例えば、アプリケーション"
3515 "内のキャッシュの一部分または全てを再構築する必要があるかもしれない。 (単純だ"
3516 "が、おそらくコストがかかる方法は、 inotify ファイルディスクリプターをクローズ"
3517 "し、 キャッシュを空にし、 新しい inotify ファイルディスクリプターを作成し、 監"
3518 "視しているオブジェクトの監視対象ディスクリプターとキャッシュエントリーの再作成"
3522 #: build/C/man7/inotify.7:686
3524 msgid "Dealing with rename() events"
3525 msgstr "rename() イベントの取り扱い"
3528 #: build/C/man7/inotify.7:695
3530 "As noted above, the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair that is "
3531 "generated by B<rename>(2) can be matched up via their shared cookie value. "
3532 "However, the task of matching has some challenges."
3534 "上述の通り、 B<rename>(2) により生成される B<IN_MOVED_FROM> と "
3535 "B<IN_MOVED_TO> イベントの組は、共有される cookie 値によって対応を取ることがで"
3536 "きる。 しかし、対応を取る場合にはいくつか難しい点がある。"
3539 #: build/C/man7/inotify.7:712
3541 "These two events are usually consecutive in the event stream available when "
3542 "reading from the inotify file descriptor. However, this is not guaranteed. "
3543 "If multiple processes are triggering events for monitored objects, then (on "
3544 "rare occasions) an arbitrary number of other events may appear between the "
3545 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events. Furthermore, it is not "
3546 "guaranteed that the event pair is atomically inserted into the queue: there "
3547 "may be a brief interval where the B<IN_MOVED_FROM> has appeared, but the "
3548 "B<IN_MOVED_TO> has not."
3549 msgstr "これらの 2 つのイベントは、 inotify ファイルディスクリプターから読み出しを行った場合に、通常はイベントストリーム内で連続している。 しかしながら、連続していることは保証されていない。 複数のプロセスが監視対象オブジェクトでイベントを発生させた場合、 (めったに起こらないことだが) イベント B<IN_MOVED_FROM> と B<IN_MOVED_TO> の間に任意の数の他のイベントがはさまる可能性がある。 さらに、対となるイベントがアトミックにキューに挿入されることも保証されていない。 B<IN_MOVED_FROM> が現れたが B<IN_MOVED_TO> は現れていないという短い期間がありえるということだ。"
3552 #: build/C/man7/inotify.7:737
3554 "Matching up the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair generated by "
3555 "B<rename>(2) is thus inherently racy. (Don't forget that if an object is "
3556 "renamed outside of a monitored directory, there may not even be an "
3557 "B<IN_MOVED_TO> event.) Heuristic approaches (e.g., assume the events are "
3558 "always consecutive) can be used to ensure a match in most cases, but will "
3559 "inevitably miss some cases, causing the application to perceive the "
3560 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events as being unrelated. If watch "
3561 "descriptors are destroyed and re-created as a result, then those watch "
3562 "descriptors will be inconsistent with the watch descriptors in any pending "
3563 "events. (Re-creating the inotify file descriptor and rebuilding the cache "
3564 "may be useful to deal with this scenario.)"
3566 "したがって、 B<rename>(2) により生成された B<IN_MOVED_FROM> と "
3567 "B<IN_MOVED_TO> のイベントの組の対応を取るのは本質的に難しいことである (監視対"
3568 "象のディレクトリの外へオブジェクトの rename が行われた場合には "
3569 "B<IN_MOVED_TO> イベントは存在しさえしないことを忘れてはならない)。 (イベント"
3570 "は常に連続しているとの仮定を置くといった) 発見的な方法を使うと、ほとんどの場"
3571 "合でイベントの組をうまく見つけることができるが、 いくつかの場合に見逃すことが"
3572 "避けられず、 アプリケーションが B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントが"
3573 "無関係だとみなしてしまう可能性がある。 結果的に、監視対象ディスクリプターが破棄"
3574 "され再作成された場合、これらの監視対象ディスクリプターは、処理待ちイベントの監"
3575 "視対象ディスクリプターと一貫性のないものになってしまう (inotify ファイルディス"
3576 "クリプタの再作成とキャッシュの再構成はこの状況に対処するのに有用な方法なのだ"
3580 #: build/C/man7/inotify.7:754
3582 "Applications should also allow for the possibility that the B<IN_MOVED_FROM> "
3583 "event was the last event that could fit in the buffer returned by the "
3584 "current call to B<read>(2), and the accompanying B<IN_MOVED_TO> event might "
3585 "be fetched only on the next B<read>(2), which should be done with a (small) "
3586 "timeout to allow for the fact that insertion of the B<IN_MOVED_FROM>-"
3587 "B<IN_MOVED_TO> event pair is not atomic, and also the possibility that there "
3588 "may not be any B<IN_MOVED_TO> event."
3589 msgstr "また、アプリケーションは、 B<IN_MOVED_FROM> イベントが今行った B<read>(2) の呼び出しで返されたバッファーのちょうど一番最後のイベントで、 B<IN_MOVED_TO> イベントは次の B<read>(2) を行わないと取得できない可能性も考慮に入れる必要がある。 2 つ目の B<read>(2) は (短い) タイムアウトで行うべきである。 これは、 B<IN_MOVED_FROM>-B<IN_MOVED_TO> のイベントペアのキューへの挿入はアトミックではなく、 また B<IN_MOVED_TO> イベントが全く発生しない可能性もあるという事実を考慮に入れておく必要があるからである。"
3592 #: build/C/man7/inotify.7:758
3594 "As of kernel 3.17, calling B<fallocate>(2) does not create any inotify "
3596 msgstr "カーネル 3.17 時点では、 B<fallocate>(2) の呼び出しでは inotify イベントが生成されない。"
3598 #. FIXME . kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321
3599 #. implies that unmount events were buggy 2.6.11 to 2.6.36
3601 #: build/C/man7/inotify.7:766
3602 msgid "In kernels before 2.6.16, the B<IN_ONESHOT> I<mask> flag does not work."
3603 msgstr "2.6.16 以前のカーネルでは B<IN_ONESHOT> I<mask> フラグが働かない。"
3606 #: build/C/man7/inotify.7:776
3608 "As originally designed and implemented, the B<IN_ONESHOT> flag did not cause "
3609 "an B<IN_IGNORED> event to be generated when the watch was dropped after one "
3610 "event. However, as an unintended effect of other changes, since Linux "
3611 "2.6.36, an B<IN_IGNORED> event is generated in this case."
3613 "元々は設計/実装時の意図通り、 イベントが一つ発生し watch が削除された際に "
3614 "B<IN_ONESHOT> フラグでは B<IN_IGNORED> イベントが発生しなかった。 しかし、 別"
3615 "の変更での意図していなかった影響により、 Linux 2.6.36 以降では、 この場合に "
3616 "B<IN_IGNORED> イベントが生成される。"
3618 #. commit 1c17d18e3775485bf1e0ce79575eb637a94494a2
3620 #: build/C/man7/inotify.7:785
3622 "Before kernel 2.6.25, the kernel code that was intended to coalesce "
3623 "successive identical events (i.e., the two most recent events could "
3624 "potentially be coalesced if the older had not yet been read) instead "
3625 "checked if the most recent event could be coalesced with the I<oldest> "
3628 "カーネル 2.6.25 より前では、 連続する同一のイベントを一つにまとめることを意図"
3629 "したコード (古い方のイベントがまだ読み込まれていない場合に、 最新の 2 つのイ"
3630 "ベントを一つにまとめられる可能性がある) が、 最新のイベントが「最も古い」読み"
3631 "込まれていないイベントとまとめられるか をチェックするようになっていた。"
3633 #. FIXME . https://bugzilla.kernel.org/show_bug.cgi?id=77111
3635 #: build/C/man7/inotify.7:815
3637 "When a watch descriptor is removed by calling B<inotify_rm_watch>(2) (or "
3638 "because a watch file is deleted or the filesystem that contains it is "
3639 "unmounted), any pending unread events for that watch descriptor remain "
3640 "available to read. As watch descriptors are subsequently allocated with "
3641 "B<inotify_add_watch>(2), the kernel cycles through the range of possible "
3642 "watch descriptors (0 to B<INT_MAX>) incrementally. When allocating a free "
3643 "watch descriptor, no check is made to see whether that watch descriptor "
3644 "number has any pending unread events in the inotify queue. Thus, it can "
3645 "happen that a watch descriptor is reallocated even when pending unread "
3646 "events exist for a previous incarnation of that watch descriptor number, "
3647 "with the result that the application might then read those events and "
3648 "interpret them as belonging to the file associated with the newly recycled "
3649 "watch descriptor. In practice, the likelihood of hitting this bug may be "
3650 "extremely low, since it requires that an application cycle through "
3651 "B<INT_MAX> watch descriptors, release a watch descriptor while leaving "
3652 "unread events for that watch descriptor in the queue, and then recycle that "
3653 "watch descriptor. For this reason, and because there have been no reports "
3654 "of the bug occurring in real-world applications, as of Linux 3.15, no kernel "
3655 "changes have yet been made to eliminate this possible bug."
3656 msgstr "B<inotify_rm_watch>(2) の呼び出しにより監視対象ディスクリプターが削除された場合 (なお、監視対象ファイルの削除や監視対象ファイルが含まれるファイルシステムのアンマウントによっても監視対象ディスクリプターは削除される)、 この監視対象ディスクリプター関連の処理待ちの未読み出しイベントは、 読み出し可能なままとなる。 監視対象ディスクリプターは B<inotify_add_watch>(2) によって後で割り当てられるため、 カーネルは利用可能な監視対象ディスクリプターの範囲 (0 から B<INT_MAX>) から昇順にサイクリックに割り当てを行う。未使用の監視対象ディスクリプターを割り当てる際、 その監視対象ディスクリプター番号に inotify キューで処理待ちの未読み出しイベントがあるかの確認は行われない。 したがって、監視対象ディスクリプターが再割り当てされた際に、 その監視対象ディスクリプターの一つ前の使用時に発生した処理待ちの未読み出しイベントが存在するということが起こりうる。 その結果、アプリケーションはこれらのイベントを読み出す可能性があり、 これらのイベントが新しく再利用された監視対象ディスクリプターに関連付けられたファイルに属するものかを解釈する必要が出て来る。 実際のところ、このバグを踏む可能性は極めて低い。 それは、このバグを踏むためには、アプリケーションが B<INT_MAX> 個の監視対象ディスクリプターが一周させて、 キューに未読み出しイベントが残っている監視対象ディスクリプターを解放し、 その監視対象ディスクリプターを再利用する必要があるからである。 この理由と、実世界のアプリケーションで発生したというバグ報告がないことから、 Linux 3.15 時点では、この計算上は起こりうるバグを取り除くためのカーネルの変更は行われていない。"
3659 #: build/C/man7/inotify.7:823
3661 "The following program demonstrates the usage of the inotify API. It marks "
3662 "the directories passed as a command-line arguments and waits for events of "
3663 "type B<IN_OPEN>, B<IN_CLOSE_NOWRITE> and B<IN_CLOSE_WRITE>."
3665 "以下のプログラムは inotify API の使用例を示したものである。 コマンドライン引"
3666 "き数で渡されたディレクトリに印を付け、 タイプが B<IN_OPEN>, "
3667 "B<IN_CLOSE_NOWRITE> B<IN_CLOSE_WRITE> のイベントを待つ。"
3670 #: build/C/man7/inotify.7:838
3672 "The following output was recorded while editing the file I</home/user/temp/"
3673 "foo> and listing directory I</tmp>. Before the file and the directory were "
3674 "opened, B<IN_OPEN> events occurred. After the file was closed, an "
3675 "B<IN_CLOSE_WRITE> event occurred. After the directory was closed, an "
3676 "B<IN_CLOSE_NOWRITE> event occurred. Execution of the program ended when the "
3677 "user pressed the ENTER key."
3679 "以下は、 ファイル I</home/user/temp/foo> を編集し、 ディレクトリ I</tmp> の一"
3680 "覧表示を行った場合の出力である。 対象のファイルとディレクトリがオープンされる"
3681 "前に、イベント B<IN_OPEN> が発生している。 対象ファイルがクローズされた後にイ"
3682 "ベント B<IN_CLOSE_WRITE> が発生している。 対象ディレクトリがクローズされた後"
3683 "にイベント B<IN_CLOSE_NOWRITE> が発生している。 ユーザーが ENTER キーを押する"
3687 #: build/C/man7/inotify.7:848
3690 "$ B<./a.out /tmp /home/user/temp>\n"
3691 "Press enter key to terminate.\n"
3692 "Listening for events.\n"
3693 "IN_OPEN: /home/user/temp/foo [file]\n"
3694 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
3695 "IN_OPEN: /tmp/ [directory]\n"
3696 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
3698 "$ B<./a.out /tmp /home/user/temp>\n"
3699 "Press enter key to terminate.\n"
3700 "Listening for events.\n"
3701 "IN_OPEN: /home/user/temp/foo [file]\n"
3702 "IN_CLOSE_WRITE: /home/user/temp/foo [file]\n"
3703 "IN_OPEN: /tmp/ [directory]\n"
3704 "IN_CLOSE_NOWRITE: /tmp/ [directory]\n"
3707 #: build/C/man7/inotify.7:860
3710 "#include E<lt>errno.hE<gt>\n"
3711 "#include E<lt>poll.hE<gt>\n"
3712 "#include E<lt>stdio.hE<gt>\n"
3713 "#include E<lt>stdlib.hE<gt>\n"
3714 "#include E<lt>sys/inotify.hE<gt>\n"
3715 "#include E<lt>unistd.hE<gt>\n"
3717 "#include E<lt>errno.hE<gt>\n"
3718 "#include E<lt>poll.hE<gt>\n"
3719 "#include E<lt>stdio.hE<gt>\n"
3720 "#include E<lt>stdlib.hE<gt>\n"
3721 "#include E<lt>sys/inotify.hE<gt>\n"
3722 "#include E<lt>unistd.hE<gt>\n"
3725 #: build/C/man7/inotify.7:866
3728 "/* Read all available inotify events from the file descriptor 'fd'.\n"
3729 " wd is the table of watch descriptors for the directories in argv.\n"
3730 " argc is the length of wd and argv.\n"
3731 " argv is the list of watched directories.\n"
3732 " Entry 0 of wd and argv is unused. */\n"
3734 "/* Read all available inotify events from the file descriptor 'fd'.\n"
3735 " wd is the table of watch descriptors for the directories in argv.\n"
3736 " argc is the length of wd and argv.\n"
3737 " argv is the list of watched directories.\n"
3738 " Entry 0 of wd and argv is unused. */\n"
3741 #: build/C/man7/inotify.7:875
3745 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
3747 " /* Some systems cannot read integer variables if they are not\n"
3748 " properly aligned. On other systems, incorrect alignment may\n"
3749 " decrease performance. Hence, the buffer used for reading from\n"
3750 " the inotify file descriptor should have the same alignment as\n"
3751 " struct inotify_event. */\n"
3754 "handle_events(int fd, int *wd, int argc, char* argv[])\n"
3756 " /* Some systems cannot read integer variables if they are not\n"
3757 " properly aligned. On other systems, incorrect alignment may\n"
3758 " decrease performance. Hence, the buffer used for reading from\n"
3759 " the inotify file descriptor should have the same alignment as\n"
3760 " struct inotify_event. */\n"
3763 #: build/C/man7/inotify.7:882
3767 " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
3768 " const struct inotify_event *event;\n"
3774 " __attribute__ ((aligned(__alignof__(struct inotify_event))));\n"
3775 " const struct inotify_event *event;\n"
3781 #: build/C/man7/inotify.7:884
3783 msgid " /* Loop while events can be read from inotify file descriptor. */\n"
3784 msgstr " /* Loop while events can be read from inotify file descriptor. */\n"
3787 #: build/C/man7/inotify.7:886
3789 msgid " for (;;) {\n"
3790 msgstr " for (;;) {\n"
3793 #: build/C/man7/inotify.7:888
3795 msgid " /* Read some events. */\n"
3796 msgstr " /* Read some events. */\n"
3799 #: build/C/man7/inotify.7:894
3802 " len = read(fd, buf, sizeof buf);\n"
3803 " if (len == -1 && errno != EAGAIN) {\n"
3804 " perror(\"read\");\n"
3805 " exit(EXIT_FAILURE);\n"
3808 " len = read(fd, buf, sizeof buf);\n"
3809 " if (len == -1 && errno != EAGAIN) {\n"
3810 " perror(\"read\");\n"
3811 " exit(EXIT_FAILURE);\n"
3815 #: build/C/man7/inotify.7:898
3818 " /* If the nonblocking read() found no events to read, then\n"
3819 " it returns -1 with errno set to EAGAIN. In that case,\n"
3820 " we exit the loop. */\n"
3822 " /* If the nonblocking read() found no events to read, then\n"
3823 " it returns -1 with errno set to EAGAIN. In that case,\n"
3824 " we exit the loop. */\n"
3827 #: build/C/man7/inotify.7:906
3830 " for (ptr = buf; ptr E<lt> buf + len;\n"
3831 " ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
3833 " for (ptr = buf; ptr E<lt> buf + len;\n"
3834 " ptr += sizeof(struct inotify_event) + event-E<gt>len) {\n"
3837 #: build/C/man7/inotify.7:908
3839 msgid " event = (const struct inotify_event *) ptr;\n"
3840 msgstr " event = (const struct inotify_event *) ptr;\n"
3843 #: build/C/man7/inotify.7:910
3845 msgid " /* Print event type */\n"
3846 msgstr " /* Print event type */\n"
3849 #: build/C/man7/inotify.7:917
3852 " if (event-E<gt>mask & IN_OPEN)\n"
3853 " printf(\"IN_OPEN: \");\n"
3854 " if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
3855 " printf(\"IN_CLOSE_NOWRITE: \");\n"
3856 " if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
3857 " printf(\"IN_CLOSE_WRITE: \");\n"
3859 " if (event-E<gt>mask & IN_OPEN)\n"
3860 " printf(\"IN_OPEN: \");\n"
3861 " if (event-E<gt>mask & IN_CLOSE_NOWRITE)\n"
3862 " printf(\"IN_CLOSE_NOWRITE: \");\n"
3863 " if (event-E<gt>mask & IN_CLOSE_WRITE)\n"
3864 " printf(\"IN_CLOSE_WRITE: \");\n"
3867 #: build/C/man7/inotify.7:919
3869 msgid " /* Print the name of the watched directory */\n"
3870 msgstr " /* Print the name of the watched directory */\n"
3873 #: build/C/man7/inotify.7:926
3876 " for (i = 1; i E<lt> argc; ++i) {\n"
3877 " if (wd[i] == event-E<gt>wd) {\n"
3878 " printf(\"%s/\", argv[i]);\n"
3883 " for (i = 1; i E<lt> argc; ++i) {\n"
3884 " if (wd[i] == event-E<gt>wd) {\n"
3885 " printf(\"%s/\", argv[i]);\n"
3891 #: build/C/man7/inotify.7:928
3893 msgid " /* Print the name of the file */\n"
3894 msgstr " /* Print the name of the file */\n"
3897 #: build/C/man7/inotify.7:931
3900 " if (event-E<gt>len)\n"
3901 " printf(\"%s\", event-E<gt>name);\n"
3903 " if (event-E<gt>len)\n"
3904 " printf(\"%s\", event-E<gt>name);\n"
3907 #: build/C/man7/inotify.7:933
3909 msgid " /* Print type of filesystem object */\n"
3910 msgstr " /* Print type of filesystem object */\n"
3913 #: build/C/man7/inotify.7:941
3916 " if (event-E<gt>mask & IN_ISDIR)\n"
3917 " printf(\" [directory]\\en\");\n"
3919 " printf(\" [file]\\en\");\n"
3924 " if (event-E<gt>mask & IN_ISDIR)\n"
3925 " printf(\" [directory]\\en\");\n"
3927 " printf(\" [file]\\en\");\n"
3933 #: build/C/man7/inotify.7:950
3937 "main(int argc, char* argv[])\n"
3940 " int fd, i, poll_num;\n"
3943 " struct pollfd fds[2];\n"
3946 "main(int argc, char* argv[])\n"
3949 " int fd, i, poll_num;\n"
3952 " struct pollfd fds[2];\n"
3955 #: build/C/man7/inotify.7:955
3958 " if (argc E<lt> 2) {\n"
3959 " printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
3960 " exit(EXIT_FAILURE);\n"
3963 " if (argc E<lt> 2) {\n"
3964 " printf(\"Usage: %s PATH [PATH ...]\\en\", argv[0]);\n"
3965 " exit(EXIT_FAILURE);\n"
3969 #: build/C/man7/inotify.7:957
3971 msgid " printf(\"Press ENTER key to terminate.\\en\");\n"
3972 msgstr " printf(\"Press ENTER key to terminate.\\en\");\n"
3975 #: build/C/man7/inotify.7:959
3977 msgid " /* Create the file descriptor for accessing the inotify API */\n"
3978 msgstr " /* Create the file descriptor for accessing the inotify API */\n"
3981 #: build/C/man7/inotify.7:965
3984 " fd = inotify_init1(IN_NONBLOCK);\n"
3985 " if (fd == -1) {\n"
3986 " perror(\"inotify_init1\");\n"
3987 " exit(EXIT_FAILURE);\n"
3990 " fd = inotify_init1(IN_NONBLOCK);\n"
3991 " if (fd == -1) {\n"
3992 " perror(\"inotify_init1\");\n"
3993 " exit(EXIT_FAILURE);\n"
3997 #: build/C/man7/inotify.7:967
3999 msgid " /* Allocate memory for watch descriptors */\n"
4000 msgstr " /* Allocate memory for watch descriptors */\n"
4003 #: build/C/man7/inotify.7:973
4006 " wd = calloc(argc, sizeof(int));\n"
4007 " if (wd == NULL) {\n"
4008 " perror(\"calloc\");\n"
4009 " exit(EXIT_FAILURE);\n"
4012 " wd = calloc(argc, sizeof(int));\n"
4013 " if (wd == NULL) {\n"
4014 " perror(\"calloc\");\n"
4015 " exit(EXIT_FAILURE);\n"
4019 #: build/C/man7/inotify.7:977
4022 " /* Mark directories for events\n"
4023 " - file was opened\n"
4024 " - file was closed */\n"
4026 " /* Mark directories for events\n"
4027 " - file was opened\n"
4028 " - file was closed */\n"
4031 #: build/C/man7/inotify.7:987
4034 " for (i = 1; i E<lt> argc; i++) {\n"
4035 " wd[i] = inotify_add_watch(fd, argv[i],\n"
4036 " IN_OPEN | IN_CLOSE);\n"
4037 " if (wd[i] == -1) {\n"
4038 " fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4039 " perror(\"inotify_add_watch\");\n"
4040 " exit(EXIT_FAILURE);\n"
4044 " for (i = 1; i E<lt> argc; i++) {\n"
4045 " wd[i] = inotify_add_watch(fd, argv[i],\n"
4046 " IN_OPEN | IN_CLOSE);\n"
4047 " if (wd[i] == -1) {\n"
4048 " fprintf(stderr, \"Cannot watch '%s'\\en\", argv[i]);\n"
4049 " perror(\"inotify_add_watch\");\n"
4050 " exit(EXIT_FAILURE);\n"
4055 #: build/C/man7/inotify.7:998
4057 msgid " /* Inotify input */\n"
4058 msgstr " /* Inotify input */\n"
4061 #: build/C/man7/inotify.7:1003
4063 msgid " /* Wait for events and/or terminal input */\n"
4064 msgstr " /* Wait for events and/or terminal input */\n"
4067 #: build/C/man7/inotify.7:1013
4070 " printf(\"Listening for events.\\en\");\n"
4072 " poll_num = poll(fds, nfds, -1);\n"
4073 " if (poll_num == -1) {\n"
4074 " if (errno == EINTR)\n"
4076 " perror(\"poll\");\n"
4077 " exit(EXIT_FAILURE);\n"
4080 " printf(\"Listening for events.\\en\");\n"
4082 " poll_num = poll(fds, nfds, -1);\n"
4083 " if (poll_num == -1) {\n"
4084 " if (errno == EINTR)\n"
4086 " perror(\"poll\");\n"
4087 " exit(EXIT_FAILURE);\n"
4091 #: build/C/man7/inotify.7:1015
4093 msgid " if (poll_num E<gt> 0) {\n"
4094 msgstr " if (poll_num E<gt> 0) {\n"
4097 #: build/C/man7/inotify.7:1017
4099 msgid " if (fds[0].revents & POLLIN) {\n"
4100 msgstr " if (fds[0].revents & POLLIN) {\n"
4103 #: build/C/man7/inotify.7:1019
4105 msgid " /* Console input is available. Empty stdin and quit */\n"
4106 msgstr " /* Console input is available. Empty stdin and quit */\n"
4109 #: build/C/man7/inotify.7:1028
4111 msgid " /* Inotify events are available */\n"
4112 msgstr " /* Inotify events are available */\n"
4115 #: build/C/man7/inotify.7:1033
4118 " handle_events(fd, wd, argc, argv);\n"
4123 " handle_events(fd, wd, argc, argv);\n"
4129 #: build/C/man7/inotify.7:1035
4131 msgid " printf(\"Listening for events stopped.\\en\");\n"
4132 msgstr " printf(\"Listening for events stopped.\\en\");\n"
4135 #: build/C/man7/inotify.7:1037
4137 msgid " /* Close inotify file descriptor */\n"
4138 msgstr " /* Close inotify file descriptor */\n"
4141 #: build/C/man7/inotify.7:1039
4143 msgid " close(fd);\n"
4144 msgstr " close(fd);\n"
4147 #: build/C/man7/inotify.7:1043
4151 " exit(EXIT_SUCCESS);\n"
4155 " exit(EXIT_SUCCESS);\n"
4159 #: build/C/man7/inotify.7:1054
4161 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4162 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4163 "B<stat>(2), B<fanotify>(7)"
4165 "B<inotifywait>(1), B<inotifywatch>(1), B<inotify_add_watch>(2), "
4166 "B<inotify_init>(2), B<inotify_init1>(2), B<inotify_rm_watch>(2), B<read>(2), "
4167 "B<stat>(2), B<fanotify>(7)"
4170 #: build/C/man7/inotify.7:1057
4172 "I<Documentation/filesystems/inotify.txt> in the Linux kernel source tree"
4173 msgstr "Linux カーネルソース内の I<Documentation/filesystems/inotify.txt>"
4176 #: build/C/man2/inotify_add_watch.2:28
4178 msgid "INOTIFY_ADD_WATCH"
4179 msgstr "INOTIFY_ADD_WATCH"
4182 #: build/C/man2/inotify_add_watch.2:28
4188 #: build/C/man2/inotify_add_watch.2:31
4189 msgid "inotify_add_watch - add a watch to an initialized inotify instance"
4191 "inotify_add_watch - 初期化済み inotify インスタンスに監視対象を追加する"
4194 #: build/C/man2/inotify_add_watch.2:33 build/C/man2/inotify_rm_watch.2:32
4195 msgid "B<#include E<lt>sys/inotify.hE<gt>>"
4196 msgstr "B<#include E<lt>sys/inotify.hE<gt>>"
4199 #: build/C/man2/inotify_add_watch.2:35
4201 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4204 "B<int inotify_add_watch(int >I<fd>B<, const char *>I<pathname>B<, uint32_t "
4208 #: build/C/man2/inotify_add_watch.2:54
4210 "B<inotify_add_watch>() adds a new watch, or modifies an existing watch, for "
4211 "the file whose location is specified in I<pathname>; the caller must have "
4212 "read permission for this file. The I<fd> argument is a file descriptor "
4213 "referring to the inotify instance whose watch list is to be modified. The "
4214 "events to be monitored for I<pathname> are specified in the I<mask> bit-mask "
4215 "argument. See B<inotify>(7) for a description of the bits that can be set "
4217 msgstr "B<inotify_add_watch>() は、 I<pathname> で指定された位置にあるファイルを監視する監視アイテム (watch) の新規追加、 または既存の監視アイテムの変更を行う。 呼び出し元は、監視対象のファイルに対する読み出し許可を 持っていなければならない。 I<fd> 引き数は、変更を行う監視対象リスト (watch list) を持つ inotify インスタンスを参照するファイルディスクリプターである。 I<pathname> のどのイベントを監視するかは、引き数のビットマスク I<mask> で指定する。 I<mask> に設定できるビットの説明については B<inotify>(7) を参照のこと。"
4220 #: build/C/man2/inotify_add_watch.2:66
4222 "A successful call to B<inotify_add_watch>() returns a unique watch "
4223 "descriptor for this inotify instance, for the filesystem object that "
4224 "corresponds to I<pathname>. If the filesystem object was not previously "
4225 "being watched by this inotify instance, then the watch descriptor is newly "
4226 "allocated. If the filesystem object was already being watched (perhaps via "
4227 "a different link to the same object), then the descriptor for the existing "
4228 "watch is returned."
4229 msgstr "B<inotify_add_watch>() の呼び出しが成功すると、 I<pathname> に対応するファイルシステムオブジェクトに対する、 一意な監視対象ディスクリプター (watch descriptor) を、 対象の inotify インスタンスに対して返す。 そのファイルシステムオブジェクトが対象の inotify インスタンスによって以前に監視されていない場合には、 監視対象ディスクリプターは新規に割り当てられる。 ファイルシステムオブジェクトが (おそらく同じオブジェクトに対する異なるリンク経由で) すでに監視されている場合には、 既存の監視に対するディスクリプターが返される。"
4232 #: build/C/man2/inotify_add_watch.2:77
4234 "The watch descriptor is returned by later B<read>(2)s from the inotify file "
4235 "descriptor. These reads fetch I<inotify_event> structures (see "
4236 "B<inotify>(7)) indicating filesystem events; the watch descriptor inside "
4237 "this structure identifies the object for which the event occurred."
4238 msgstr "これ以降に inotify ファイルディスクリプターから B<read>(2) を行うと、監視対象ディスクリプターが返される。 これらの B<read>() を行うと、ファイルシステムイベントを示す I<inotify_event> 構造体が読み出される (B<inotify>(7) 参照)。この構造体内の監視対象ディスクリプターにより、 どのオブジェクトでそのイベントが発生したかを特定できる。"
4241 #: build/C/man2/inotify_add_watch.2:84
4243 "On success, B<inotify_add_watch>() returns a nonnegative watch descriptor. "
4244 "On error, -1 is returned and I<errno> is set appropriately."
4245 msgstr "成功すると、 B<inotify_add_watch>() は非負の監視対象ディスクリプターを返す。 エラーの場合、-1 を返し、 I<errno> を適切に設定する。"
4248 #: build/C/man2/inotify_add_watch.2:85
4254 #: build/C/man2/inotify_add_watch.2:88
4255 msgid "Read access to the given file is not permitted."
4256 msgstr "指定されたファイルに対する読み出しアクセスが許可されていない。"
4259 #: build/C/man2/inotify_add_watch.2:91
4260 msgid "The given file descriptor is not valid."
4261 msgstr "指定されたファイルディスクリプターが有効ではない。"
4264 #: build/C/man2/inotify_add_watch.2:91
4270 #: build/C/man2/inotify_add_watch.2:95
4271 msgid "I<pathname> points outside of the process's accessible address space."
4273 "I<pathname> が指すアドレスがプロセスがアクセスできるアドレス空間外である。"
4276 #: build/C/man2/inotify_add_watch.2:100
4278 "The given event mask contains no valid events; or I<fd> is not an inotify "
4280 msgstr "指定されたイベントマスクに有効なイベントが含まれていない。 もしくは I<fd> が inotify ファイルディスクリプターではない。"
4283 #: build/C/man2/inotify_add_watch.2:100
4285 msgid "B<ENAMETOOLONG>"
4286 msgstr "B<ENAMETOOLONG>"
4289 #: build/C/man2/inotify_add_watch.2:104
4290 msgid "I<pathname> is too long."
4291 msgstr "I<pathname> が長過ぎる。"
4294 #: build/C/man2/inotify_add_watch.2:109
4296 "A directory component in I<pathname> does not exist or is a dangling "
4299 "I<pathname> のディレクトリ部分の構成要素が、存在しないか、\n"
4300 "リンク切れのシンボリックリンクである。"
4303 #: build/C/man2/inotify_add_watch.2:112
4304 msgid "Insufficient kernel memory was available."
4305 msgstr "カーネルメモリが十分になかった。"
4308 #: build/C/man2/inotify_add_watch.2:116
4310 "The user limit on the total number of inotify watches was reached or the "
4311 "kernel failed to allocate a needed resource."
4313 "inotify 監視対象の総数がユーザが追加できる上限に達していた。 もしくは、必要な"
4314 "資源の割り当てにカーネルが失敗した。"
4317 #: build/C/man2/inotify_add_watch.2:118 build/C/man2/inotify_rm_watch.2:69
4318 msgid "Inotify was merged into the 2.6.13 Linux kernel."
4319 msgstr "inotify は Linux カーネル 2.6.13 に組み込まれた。"
4322 #: build/C/man2/inotify_add_watch.2:124
4323 msgid "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4324 msgstr "B<inotify_init>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4327 #: build/C/man2/inotify_init.2:29
4329 msgid "INOTIFY_INIT"
4330 msgstr "INOTIFY_INIT"
4333 #: build/C/man2/inotify_init.2:29
4339 #: build/C/man2/inotify_init.2:32
4340 msgid "inotify_init, inotify_init1 - initialize an inotify instance"
4341 msgstr "inotify_init, inotify_init1 - inotify インスタンスを初期化する"
4344 #: build/C/man2/inotify_init.2:35
4346 msgid "B<#include E<lt>sys/inotify.hE<gt>>\n"
4347 msgstr "B<#include E<lt>sys/inotify.hE<gt>>\n"
4350 #: build/C/man2/inotify_init.2:38
4353 "B<int inotify_init(void);>\n"
4354 "B<int inotify_init1(int >I<flags>B<);>\n"
4356 "B<int inotify_init(void);>\n"
4357 "B<int inotify_init1(int >I<flags>B<);>\n"
4360 #: build/C/man2/inotify_init.2:42
4361 msgid "For an overview of the inotify API, see B<inotify>(7)."
4362 msgstr "inotify API の概要については B<inotify>(7) を参照。"
4365 #: build/C/man2/inotify_init.2:46
4367 "B<inotify_init>() initializes a new inotify instance and returns a file "
4368 "descriptor associated with a new inotify event queue."
4369 msgstr "B<inotify_init>() は、新規の inotify インスタンスを初期化し、作成された inotify イベントキュー に対応するファイルディスクリプターを返す。"
4372 #: build/C/man2/inotify_init.2:56
4374 "If I<flags> is 0, then B<inotify_init1>() is the same as "
4375 "B<inotify_init>(). The following values can be bitwise ORed in I<flags> to "
4376 "obtain different behavior:"
4378 "B<inotify_init1>() は、 I<flags> が 0 の場合、 B<inotify_init>() と同じであ"
4379 "る。 I<flags> に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作"
4383 #: build/C/man2/inotify_init.2:56
4385 msgid "B<IN_NONBLOCK>"
4386 msgstr "B<IN_NONBLOCK>"
4389 #: build/C/man2/inotify_init.2:64
4391 "Set the B<O_NONBLOCK> file status flag on the new open file description. "
4392 "Using this flag saves extra calls to B<fcntl>(2) to achieve the same result."
4394 "新しく生成されるオープンファイル記述 (open file description) の BR "
4395 "O_NONBLOCK ファイルステータスフラグをセットする。 このフラグを使うことで、 "
4396 "B<O_NONBLOCK> をセットするために B<fcntl>(2) を追加で呼び出す必要がなくな"
4400 #: build/C/man2/inotify_init.2:64
4402 msgid "B<IN_CLOEXEC>"
4403 msgstr "B<IN_CLOEXEC>"
4406 #: build/C/man2/inotify_init.2:74
4408 "Set the close-on-exec (B<FD_CLOEXEC>) flag on the new file descriptor. See "
4409 "the description of the B<O_CLOEXEC> flag in B<open>(2) for reasons why this "
4411 msgstr "新しいファイルディスクリプターに対して close-on-exec (B<FD_CLOEXEC>) フラグをセットする。 このフラグが役に立つ理由については、 B<open>(2) の B<O_CLOEXEC> フラグの説明を参照のこと。"
4414 #: build/C/man2/inotify_init.2:79
4416 "On success, these system calls return a new file descriptor. On error, -1 "
4417 "is returned, and I<errno> is set to indicate the error."
4418 msgstr "成功すると、これらのシステムコールは新しいファイルディスクリプターを返す。 エラーの場合、-1 を返し、 I<errno> をエラーを示す値に設定する。"
4421 #: build/C/man2/inotify_init.2:85
4422 msgid "(B<inotify_init1>()) An invalid value was specified in I<flags>."
4423 msgstr "(B<inotify_init1>()) 無効な値が I<flags> に指定された。"
4426 #: build/C/man2/inotify_init.2:88
4428 "The user limit on the total number of inotify instances has been reached."
4429 msgstr "inotify インスタンスの総数がユーザ単位の上限に達していた。"
4432 #: build/C/man2/inotify_init.2:91
4434 "The system limit on the total number of file descriptors has been reached."
4435 msgstr "inotify ファイルディスクリプターの総数がシステムの上限に達していた。"
4438 #: build/C/man2/inotify_init.2:94
4439 msgid "Insufficient kernel memory is available."
4440 msgstr "カーネルメモリが十分になかった。"
4443 #: build/C/man2/inotify_init.2:101
4445 "B<inotify_init>() first appeared in Linux 2.6.13; library support was added "
4446 "to glibc in version 2.4. B<inotify_init1>() was added in Linux 2.6.27; "
4447 "library support was added to glibc in version 2.9."
4449 "B<inotify_init>() は Linux 2.6.13 で初めて登場し、\n"
4450 "ライブラリによるサポートは glibc バージョン 2.4 で追加された。\n"
4451 "B<inotify_init1>() は Linux 2.6.27 で追加され、\n"
4452 "ライブラリによるサポートは glibc バージョン 2.9 で追加された。"
4455 #: build/C/man2/inotify_init.2:103
4456 msgid "These system calls are Linux-specific."
4457 msgstr "これらのシステムコールは Linux 独自である。"
4460 #: build/C/man2/inotify_init.2:107
4461 msgid "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4462 msgstr "B<inotify_add_watch>(2), B<inotify_rm_watch>(2), B<inotify>(7)"
4465 #: build/C/man2/inotify_rm_watch.2:27
4467 msgid "INOTIFY_RM_WATCH"
4468 msgstr "INOTIFY_RM_WATCH"
4471 #: build/C/man2/inotify_rm_watch.2:27
4477 #: build/C/man2/inotify_rm_watch.2:30
4478 msgid "inotify_rm_watch - remove an existing watch from an inotify instance"
4480 "inotify_rm_watch - inotify インスタンスから既存の監視アイテムを削除する"
4482 #. Before glibc 2.10, the second argument was types as uint32_t.
4483 #. http://sources.redhat.com/bugzilla/show_bug.cgi?id=7040
4485 #: build/C/man2/inotify_rm_watch.2:36
4486 msgid "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4487 msgstr "B<int inotify_rm_watch(int >I<fd>B<, int >I<wd>B<);>"
4490 #: build/C/man2/inotify_rm_watch.2:42
4492 "B<inotify_rm_watch>() removes the watch associated with the watch "
4493 "descriptor I<wd> from the inotify instance associated with the file "
4495 msgstr "B<inotify_rm_watch>() は、監視対象ディスクリプター (watch descriptor) I<wd> に対応する監視アイテムを、 ファイルディスクリプター I<fd> に対応する inotify インスタンスから削除する。"
4498 #: build/C/man2/inotify_rm_watch.2:48
4500 "Removing a watch causes an B<IN_IGNORED> event to be generated for this "
4501 "watch descriptor. (See B<inotify>(7).)"
4502 msgstr "監視対象を削除すると、 この監視対象ディスクリプターに対して B<IN_IGNORED> イベントが生成される (B<inotify>(7) 参照)。"
4505 #: build/C/man2/inotify_rm_watch.2:55
4507 "On success, B<inotify_rm_watch>() returns zero. On error, -1 is returned "
4508 "and I<errno> is set to indicate the cause of the error."
4510 "成功すると、B<inotify_rm_watch>() は 0 を返す。 エラーの場合、-1 を返し、 "
4511 "I<errno> をエラーの原因を示す値に設定する。"
4514 #: build/C/man2/inotify_rm_watch.2:60
4515 msgid "I<fd> is not a valid file descriptor."
4516 msgstr "I<fd> が有効なファイルディスクリプターではない。"
4519 #: build/C/man2/inotify_rm_watch.2:67
4521 "The watch descriptor I<wd> is not valid; or I<fd> is not an inotify file "
4523 msgstr "監視対象ディスクリプター I<wd> が有効でない。もしくは、 I<fd> が inotify ファイルディスクリプターではない。"
4526 #: build/C/man2/inotify_rm_watch.2:75
4527 msgid "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"
4528 msgstr "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"
4531 #~ "Add (OR) events to watch mask for this pathname if it already exists "
4532 #~ "(instead of replacing mask)."
4534 #~ "I<pathname> に対する監視マスクが既に存在する場合、 (マスクの置き換えではな"
4535 #~ "く) イベントを追加 (OR) する。"