OSDN Git Service

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