• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisiond182ea101a394ef14505edfbeafbc8fd9cf5a131 (tree)
Zeit2014-04-28 02:50:28
AutorAkihiro MOTOKI <amotoki@gmai...>
CommiterAkihiro MOTOKI

Log Message

(split) LDP: Translate inotify.7

Ändern Zusammenfassung

Diff

--- a/draft/man7/inotify.7
+++ b/draft/man7/inotify.7
@@ -53,8 +53,8 @@ inotify \- ファイルシステムイベントを監視する
5353 この API では以下のシステムコールが使用される。
5454 .IP * 3
5555 \fBinotify_init\fP(2) は inotify インスタンスを作成し、inotify インスタンスを参照する ファイルディスクリプタを返す。
56-もっと新しい \fBinotify_init1\fP(2) も \fBinotify_init\fP(2) と同様だが、いくつかの追加の機能を利用するための
57-\fIflags\fP 引き数を持っている。
56+より新しい \fBinotify_init1\fP(2) も \fBinotify_init\fP(2) と同様だが、
57+こちらにはいくつかの追加の機能を利用するための \fIflags\fP 引き数がある。
5858 .IP *
5959 \fBinotify_add_watch\fP(2) は inotify インスタンスに関連づけられた「監視対象 (watch) リスト」を操作する。
6060 監視対象リストの各アイテム ("watch") は、 ファイルまたはディレクトリのパス名と、 そのパス名で参照されるファイルに対して
@@ -62,21 +62,18 @@ inotify \- ファイルシステムイベントを監視する
6262 は新しい監視アイテムの作成や既存の監視対象の変更ができる。 各監視対象は一意の「監視対象ディスクリプタ」を持つ。 これは監視対象を作成したときに
6363 \fBinotify_add_watch\fP(2) から返される整数である。
6464 .IP *
65-When events occur for monitored files and directories, those events are made
66-available to the application as structured data that can be read from the
67-inotify file descriptor using \fBread\fP(2) (see below).
65+監視しているファイルやディレクトリでイベントが起こると、 それらのイベントはアプリケーションから inotify ファイルディスクリプタから
66+\fBread\fP(2) を使って構造化データとして読み出すことができる (下記参照)。
6867 .IP *
6968 \fBinotify_rm_watch\fP(2) は inotify の監視対象リストからアイテムを削除する。
7069 .IP *
7170 inotify インスタンスを指している 全てのファイルディスクリプタが (\fBclose\fP(2) を使って) クローズされた場合、
7271 その下層にあるオブジェクトとそのリソースは、 カーネルで再利用するために解放される。 関連が切られた監視対象は自動的に解放される。
7372
74-With careful programming, an application can use inotify to efficiently
75-monitor and cache the state of a set of filesystem objects. However, robust
76-applications should allow for the fact that bugs in the monitoring logic or
77-races of the kind described below may leave the cache inconsistent with the
78-filesystem state. It is probably wise to to do some consistency checking,
79-and rebuild the cache when inconsistencies are detected.
73+注意深くプログラミングすることで、 アプリケーションは inotify
74+を使ってファイルシステムオブジェクトの集合の状態を効率的に監視しキャッシュしておくことができる。
75+しかしながら、ロバストなアプリケーションでは、監視ロジックのバグや以下に説明があるような種類の競合条件によりファイルシステムの状態とキャッシュが一致しない状態になることがあるという事実も考慮に入れておくべきである。
76+おそらく何らかの一貫性のチェックを行い、不一致が検出された場合にはキャッシュを再構築するのが懸命だろう。
8077 .SS "inotify ファイルディスクリプタからのイベントの読み出し"
8178 どのようなイベントが起こっていたかを知るには、 アプリケーションで inotify ファイルディスクリプタを \fBread\fP(2) すればよい。
8279 これまでに何もイベントが起こっていない場合、 停止 (blocking) モードのファイルディスクリプタであれば、 少なくとも 1
@@ -159,11 +156,9 @@ struct inotify_event {
159156 監視対象ディレクトリ内でファイルやディレクトリが削除された。
160157 .TP
161158 \fBIN_DELETE_SELF\fP
162-Watched file/directory was itself deleted. (This event also occurs if an
163-object is moved to another filesystem, since \fBmv\fP(1) in effect copies the
164-file to the other filesystem and then deletes it from the original
165-filesystem.) In addition, an \fBIN_IGNORED\fP event will subsequently be
166-generated for the watch descriptor.
159+監視対象のファイルやディレクトリ自身が削除あれた。 (このイベントはオブジェクトが別のファイルシステムに移動された場合にも発生する。 \fBmv\fP(1)
160+は実際には別のファイルシステムにファイルをコピーした後、元のファイルシステムからそのファイルを削除するからである。) また、
161+結果的に監視ディスクリプタに対して \fBIN_IGNORED\fP イベントも生成される。
167162 .TP
168163 \fBIN_MODIFY\fP (*)
169164 ファイルが変更された (\fBwrite\fP(2), \fBtruncate\fP(2) など)。
@@ -239,9 +234,8 @@ generated for the watch descriptor.
239234 イベントが生成される。
240235 .RE
241236 .SS 例
242-Suppose an application is watching the directory \fIdir\fP and the file
243-\fIdir/myfile\fP for all events. The examples below show some events that will
244-be generated for these two objects.
237+アプリケーションがディレクトリ \fIdir\fP とファイル \fIdir/myfile\fP のすべてのイベントを監視しているとする。 以下に、これらの 2
238+つのオブジェクトに対して生成されるイベントの例を示す。
245239 .RS 4
246240 .TP
247241 fd = open("dir/myfile", O_RDWR);
@@ -260,9 +254,8 @@ close(fd);
260254 \fIdir\fP と \fIdir/myfile\fP の両方に対して \fBIN_CLOSE_WRITE\fP イベントが生成される
261255 .RE
262256 .PP
263-Suppose an application is watching the directories \fIdir1\fP and \fIdir2\fP, and
264-the file \fIdir1/myfile\fP. The following examples show some events that may
265-be generated.
257+アプリケーションがディレクトリ \fIdir1\fP と \fIdir2\fP、およびファイル \fIdir1/myfile\fP を監視しているとする。
258+以下に生成されるイベントの例を示す。
266259 .RS 4
267260 .TP
268261 link("dir1/myfile", "dir2/new");
@@ -274,32 +267,30 @@ rename("dir1/myfile", "dir2/myfile");
274267 \fBIN_MOVED_TO\fP は同じ \fIcookie\fP 値を持つ。
275268 .RE
276269 .PP
277-Suppose that \fIdir1/xx\fP and \fIdir2/yy\fP are (the only) links to the same
278-file, and an application is watching \fIdir1\fP, \fIdir2\fP, \fIdir1/xx\fP, and
279-\fIdir2/yy\fP. Executing the following calls in the order given below will
280-generate the following events:
270+\fIdir1/xx\fP と \fIdir2/yy\fP は同じファイルを参照するリンクで (他のリンクはないものとする)、 アプリケーションは \fIdir1\fP,
271+\fIdir2\fP, \fIdir1/xx\fP, \fIdir2/yy\fP を監視しているものとする。
272+以下に示す順序で下記の呼び出しを実行すると、以下のイベントが生成される。
281273 .RS 4
282274 .TP
283275 unlink("dir2/yy");
284-Generates an \fBIN_ATTRIB\fP event for \fIxx\fP (because its link count changes)
285-and an \fBIN_DELETE\fP event for \fIdir2\fP.
276+\fIxx\fP に対して \fBIN_ATTRIB\fP イベントが生成され (リンク数が変化したため)、 \fIdir2\fP に対して \fBIN_DELETE\fP
277+イベントが生成される。
286278 .TP
287279 unlink("dir1/xx");
288-Generates \fBIN_ATTRIB\fP, \fBIN_DELETE_SELF\fP, and \fBIN_IGNORED\fP events for
289-\fIxx\fP, and an \fBIN_DELETE\fP event for \fIdir1\fP.
280+\fIxx\fP に対してイベント \fBIN_ATTRIB\fP, \fBIN_DELETE_SELF\fP, \fBIN_IGNORED\fP が生成され、 \fIdir1\fP
281+に対して \fBIN_DELETE\fP イベントが生成される。
290282 .RE
291283 .PP
292-Suppose an application is watching the directory \fIdir\fP and (the empty)
293-directory \fIdir/subdir\fP. The following examples show some events that may
294-be generated.
284+アプリケーションがディレクトリ \fIdir\fP と (空の) ディレクトリ \fIdir/subdir\fP を監視しているものとする。
285+以下に生成されるイベントの例を示す。
295286 .RS 4
296287 .TP
297288 mkdir("dir/new", mode);
298-Generates an \fBIN_CREATE | IN_ISDIR\fP event for \fIdir\fP.
289+\fIdir\fP に対して \fBIN_CREATE | IN_ISDIR\fP イベントが生成される。
299290 .TP
300291 rmdir("dir/subdir");
301-Generates \fBIN_DELETE_SELF\fP and \fBIN_IGNORED\fP events for \fIsubdir\fP, and an
302-\fBIN_DELETE | IN_ISDIR\fP event for \fIdir\fP.
292+\fIsubdir\fP に対してイベント \fBIN_DELETE_SELF\fP と \fBIN_IGNORED\fP が生成され、 \fIdir\fP に対して
293+\fBIN_DELETE | IN_ISDIR\fP イベントが生成される。
303294 .RE
304295 .SS "/proc インターフェース"
305296 以下のインターフェースは、inotify で消費される カーネルメモリの総量を制限するのに使用できる:
@@ -344,23 +335,20 @@ inotify ファイルディスクリプタの読み込みで返されるイベン
344335 inotify API では、inotify イベントが発生するきっかけとなったユーザやプロセスに関する情報は提供されない。とりわけ、inotify
345336 経由でイベントを監視しているプロセスが、自分自身がきっかけとなったイベントと他のプロセスがきっかけとなったイベントを区別する簡単な手段はない。
346337
347-Inotify reports only events that a user\-space program triggers through the
348-filesystem API. As a result, it does not catch remote events that occur on
349-network filesystems. (Applications must fall back to polling the filesystem
350-to catch such events.) Furthermore, various pseudo\-filesystems such as
351-\fI/proc\fP, \fI/sys\fP, and \fI/dev/pts\fP are not monitorable with inotify.
338+inotify は、ファイルシステム API 経由でユーザー空間プログラムがきっかけとなったイベントだけを報告する。 結果として、 inotify
339+はネットワークファイルシステムで発生したリモートのイベントを捉えることはできない
340+(このようなイベントを捉えるにはアプリケーションはファイルシステムをポーリングする必要がある)。 さらに、 \fI/proc\fP, \fI/sys\fP,
341+\fI/dev/pts\fP といったいくつかの疑似ファイルシステムは inotify で監視することができない。
352342
353-The inotify API does not report file accesses and modifications that may
354-occur because of \fBmmap\fP(2) and \fBmsync\fP(2).
343+inotify API は \fBmmap\fP(2) と \fBmsync\fP(2) により起こったファイルのアクセスと変更を報告しない。
355344
356345 inotify API では影響が受けるファイルをファイル名で特定する。
357346 しかしながら、アプリケーションが inotify イベントを処理する時点では、
358347 そのファイル名がすでに削除されたり変更されたりしている可能性がある。
359348
360-The inotify API identifies events via watch descriptors. It is the
361-application's responsibility to cache a mapping (if one is needed) between
362-watch descriptors and pathnames. Be aware that directory renamings may
363-affect multiple cached pathnames.
349+inotify API では監視対象ディスクリプタを通してイベントが区別される。 (必要であれば)
350+監視対象ディスクリプタとパス名のマッピングをキャッシュしておくのはアプリケーションの役目である。
351+ディレクトリの名前変更の場合、キャッシュしている複数のパス名に影響がある点に注意すること。
364352
365353 inotify によるディレクトリの監視は再帰的に行われない: あるディレクトリ以下の
366354 サブディレクトリを監視する場合、 監視対象を追加で作成しなければならない。
@@ -372,50 +360,39 @@ inotify によるディレクトリの監視は再帰的に行われない: あ
372360 を追加した直後にサブディレクトリの内容をスキャンしたいと思う場合もあるだろう (必要ならそのサブディレクトリ内のサブディレクトリに対する watch
373361 も再帰的に追加することもあるだろう)。
374362
375-Note that the event queue can overflow. In this case, events are lost.
376-Robust applications should handle the possibility of lost events
377-gracefully. For example, it may be necessary to rebuild part or all of the
378-application cache. (One simple, but possibly expensive, approach is to
379-close the inotify file descriptor, empty the cache, create a new inotify
380-file descriptor, and then re\-create watches and cache entries for the
381-objects to be monitored.)
363+イベントキューはオーバーフローする場合があることに注意すること。 この場合、イベントは失なわれる。 ロバスト性が求められるアプリケーションでは、
364+イベントが失なわれる可能性も含めて適切に処理を行うべきである。
365+例えば、アプリケーション内のキャッシュの一部分または全てを再構築する必要があるかもしれない。 (単純だが、おそらくコストがかかる方法は、 inotify
366+ファイルディスクリプタをクローズし、 キャッシュを空にし、 新しい inotify ファイルディスクリプタを作成し、
367+監視しているオブジェクトの監視対象ディスクリプタとキャッシュエントリーの再作成を行う方法である。)
382368 .SS "rename() イベントの取り扱い"
383-As noted above, the \fBIN_MOVED_FROM\fP and \fBIN_MOVED_TO\fP event pair that is
384-generated by \fBrename\fP(2) can be matched up via their shared cookie value.
385-However, the task of matching has some challenges.
369+上述の通り、 \fBrename\fP(2) により生成される \fBIN_MOVED_FROM\fP と \fBIN_MOVED_TO\fP イベントの組は、共有される
370+cookie 値によって対応を取ることができる。 しかし、対応を取る場合にはいくつか難しい点がある。
386371
387-These two events are usually consecutive in the event stream available when
388-reading from the inotify file descriptor. However, this is not guaranteed.
389-If multiple processes are triggering events for monitored objects, then (on
390-rare occasions) an arbitrary number of other events may appear between the
391-\fBIN_MOVED_FROM\fP and \fBIN_MOVED_TO\fP events.
372+これらの 2 つのイベントは、 inotify ファイルディスクリプタから読み出しを行った場合に、通常はイベントストリーム内で連続している。
373+しかしながら、連続していることは保証されていない。 複数のプロセスが監視対象オブジェクトでイベントを発生させた場合、 (めったに起こらないことだが)
374+イベント \fBIN_MOVED_FROM\fP と \fBIN_MOVED_TO\fP の間に任意の数の他のイベントがはさまる可能性がある。
392375
393-Matching up the \fBIN_MOVED_FROM\fP and \fBIN_MOVED_TO\fP event pair generated by
394-\fBrename\fP(2) is thus inherently racy. (Don't forget that if an object is
395-renamed outside of a monitored directory, there may not even be an
396-\fBIN_MOVED_TO\fP event.) Heuristic approaches (e.g., assume the events are
397-always consecutive) can be used to ensure a match in most cases, but will
398-inevitably miss some cases, causing the application to perceive the
399-\fBIN_MOVED_FROM\fP and \fBIN_MOVED_TO\fP events as being unrelated. If watch
400-descriptors are destroyed and re\-created as a result, then those watch
401-descriptors will be inconsistent with the watch descriptors in any pending
402-events. (Re\-creating the inotify file descriptor and rebuilding the cache
403-may be useful to deal with this scenario.)
376+したがって、 \fBrename\fP(2) により生成された \fBIN_MOVED_FROM\fP と \fBIN_MOVED_TO\fP
377+のイベントの組の対応を取るのは本質的に難しいことである (監視対象のディレクトリの外へオブジェクトの rename が行われた場合には
378+\fBIN_MOVED_TO\fP イベントは存在しさえしないことを忘れてはならない)。 (イベントは常に連続しているとの仮定を置くといった)
379+発見的な方法を使うと、ほとんどの場合でイベントの組をうまく見つけることができるが、 いくつかの場合に見逃すことが避けられず、 アプリケーションが
380+\fBIN_MOVED_FROM\fP と \fBIN_MOVED_TO\fP イベントが無関係だとみなしてしまう可能性がある。
381+結果的に、監視対象ディスクリプタが破棄され再作成された場合、これらの監視対象ディスクリプタは、処理待ちイベントの監視対象ディスクリプタと一貫性のないものになってしまう
382+(inotify ファイルディスクリプタの再作成とキャッシュの再構成はこの状況に対処するのに有用な方法なのだが)。
404383
405-Applications should also allow for the possibility that the \fBIN_MOVED_FROM\fP
406-event was the last event that could fit in the buffer returned by the
407-current call to \fBread\fP(2), and the accompanying \fBIN_MOVED_TO\fP event might
408-be fetched only on the next \fBread\fP(2).
384+また、アプリケーションは、 \fBIN_MOVED_FROM\fP イベントが今行った \fBread\fP(2)
385+の呼び出しで返されたバッファのちょうど一番最後のイベントで、 \fBIN_MOVED_TO\fP イベントは次の \fBread\fP(2)
386+を行わないと取得できない可能性も考慮に入れる必要がある。
409387 .SH バグ
410388 .\" FIXME kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321
411389 .\" implies that unmount events were buggy 2.6.11 to 2.6.36
412390 .\"
413391 2.6.16 以前のカーネルでは \fBIN_ONESHOT\fP \fImask\fP フラグが働かない。
414392
415-As originally designed and implemented, the \fBIN_ONESHOT\fP flag did not cause
416-an \fBIN_IGNORED\fP event to be generated when the watch was dropped after one
417-event. However, as an unintended effect of other changes, since Linux
418-2.6.36, an \fBIN_IGNORED\fP event is generated in this case.
393+元々は設計/実装時の意図通り、 イベントが一つ発生し watch が削除された際に \fBIN_ONESHOT\fP フラグでは \fBIN_IGNORED\fP
394+イベントが発生しなかった。 しかし、 別の変更での意図していなかった影響により、 Linux 2.6.36 以降では、 この場合に
395+\fBIN_IGNORED\fP イベントが生成される。
419396
420397 .\" commit 1c17d18e3775485bf1e0ce79575eb637a94494a2
421398 カーネル 2.6.25 より前では、 連続する同一のイベントを一つにまとめることを意図したコード (古い方のイベントがまだ読み込まれていない場合に、
--- a/po4a/inotify/po/ja.po
+++ b/po4a/inotify/po/ja.po
@@ -7,7 +7,7 @@ msgid ""
77 msgstr ""
88 "Project-Id-Version: PACKAGE VERSION\n"
99 "POT-Creation-Date: 2014-04-24 00:50+0900\n"
10-"PO-Revision-Date: 2014-04-27 06:31+0900\n"
10+"PO-Revision-Date: 2014-04-28 02:45+0900\n"
1111 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1212 "Language-Team: LANGUAGE <LL@li.org>\n"
1313 "Language: \n"
@@ -93,11 +93,7 @@ msgid ""
9393 "descriptor referring to the inotify instance. The more recent "
9494 "B<inotify_init1>(2) is like B<inotify_init>(2), but has a I<flags> argument "
9595 "that provides access to some extra functionality."
96-msgstr ""
97-"B<inotify_init>(2) は inotify インスタンスを作成し、inotify インスタンスを参"
98-"照する ファイルディスクリプタを返す。 もっと新しい B<inotify_init1>(2) も "
99-"B<inotify_init>(2) と同様だが、いくつかの追加の機能を利用するための "
100-"I<flags> 引き数を持っている。"
96+msgstr "B<inotify_init>(2) は inotify インスタンスを作成し、inotify インスタンスを参照する ファイルディスクリプタを返す。 より新しい B<inotify_init1>(2) も B<inotify_init>(2) と同様だが、 こちらにはいくつかの追加の機能を利用するための I<flags> 引き数がある。"
10197
10298 #. type: Plain text
10399 #: build/C/man7/inotify.7:63
@@ -124,7 +120,7 @@ msgid ""
124120 "When events occur for monitored files and directories, those events are made "
125121 "available to the application as structured data that can be read from the "
126122 "inotify file descriptor using B<read>(2) (see below)."
127-msgstr ""
123+msgstr "監視しているファイルやディレクトリでイベントが起こると、 それらのイベントはアプリケーションから inotify ファイルディスクリプタから B<read>(2) を使って構造化データとして読み出すことができる (下記参照)。"
128124
129125 #. type: Plain text
130126 #: build/C/man7/inotify.7:72
@@ -153,7 +149,7 @@ msgid ""
153149 "races of the kind described below may leave the cache inconsistent with the "
154150 "filesystem state. It is probably wise to to do some consistency checking, "
155151 "and rebuild the cache when inconsistencies are detected."
156-msgstr ""
152+msgstr "注意深くプログラミングすることで、 アプリケーションは inotify を使ってファイルシステムオブジェクトの集合の状態を効率的に監視しキャッシュしておくことができる。 しかしながら、ロバストなアプリケーションでは、監視ロジックのバグや以下に説明があるような種類の競合条件によりファイルシステムの状態とキャッシュが一致しない状態になることがあるという事実も考慮に入れておくべきである。 おそらく何らかの一貫性のチェックを行い、不一致が検出された場合にはキャッシュを再構築するのが懸命だろう。"
157153
158154 #. type: SS
159155 #: build/C/man7/inotify.7:88
@@ -407,7 +403,7 @@ msgid ""
407403 "file to the other filesystem and then deletes it from the original "
408404 "filesystem.) In addition, an B<IN_IGNORED> event will subsequently be "
409405 "generated for the watch descriptor."
410-msgstr ""
406+msgstr "監視対象のファイルやディレクトリ自身が削除あれた。 (このイベントはオブジェクトが別のファイルシステムに移動された場合にも発生する。 B<mv>(1) は実際には別のファイルシステムにファイルをコピーした後、元のファイルシステムからそのファイルを削除するからである。) また、 結果的に監視ディスクリプタに対して B<IN_IGNORED> イベントも生成される。"
411407
412408 #. type: TP
413409 #: build/C/man7/inotify.7:247
@@ -680,7 +676,7 @@ msgid ""
680676 "Suppose an application is watching the directory I<dir> and the file I<dir/"
681677 "myfile> for all events. The examples below show some events that will be "
682678 "generated for these two objects."
683-msgstr ""
679+msgstr "アプリケーションがディレクトリ I<dir> とファイル I<dir/myfile> のすべてのイベントを監視しているとする。 以下に、これらの 2 つのオブジェクトに対して生成されるイベントの例を示す。"
684680
685681 #. type: TP
686682 #: build/C/man7/inotify.7:374
@@ -748,7 +744,7 @@ msgid ""
748744 "Suppose an application is watching the directories I<dir1> and I<dir2>, and "
749745 "the file I<dir1/myfile>. The following examples show some events that may "
750746 "be generated."
751-msgstr ""
747+msgstr "アプリケーションがディレクトリ I<dir1> と I<dir2>、およびファイル I<dir1/myfile> を監視しているとする。 以下に生成されるイベントの例を示す。"
752748
753749 #. type: TP
754750 #: build/C/man7/inotify.7:424
@@ -790,7 +786,7 @@ msgid ""
790786 "file, and an application is watching I<dir1>, I<dir2>, I<dir1/xx>, and "
791787 "I<dir2/yy>. Executing the following calls in the order given below will "
792788 "generate the following events:"
793-msgstr ""
789+msgstr "I<dir1/xx> と I<dir2/yy> は同じファイルを参照するリンクで (他のリンクはないものとする)、 アプリケーションは I<dir1>, I<dir2>, I<dir1/xx>, I<dir2/yy> を監視しているものとする。 以下に示す順序で下記の呼び出しを実行すると、以下のイベントが生成される。"
794790
795791 #. type: TP
796792 #: build/C/man7/inotify.7:470
@@ -800,16 +796,10 @@ msgstr "unlink(\"dir2/yy\");"
800796
801797 #. type: Plain text
802798 #: build/C/man7/inotify.7:481
803-#, fuzzy
804-#| msgid ""
805-#| "Generates an B<IN_ATTRIB> event for I<myfile> and an B<IN_CREATE> event "
806-#| "for I<dir2>."
807799 msgid ""
808800 "Generates an B<IN_ATTRIB> event for I<xx> (because its link count changes) "
809801 "and an B<IN_DELETE> event for I<dir2>."
810-msgstr ""
811-"I<myfile> に対して B<IN_ATTRIB> イベントが生成され、 I<dir2> に対して "
812-"B<IN_CREATE> イベントが生成される。"
802+msgstr "I<xx> に対して B<IN_ATTRIB> イベントが生成され (リンク数が変化したため)、 I<dir2> に対して B<IN_DELETE> イベントが生成される。"
813803
814804 #. type: TP
815805 #: build/C/man7/inotify.7:481
@@ -819,16 +809,10 @@ msgstr "unlink(\"dir1/xx\");"
819809
820810 #. type: Plain text
821811 #: build/C/man7/inotify.7:494
822-#, fuzzy
823-#| msgid ""
824-#| "Generates an B<IN_ATTRIB> event for I<myfile> and an B<IN_CREATE> event "
825-#| "for I<dir2>."
826812 msgid ""
827813 "Generates B<IN_ATTRIB>, B<IN_DELETE_SELF>, and B<IN_IGNORED> events for "
828814 "I<xx>, and an B<IN_DELETE> event for I<dir1>."
829-msgstr ""
830-"I<myfile> に対して B<IN_ATTRIB> イベントが生成され、 I<dir2> に対して "
831-"B<IN_CREATE> イベントが生成される。"
815+msgstr "I<xx> に対してイベント B<IN_ATTRIB>, B<IN_DELETE_SELF>, B<IN_IGNORED> が生成され、 I<dir1> に対して B<IN_DELETE> イベントが生成される。"
832816
833817 #. type: Plain text
834818 #: build/C/man7/inotify.7:501
@@ -836,7 +820,7 @@ msgid ""
836820 "Suppose an application is watching the directory I<dir> and (the empty) "
837821 "directory I<dir/subdir>. The following examples show some events that may "
838822 "be generated."
839-msgstr ""
823+msgstr "アプリケーションがディレクトリ I<dir> と (空の) ディレクトリ I<dir/subdir> を監視しているものとする。 以下に生成されるイベントの例を示す。"
840824
841825 #. type: TP
842826 #: build/C/man7/inotify.7:502
@@ -847,7 +831,7 @@ msgstr "mkdir(\"dir/new\", mode);"
847831 #. type: Plain text
848832 #: build/C/man7/inotify.7:508
849833 msgid "Generates an B<IN_CREATE | IN_ISDIR> event for I<dir>."
850-msgstr ""
834+msgstr "I<dir> に対して B<IN_CREATE | IN_ISDIR> イベントが生成される。"
851835
852836 #. type: TP
853837 #: build/C/man7/inotify.7:508
@@ -860,7 +844,7 @@ msgstr "rmdir(\"dir/subdir\");"
860844 msgid ""
861845 "Generates B<IN_DELETE_SELF> and B<IN_IGNORED> events for I<subdir>, and an "
862846 "B<IN_DELETE | IN_ISDIR> event for I<dir>."
863-msgstr ""
847+msgstr "I<subdir> に対してイベント B<IN_DELETE_SELF> と B<IN_IGNORED> が生成され、 I<dir> に対して B<IN_DELETE | IN_ISDIR> イベントが生成される。"
864848
865849 #. type: SS
866850 #: build/C/man7/inotify.7:521
@@ -1057,14 +1041,14 @@ msgid ""
10571041 "network filesystems. (Applications must fall back to polling the filesystem "
10581042 "to catch such events.) Furthermore, various pseudo-filesystems such as I</"
10591043 "proc>, I</sys>, and I</dev/pts> are not monitorable with inotify."
1060-msgstr ""
1044+msgstr "inotify は、ファイルシステム API 経由でユーザー空間プログラムがきっかけとなったイベントだけを報告する。 結果として、 inotify はネットワークファイルシステムで発生したリモートのイベントを捉えることはできない (このようなイベントを捉えるにはアプリケーションはファイルシステムをポーリングする必要がある)。 さらに、 I</proc>, I</sys>, I</dev/pts> といったいくつかの疑似ファイルシステムは inotify で監視することができない。"
10611045
10621046 #. type: Plain text
10631047 #: build/C/man7/inotify.7:638
10641048 msgid ""
10651049 "The inotify API does not report file accesses and modifications that may "
10661050 "occur because of B<mmap>(2) and B<msync>(2)."
1067-msgstr ""
1051+msgstr "inotify API は B<mmap>(2) と B<msync>(2) により起こったファイルのアクセスと変更を報告しない。"
10681052
10691053 #. type: Plain text
10701054 #: build/C/man7/inotify.7:642
@@ -1084,7 +1068,7 @@ msgid ""
10841068 "application's responsibility to cache a mapping (if one is needed) between "
10851069 "watch descriptors and pathnames. Be aware that directory renamings may "
10861070 "affect multiple cached pathnames."
1087-msgstr ""
1071+msgstr "inotify API では監視対象ディスクリプタを通してイベントが区別される。 (必要であれば) 監視対象ディスクリプタとパス名のマッピングをキャッシュしておくのはアプリケーションの役目である。 ディレクトリの名前変更の場合、キャッシュしている複数のパス名に影響がある点に注意すること。"
10881072
10891073 #. type: Plain text
10901074 #: build/C/man7/inotify.7:652
@@ -1127,7 +1111,7 @@ msgid ""
11271111 "close the inotify file descriptor, empty the cache, create a new inotify "
11281112 "file descriptor, and then re-create watches and cache entries for the "
11291113 "objects to be monitored.)"
1130-msgstr ""
1114+msgstr "イベントキューはオーバーフローする場合があることに注意すること。 この場合、イベントは失なわれる。 ロバスト性が求められるアプリケーションでは、 イベントが失なわれる可能性も含めて適切に処理を行うべきである。 例えば、アプリケーション内のキャッシュの一部分または全てを再構築する必要があるかもしれない。 (単純だが、おそらくコストがかかる方法は、 inotify ファイルディスクリプタをクローズし、 キャッシュを空にし、 新しい inotify ファイルディスクリプタを作成し、 監視しているオブジェクトの監視対象ディスクリプタとキャッシュエントリーの再作成を行う方法である。)"
11311115
11321116 #. type: SS
11331117 #: build/C/man7/inotify.7:673
@@ -1141,7 +1125,7 @@ msgid ""
11411125 "As noted above, the B<IN_MOVED_FROM> and B<IN_MOVED_TO> event pair that is "
11421126 "generated by B<rename>(2) can be matched up via their shared cookie value. "
11431127 "However, the task of matching has some challenges."
1144-msgstr ""
1128+msgstr "上述の通り、 B<rename>(2) により生成される B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントの組は、共有される cookie 値によって対応を取ることができる。 しかし、対応を取る場合にはいくつか難しい点がある。"
11451129
11461130 #. type: Plain text
11471131 #: build/C/man7/inotify.7:693
@@ -1151,7 +1135,7 @@ msgid ""
11511135 "If multiple processes are triggering events for monitored objects, then (on "
11521136 "rare occasions) an arbitrary number of other events may appear between the "
11531137 "B<IN_MOVED_FROM> and B<IN_MOVED_TO> events."
1154-msgstr ""
1138+msgstr "これらの 2 つのイベントは、 inotify ファイルディスクリプタから読み出しを行った場合に、通常はイベントストリーム内で連続している。 しかしながら、連続していることは保証されていない。 複数のプロセスが監視対象オブジェクトでイベントを発生させた場合、 (めったに起こらないことだが) イベント B<IN_MOVED_FROM> と B<IN_MOVED_TO> の間に任意の数の他のイベントがはさまる可能性がある。"
11551139
11561140 #. type: Plain text
11571141 #: build/C/man7/inotify.7:718
@@ -1167,7 +1151,7 @@ msgid ""
11671151 "descriptors will be inconsistent with the watch descriptors in any pending "
11681152 "events. (Re-creating the inotify file descriptor and rebuilding the cache "
11691153 "may be useful to deal with this scenario.)"
1170-msgstr ""
1154+msgstr "したがって、 B<rename>(2) により生成された B<IN_MOVED_FROM> と B<IN_MOVED_TO> のイベントの組の対応を取るのは本質的に難しいことである (監視対象のディレクトリの外へオブジェクトの rename が行われた場合には B<IN_MOVED_TO> イベントは存在しさえしないことを忘れてはならない)。 (イベントは常に連続しているとの仮定を置くといった) 発見的な方法を使うと、ほとんどの場合でイベントの組をうまく見つけることができるが、 いくつかの場合に見逃すことが避けられず、 アプリケーションが B<IN_MOVED_FROM> と B<IN_MOVED_TO> イベントが無関係だとみなしてしまう可能性がある。 結果的に、監視対象ディスクリプタが破棄され再作成された場合、これらの監視対象ディスクリプタは、処理待ちイベントの監視対象ディスクリプタと一貫性のないものになってしまう (inotify ファイルディスクリプタの再作成とキャッシュの再構成はこの状況に対処するのに有用な方法なのだが)。"
11711155
11721156 #. type: Plain text
11731157 #: build/C/man7/inotify.7:728
@@ -1176,7 +1160,7 @@ msgid ""
11761160 "event was the last event that could fit in the buffer returned by the "
11771161 "current call to B<read>(2), and the accompanying B<IN_MOVED_TO> event might "
11781162 "be fetched only on the next B<read>(2)."
1179-msgstr ""
1163+msgstr "また、アプリケーションは、 B<IN_MOVED_FROM> イベントが今行った B<read>(2) の呼び出しで返されたバッファのちょうど一番最後のイベントで、 B<IN_MOVED_TO> イベントは次の B<read>(2) を行わないと取得できない可能性も考慮に入れる必要がある。"
11801164
11811165 #. type: SH
11821166 #: build/C/man7/inotify.7:728
@@ -1198,7 +1182,7 @@ msgid ""
11981182 "an B<IN_IGNORED> event to be generated when the watch was dropped after one "
11991183 "event. However, as an unintended effect of other changes, since Linux "
12001184 "2.6.36, an B<IN_IGNORED> event is generated in this case."
1201-msgstr ""
1185+msgstr "元々は設計/実装時の意図通り、 イベントが一つ発生し watch が削除された際に B<IN_ONESHOT> フラグでは B<IN_IGNORED> イベントが発生しなかった。 しかし、 別の変更での意図していなかった影響により、 Linux 2.6.36 以降では、 この場合に B<IN_IGNORED> イベントが生成される。"
12021186
12031187 #. commit 1c17d18e3775485bf1e0ce79575eb637a94494a2
12041188 #. type: Plain text
@@ -1708,68 +1692,3 @@ msgstr ""
17081692 #: build/C/man2/inotify_rm_watch.2:75
17091693 msgid "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"
17101694 msgstr "B<inotify_add_watch>(2), B<inotify_init>(2), B<inotify>(7)"
1711-
1712-#~ msgid "2013-09-16"
1713-#~ msgstr "2013-09-16"
1714-
1715-#~ msgid ""
1716-#~ "The following system calls are used with this API: B<inotify_init>(2) "
1717-#~ "(or B<inotify_init1>(2)), B<inotify_add_watch>(2), B<inotify_rm_watch>"
1718-#~ "(2), B<read>(2), and B<close>(2)."
1719-#~ msgstr ""
1720-#~ "以下のシステムコールがこの API と共に使用される: B<inotify_init>(2) (や "
1721-#~ "B<inotify_init1>(2)), B<inotify_add_watch>(2), B<inotify_rm_watch>(2), "
1722-#~ "B<read>(2), B<close>(2)."
1723-
1724-#~ msgid "File/directory created in watched directory (*)."
1725-#~ msgstr "監視対象ディレクトリ内でファイルやディレクトリが作成された。(*)"
1726-
1727-#~ msgid "Watched file/directory was itself deleted."
1728-#~ msgstr "監視対象のディレクトリまたはファイル自身が削除された。"
1729-
1730-#~ msgid "File was modified (*)."
1731-#~ msgstr "ファイルが修正された。(*)"
1732-
1733-#~ msgid ""
1734-#~ "Two additional convenience macros are B<IN_MOVE>, which equates to "
1735-#~ "IN_MOVED_FROM|IN_MOVED_TO, and B<IN_CLOSE>, which equates to "
1736-#~ "IN_CLOSE_WRITE|IN_CLOSE_NOWRITE."
1737-#~ msgstr ""
1738-#~ "さらに 2 つの便利なマクロがある。\n"
1739-#~ "B<IN_MOVE> は IN_MOVED_FROM|IN_MOVED_TO と同じで、\n"
1740-#~ "B<IN_CLOSE> は IN_CLOSE_WRITE|IN_CLOSE_NOWRITE と同じである。"
1741-
1742-#~ msgid "Filesystem containing watched object was unmounted."
1743-#~ msgstr "監視対象オブジェクトを含むファイルシステムがアンマウントされた。"
1744-
1745-#~ msgid ""
1746-#~ "Note that the event queue can overflow. In this case, events are lost. "
1747-#~ "Robust applications should handle the possibility of lost events "
1748-#~ "gracefully."
1749-#~ msgstr ""
1750-#~ "イベントキューは溢れる場合があることに注意すること。この場合にはイベント"
1751-#~ "は\n"
1752-#~ "失われてしまう。堅牢性が必要なアプリケーションでは、イベントが失われる可能"
1753-#~ "性\n"
1754-#~ "を適切に扱う必要がある。"
1755-
1756-#~ msgid ""
1757-#~ "On success, B<inotify_rm_watch>() returns zero, or -1 if an error "
1758-#~ "occurred (in which case, I<errno> is set appropriately)."
1759-#~ msgstr ""
1760-#~ "成功すると、 B<inotify_rm_watch>() は 0 を返す。 エラーの場合、-1 を返"
1761-#~ "し、 I<errno> を適切に設定する。"
1762-
1763-#~ msgid "File moved out of watched directory (*)."
1764-#~ msgstr "ファイルが監視対象ディレクトリ外へ移動された。(*)"
1765-
1766-#~ msgid "File moved into watched directory (*)."
1767-#~ msgstr "ファイルが監視対象ディレクトリ内へ移動された。(*)"
1768-
1769-#~ msgid ""
1770-#~ "The inotify API provides no information about the user or process that "
1771-#~ "triggered the inotify event."
1772-#~ msgstr ""
1773-#~ "inotify API では inotify イベントのきっかけとなったユーザやプロセスに関す"
1774-#~ "る\n"
1775-#~ "情報が提供されない。"
--- a/po4a/memory/po/ja.po
+++ b/po4a/memory/po/ja.po
@@ -7,7 +7,7 @@ msgid ""
77 msgstr ""
88 "Project-Id-Version: PACKAGE VERSION\n"
99 "POT-Creation-Date: 2014-04-27 08:03+0900\n"
10-"PO-Revision-Date: 2014-04-27 08:06+0900\n"
10+"PO-Revision-Date: 2014-04-28 02:47+0900\n"
1111 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1212 "Language-Team: LANGUAGE <LL@li.org>\n"
1313 "Language: \n"
--- a/release/man7/inotify.7
+++ b/release/man7/inotify.7
@@ -53,8 +53,8 @@ inotify \- ファイルシステムイベントを監視する
5353 この API では以下のシステムコールが使用される。
5454 .IP * 3
5555 \fBinotify_init\fP(2) は inotify インスタンスを作成し、inotify インスタンスを参照する ファイルディスクリプタを返す。
56-もっと新しい \fBinotify_init1\fP(2) も \fBinotify_init\fP(2) と同様だが、いくつかの追加の機能を利用するための
57-\fIflags\fP 引き数を持っている。
56+より新しい \fBinotify_init1\fP(2) も \fBinotify_init\fP(2) と同様だが、
57+こちらにはいくつかの追加の機能を利用するための \fIflags\fP 引き数がある。
5858 .IP *
5959 \fBinotify_add_watch\fP(2) は inotify インスタンスに関連づけられた「監視対象 (watch) リスト」を操作する。
6060 監視対象リストの各アイテム ("watch") は、 ファイルまたはディレクトリのパス名と、 そのパス名で参照されるファイルに対して
@@ -62,21 +62,18 @@ inotify \- ファイルシステムイベントを監視する
6262 は新しい監視アイテムの作成や既存の監視対象の変更ができる。 各監視対象は一意の「監視対象ディスクリプタ」を持つ。 これは監視対象を作成したときに
6363 \fBinotify_add_watch\fP(2) から返される整数である。
6464 .IP *
65-When events occur for monitored files and directories, those events are made
66-available to the application as structured data that can be read from the
67-inotify file descriptor using \fBread\fP(2) (see below).
65+監視しているファイルやディレクトリでイベントが起こると、 それらのイベントはアプリケーションから inotify ファイルディスクリプタから
66+\fBread\fP(2) を使って構造化データとして読み出すことができる (下記参照)。
6867 .IP *
6968 \fBinotify_rm_watch\fP(2) は inotify の監視対象リストからアイテムを削除する。
7069 .IP *
7170 inotify インスタンスを指している 全てのファイルディスクリプタが (\fBclose\fP(2) を使って) クローズされた場合、
7271 その下層にあるオブジェクトとそのリソースは、 カーネルで再利用するために解放される。 関連が切られた監視対象は自動的に解放される。
7372
74-With careful programming, an application can use inotify to efficiently
75-monitor and cache the state of a set of filesystem objects. However, robust
76-applications should allow for the fact that bugs in the monitoring logic or
77-races of the kind described below may leave the cache inconsistent with the
78-filesystem state. It is probably wise to to do some consistency checking,
79-and rebuild the cache when inconsistencies are detected.
73+注意深くプログラミングすることで、 アプリケーションは inotify
74+を使ってファイルシステムオブジェクトの集合の状態を効率的に監視しキャッシュしておくことができる。
75+しかしながら、ロバストなアプリケーションでは、監視ロジックのバグや以下に説明があるような種類の競合条件によりファイルシステムの状態とキャッシュが一致しない状態になることがあるという事実も考慮に入れておくべきである。
76+おそらく何らかの一貫性のチェックを行い、不一致が検出された場合にはキャッシュを再構築するのが懸命だろう。
8077 .SS "inotify ファイルディスクリプタからのイベントの読み出し"
8178 どのようなイベントが起こっていたかを知るには、 アプリケーションで inotify ファイルディスクリプタを \fBread\fP(2) すればよい。
8279 これまでに何もイベントが起こっていない場合、 停止 (blocking) モードのファイルディスクリプタであれば、 少なくとも 1
@@ -159,11 +156,9 @@ struct inotify_event {
159156 監視対象ディレクトリ内でファイルやディレクトリが削除された。
160157 .TP
161158 \fBIN_DELETE_SELF\fP
162-Watched file/directory was itself deleted. (This event also occurs if an
163-object is moved to another filesystem, since \fBmv\fP(1) in effect copies the
164-file to the other filesystem and then deletes it from the original
165-filesystem.) In addition, an \fBIN_IGNORED\fP event will subsequently be
166-generated for the watch descriptor.
159+監視対象のファイルやディレクトリ自身が削除あれた。 (このイベントはオブジェクトが別のファイルシステムに移動された場合にも発生する。 \fBmv\fP(1)
160+は実際には別のファイルシステムにファイルをコピーした後、元のファイルシステムからそのファイルを削除するからである。) また、
161+結果的に監視ディスクリプタに対して \fBIN_IGNORED\fP イベントも生成される。
167162 .TP
168163 \fBIN_MODIFY\fP (*)
169164 ファイルが変更された (\fBwrite\fP(2), \fBtruncate\fP(2) など)。
@@ -239,9 +234,8 @@ generated for the watch descriptor.
239234 イベントが生成される。
240235 .RE
241236 .SS 例
242-Suppose an application is watching the directory \fIdir\fP and the file
243-\fIdir/myfile\fP for all events. The examples below show some events that will
244-be generated for these two objects.
237+アプリケーションがディレクトリ \fIdir\fP とファイル \fIdir/myfile\fP のすべてのイベントを監視しているとする。 以下に、これらの 2
238+つのオブジェクトに対して生成されるイベントの例を示す。
245239 .RS 4
246240 .TP
247241 fd = open("dir/myfile", O_RDWR);
@@ -260,9 +254,8 @@ close(fd);
260254 \fIdir\fP と \fIdir/myfile\fP の両方に対して \fBIN_CLOSE_WRITE\fP イベントが生成される
261255 .RE
262256 .PP
263-Suppose an application is watching the directories \fIdir1\fP and \fIdir2\fP, and
264-the file \fIdir1/myfile\fP. The following examples show some events that may
265-be generated.
257+アプリケーションがディレクトリ \fIdir1\fP と \fIdir2\fP、およびファイル \fIdir1/myfile\fP を監視しているとする。
258+以下に生成されるイベントの例を示す。
266259 .RS 4
267260 .TP
268261 link("dir1/myfile", "dir2/new");
@@ -274,32 +267,30 @@ rename("dir1/myfile", "dir2/myfile");
274267 \fBIN_MOVED_TO\fP は同じ \fIcookie\fP 値を持つ。
275268 .RE
276269 .PP
277-Suppose that \fIdir1/xx\fP and \fIdir2/yy\fP are (the only) links to the same
278-file, and an application is watching \fIdir1\fP, \fIdir2\fP, \fIdir1/xx\fP, and
279-\fIdir2/yy\fP. Executing the following calls in the order given below will
280-generate the following events:
270+\fIdir1/xx\fP と \fIdir2/yy\fP は同じファイルを参照するリンクで (他のリンクはないものとする)、 アプリケーションは \fIdir1\fP,
271+\fIdir2\fP, \fIdir1/xx\fP, \fIdir2/yy\fP を監視しているものとする。
272+以下に示す順序で下記の呼び出しを実行すると、以下のイベントが生成される。
281273 .RS 4
282274 .TP
283275 unlink("dir2/yy");
284-Generates an \fBIN_ATTRIB\fP event for \fIxx\fP (because its link count changes)
285-and an \fBIN_DELETE\fP event for \fIdir2\fP.
276+\fIxx\fP に対して \fBIN_ATTRIB\fP イベントが生成され (リンク数が変化したため)、 \fIdir2\fP に対して \fBIN_DELETE\fP
277+イベントが生成される。
286278 .TP
287279 unlink("dir1/xx");
288-Generates \fBIN_ATTRIB\fP, \fBIN_DELETE_SELF\fP, and \fBIN_IGNORED\fP events for
289-\fIxx\fP, and an \fBIN_DELETE\fP event for \fIdir1\fP.
280+\fIxx\fP に対してイベント \fBIN_ATTRIB\fP, \fBIN_DELETE_SELF\fP, \fBIN_IGNORED\fP が生成され、 \fIdir1\fP
281+に対して \fBIN_DELETE\fP イベントが生成される。
290282 .RE
291283 .PP
292-Suppose an application is watching the directory \fIdir\fP and (the empty)
293-directory \fIdir/subdir\fP. The following examples show some events that may
294-be generated.
284+アプリケーションがディレクトリ \fIdir\fP と (空の) ディレクトリ \fIdir/subdir\fP を監視しているものとする。
285+以下に生成されるイベントの例を示す。
295286 .RS 4
296287 .TP
297288 mkdir("dir/new", mode);
298-Generates an \fBIN_CREATE | IN_ISDIR\fP event for \fIdir\fP.
289+\fIdir\fP に対して \fBIN_CREATE | IN_ISDIR\fP イベントが生成される。
299290 .TP
300291 rmdir("dir/subdir");
301-Generates \fBIN_DELETE_SELF\fP and \fBIN_IGNORED\fP events for \fIsubdir\fP, and an
302-\fBIN_DELETE | IN_ISDIR\fP event for \fIdir\fP.
292+\fIsubdir\fP に対してイベント \fBIN_DELETE_SELF\fP と \fBIN_IGNORED\fP が生成され、 \fIdir\fP に対して
293+\fBIN_DELETE | IN_ISDIR\fP イベントが生成される。
303294 .RE
304295 .SS "/proc インターフェース"
305296 以下のインターフェースは、inotify で消費される カーネルメモリの総量を制限するのに使用できる:
@@ -344,23 +335,20 @@ inotify ファイルディスクリプタの読み込みで返されるイベン
344335 inotify API では、inotify イベントが発生するきっかけとなったユーザやプロセスに関する情報は提供されない。とりわけ、inotify
345336 経由でイベントを監視しているプロセスが、自分自身がきっかけとなったイベントと他のプロセスがきっかけとなったイベントを区別する簡単な手段はない。
346337
347-Inotify reports only events that a user\-space program triggers through the
348-filesystem API. As a result, it does not catch remote events that occur on
349-network filesystems. (Applications must fall back to polling the filesystem
350-to catch such events.) Furthermore, various pseudo\-filesystems such as
351-\fI/proc\fP, \fI/sys\fP, and \fI/dev/pts\fP are not monitorable with inotify.
338+inotify は、ファイルシステム API 経由でユーザー空間プログラムがきっかけとなったイベントだけを報告する。 結果として、 inotify
339+はネットワークファイルシステムで発生したリモートのイベントを捉えることはできない
340+(このようなイベントを捉えるにはアプリケーションはファイルシステムをポーリングする必要がある)。 さらに、 \fI/proc\fP, \fI/sys\fP,
341+\fI/dev/pts\fP といったいくつかの疑似ファイルシステムは inotify で監視することができない。
352342
353-The inotify API does not report file accesses and modifications that may
354-occur because of \fBmmap\fP(2) and \fBmsync\fP(2).
343+inotify API は \fBmmap\fP(2) と \fBmsync\fP(2) により起こったファイルのアクセスと変更を報告しない。
355344
356345 inotify API では影響が受けるファイルをファイル名で特定する。
357346 しかしながら、アプリケーションが inotify イベントを処理する時点では、
358347 そのファイル名がすでに削除されたり変更されたりしている可能性がある。
359348
360-The inotify API identifies events via watch descriptors. It is the
361-application's responsibility to cache a mapping (if one is needed) between
362-watch descriptors and pathnames. Be aware that directory renamings may
363-affect multiple cached pathnames.
349+inotify API では監視対象ディスクリプタを通してイベントが区別される。 (必要であれば)
350+監視対象ディスクリプタとパス名のマッピングをキャッシュしておくのはアプリケーションの役目である。
351+ディレクトリの名前変更の場合、キャッシュしている複数のパス名に影響がある点に注意すること。
364352
365353 inotify によるディレクトリの監視は再帰的に行われない: あるディレクトリ以下の
366354 サブディレクトリを監視する場合、 監視対象を追加で作成しなければならない。
@@ -372,50 +360,39 @@ inotify によるディレクトリの監視は再帰的に行われない: あ
372360 を追加した直後にサブディレクトリの内容をスキャンしたいと思う場合もあるだろう (必要ならそのサブディレクトリ内のサブディレクトリに対する watch
373361 も再帰的に追加することもあるだろう)。
374362
375-Note that the event queue can overflow. In this case, events are lost.
376-Robust applications should handle the possibility of lost events
377-gracefully. For example, it may be necessary to rebuild part or all of the
378-application cache. (One simple, but possibly expensive, approach is to
379-close the inotify file descriptor, empty the cache, create a new inotify
380-file descriptor, and then re\-create watches and cache entries for the
381-objects to be monitored.)
363+イベントキューはオーバーフローする場合があることに注意すること。 この場合、イベントは失なわれる。 ロバスト性が求められるアプリケーションでは、
364+イベントが失なわれる可能性も含めて適切に処理を行うべきである。
365+例えば、アプリケーション内のキャッシュの一部分または全てを再構築する必要があるかもしれない。 (単純だが、おそらくコストがかかる方法は、 inotify
366+ファイルディスクリプタをクローズし、 キャッシュを空にし、 新しい inotify ファイルディスクリプタを作成し、
367+監視しているオブジェクトの監視対象ディスクリプタとキャッシュエントリーの再作成を行う方法である。)
382368 .SS "rename() イベントの取り扱い"
383-As noted above, the \fBIN_MOVED_FROM\fP and \fBIN_MOVED_TO\fP event pair that is
384-generated by \fBrename\fP(2) can be matched up via their shared cookie value.
385-However, the task of matching has some challenges.
369+上述の通り、 \fBrename\fP(2) により生成される \fBIN_MOVED_FROM\fP と \fBIN_MOVED_TO\fP イベントの組は、共有される
370+cookie 値によって対応を取ることができる。 しかし、対応を取る場合にはいくつか難しい点がある。
386371
387-These two events are usually consecutive in the event stream available when
388-reading from the inotify file descriptor. However, this is not guaranteed.
389-If multiple processes are triggering events for monitored objects, then (on
390-rare occasions) an arbitrary number of other events may appear between the
391-\fBIN_MOVED_FROM\fP and \fBIN_MOVED_TO\fP events.
372+これらの 2 つのイベントは、 inotify ファイルディスクリプタから読み出しを行った場合に、通常はイベントストリーム内で連続している。
373+しかしながら、連続していることは保証されていない。 複数のプロセスが監視対象オブジェクトでイベントを発生させた場合、 (めったに起こらないことだが)
374+イベント \fBIN_MOVED_FROM\fP と \fBIN_MOVED_TO\fP の間に任意の数の他のイベントがはさまる可能性がある。
392375
393-Matching up the \fBIN_MOVED_FROM\fP and \fBIN_MOVED_TO\fP event pair generated by
394-\fBrename\fP(2) is thus inherently racy. (Don't forget that if an object is
395-renamed outside of a monitored directory, there may not even be an
396-\fBIN_MOVED_TO\fP event.) Heuristic approaches (e.g., assume the events are
397-always consecutive) can be used to ensure a match in most cases, but will
398-inevitably miss some cases, causing the application to perceive the
399-\fBIN_MOVED_FROM\fP and \fBIN_MOVED_TO\fP events as being unrelated. If watch
400-descriptors are destroyed and re\-created as a result, then those watch
401-descriptors will be inconsistent with the watch descriptors in any pending
402-events. (Re\-creating the inotify file descriptor and rebuilding the cache
403-may be useful to deal with this scenario.)
376+したがって、 \fBrename\fP(2) により生成された \fBIN_MOVED_FROM\fP と \fBIN_MOVED_TO\fP
377+のイベントの組の対応を取るのは本質的に難しいことである (監視対象のディレクトリの外へオブジェクトの rename が行われた場合には
378+\fBIN_MOVED_TO\fP イベントは存在しさえしないことを忘れてはならない)。 (イベントは常に連続しているとの仮定を置くといった)
379+発見的な方法を使うと、ほとんどの場合でイベントの組をうまく見つけることができるが、 いくつかの場合に見逃すことが避けられず、 アプリケーションが
380+\fBIN_MOVED_FROM\fP と \fBIN_MOVED_TO\fP イベントが無関係だとみなしてしまう可能性がある。
381+結果的に、監視対象ディスクリプタが破棄され再作成された場合、これらの監視対象ディスクリプタは、処理待ちイベントの監視対象ディスクリプタと一貫性のないものになってしまう
382+(inotify ファイルディスクリプタの再作成とキャッシュの再構成はこの状況に対処するのに有用な方法なのだが)。
404383
405-Applications should also allow for the possibility that the \fBIN_MOVED_FROM\fP
406-event was the last event that could fit in the buffer returned by the
407-current call to \fBread\fP(2), and the accompanying \fBIN_MOVED_TO\fP event might
408-be fetched only on the next \fBread\fP(2).
384+また、アプリケーションは、 \fBIN_MOVED_FROM\fP イベントが今行った \fBread\fP(2)
385+の呼び出しで返されたバッファのちょうど一番最後のイベントで、 \fBIN_MOVED_TO\fP イベントは次の \fBread\fP(2)
386+を行わないと取得できない可能性も考慮に入れる必要がある。
409387 .SH バグ
410388 .\" FIXME kernel commit 611da04f7a31b2208e838be55a42c7a1310ae321
411389 .\" implies that unmount events were buggy 2.6.11 to 2.6.36
412390 .\"
413391 2.6.16 以前のカーネルでは \fBIN_ONESHOT\fP \fImask\fP フラグが働かない。
414392
415-As originally designed and implemented, the \fBIN_ONESHOT\fP flag did not cause
416-an \fBIN_IGNORED\fP event to be generated when the watch was dropped after one
417-event. However, as an unintended effect of other changes, since Linux
418-2.6.36, an \fBIN_IGNORED\fP event is generated in this case.
393+元々は設計/実装時の意図通り、 イベントが一つ発生し watch が削除された際に \fBIN_ONESHOT\fP フラグでは \fBIN_IGNORED\fP
394+イベントが発生しなかった。 しかし、 別の変更での意図していなかった影響により、 Linux 2.6.36 以降では、 この場合に
395+\fBIN_IGNORED\fP イベントが生成される。
419396
420397 .\" commit 1c17d18e3775485bf1e0ce79575eb637a94494a2
421398 カーネル 2.6.25 より前では、 連続する同一のイベントを一つにまとめることを意図したコード (古い方のイベントがまだ読み込まれていない場合に、
--- a/stats/inotify
+++ b/stats/inotify
@@ -1,2 +0,0 @@
1-# pagename,#complete,#remaining,#all
2-inotify.7,133,20,153
--- a/translation_list
+++ b/translation_list
@@ -2074,7 +2074,7 @@
20742074 ○:LDP man-pages:3.65:2012/08/05:hier:7:2014/04/24::nakano@apm.seikei.ac.jp:NAKANO Takeo:
20752075 ○:LDP man-pages:3.65:2010/11/07:hostname:7:2014/04/24::amotoki@gmail.com:Akihiro MOTOKI:
20762076 ○:LDP man-pages:3.65:2012/05/10:icmp:7:2014/04/24::amotoki@gmail.com:Akihiro MOTOKI:
2077-☆:LDP man-pages:3.63=>3.65:2014/04/01:inotify:7:2014/04/14::amotoki@gmail.com:Akihiro MOTOKI:
2077+○:LDP man-pages:3.65:2014/04/01:inotify:7:2014/04/28::amotoki@gmail.com:Akihiro MOTOKI:
20782078 ○:LDP man-pages:3.65:2007/10/23:intro:7:2014/04/24::amotoki@dd.iij4u.or.jp:Akihiro MOTOKI:
20792079 ○:LDP man-pages:3.65:2013/09/17:ip:7:2014/04/24::amotoki@gmail.com:Akihiro MOTOKI:
20802080 ○:LDP man-pages:3.65:2012/12/16:ipv6:7:2014/04/24::amotoki@gmail.com:Akihiro MOTOKI:
--- a/untrans.html
+++ b/untrans.html
@@ -15,8 +15,6 @@
1515 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>filesystem</B></TD></TR>
1616 <TR class="over80"><TD>spu_create.2</TD><TD>13/78</TD><TD>83.33</TD></TR>
1717 <TR class="over70"><TD>spufs.7</TD><TD>41/159</TD><TD>74.21</TD></TR>
18-<TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>inotify</B></TD></TR>
19-<TR class="over80"><TD>inotify.7</TD><TD>20/153</TD><TD>86.93</TD></TR>
2018 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>intro</B></TD></TR>
2119 <TR class="over80"><TD>proc.5</TD><TD>78/966</TD><TD>91.93</TD></TR>
2220 <TR><TD ALIGN="center" COLSPAN=3 BGCOLOR="Yellow"><B>keyutils</B></TD></TR>
@@ -81,6 +79,6 @@
8179 <TR class="over70"><TD>futimesat.2</TD><TD>10/37</TD><TD>72.97</TD></TR>
8280 <TR><TD>utimensat.2</TD><TD>49/107</TD><TD>54.21</TD></TR>
8381 <TR class="over80"><TD>zdump.8</TD><TD>1/22</TD><TD>95.45</TD></TR>
84-<TR><TD COLSPAN=3>Total 53 pages</TD></TR>
82+<TR><TD COLSPAN=3>Total 52 pages</TD></TR>
8583 </TABLE>
8684 </BODY></HTML>