OSDN Git Service

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