OSDN Git Service

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