OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man2 / inotify_add_watch.2
index e00b88a..1638e71 100644 (file)
 .\" 2005-07-19 Robert Love <rlove@rlove.org> - initial version
 .\" 2006-02-07 mtk, various changes
 .\"
-.\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI
-.\"         all rights reserved.
-.\" Translated 2006-08-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.39
+.\"*******************************************************************
 .\"
-.TH INOTIFY_ADD_WATCH 2 2006-02-07 "Linux" "Linux Programmer's Manual"
-.\"O .SH NAME
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH INOTIFY_ADD_WATCH 2 2010\-10\-20 Linux "Linux Programmer's Manual"
 .SH 名前
-.\"O inotify_add_watch \- add a watch to an initialized inotify instance
 inotify_add_watch \- 初期化済み inotify インスタンスに監視対象を追加する
-.\"O .SH SYNOPSIS
 .SH 書式
-.B #include <sys/inotify.h>
+\fB#include <sys/inotify.h>\fP
 .sp
-.BI "int inotify_add_watch(int " fd ", const char *" pathname ", uint32_t " mask );
-.\"O .SH DESCRIPTION
+\fBint inotify_add_watch(int \fP\fIfd\fP\fB, const char *\fP\fIpathname\fP\fB, uint32_t
+\fP\fImask\fP\fB);\fP
 .SH 説明
-.\"O .BR inotify_add_watch ()
-.\"O adds a new watch, or modifies an existing watch,
-.\"O for the file whose location is specified in
-.\"O .IR pathname ;
-.\"O the caller must have read permission for this file.
-.\"O The
-.\"O .I fd
-.\"O argument is a file descriptor referring to the
-.\"O inotify instance whose watch list is to be modified.
-.BR inotify_add_watch ()
-は、
-.I pathname
-で指定された位置にあるファイルを監視する監視アイテム (watch) の新規追加、
-または既存の監視アイテムの変更を行う。
-呼び出し元は、監視対象のファイルに対する読み出し許可を
-持っていなければならない。
-.I fd
-引き数は、変更を行う監視対象リスト (watch list) を持つ inotify
-インスタンスを参照するファイルディスクリプタである。
-.\"O The events to be monitored for
-.\"O .I pathname
-.\"O are specified in the
-.\"O .I mask
-.\"O bit-mask argument.
-.\"O See
-.\"O .BR inotify (7)
-.\"O for a description of the bits that can be set in
-.\"O .IR mask .
-.I pathname
-のどのイベントを監視するかは、引き数のビットマスク
-.I mask
-で指定する。
-.I mask
-に設定できるビットの説明については
-.BR inotify (7)
-を参照のこと。
+\fBinotify_add_watch\fP()  は、 \fIpathname\fP で指定された位置にあるファイルを監視する監視アイテム (watch)
+の新規追加、 または既存の監視アイテムの変更を行う。 呼び出し元は、監視対象のファイルに対する読み出し許可を 持っていなければならない。 \fIfd\fP
+引き数は、変更を行う監視対象リスト (watch list) を持つ inotify インスタンスを参照するファイルディスクリプタである。
+\fIpathname\fP のどのイベントを監視するかは、引き数のビットマスク \fImask\fP で指定する。 \fImask\fP
+に設定できるビットの説明については \fBinotify\fP(7)  を参照のこと。
 
-.\"O A successful call to
-.\"O .BR inotify_add_watch ()
-.\"O returns the unique watch descriptor associated with
-.\"O .I pathname
-.\"O for this inotify instance.
-.\"O If
-.\"O .I pathname
-.\"O was not previously being watched by this inotify instance,
-.\"O then the watch descriptor is newly allocated.
-.\"O If
-.\"O .I pathname
-.\"O was already being watched, then the descriptor
-.\"O for the existing watch is returned.
-.BR inotify_add_watch ()
-の呼び出しが成功すると、変更対象の inotify インスタンスで
-.I pathname
-に対応付けられる一意な監視対象ディスクリプタ (watch descriptor) を返す。
-.I pathname
-がその inotify インスタンスに追加されていなければ、
-監視対象ディスクリプタが新規に割り当てられる。
-.I pathname
-がすでに監視対象になっていれば、既存の監視アイテムに対する
-ディスクリプタが返される。
+\fBinotify_add_watch\fP()  の呼び出しが成功すると、変更対象の inotify インスタンスで \fIpathname\fP
+に対応付けられる一意な監視対象ディスクリプタ (watch descriptor) を返す。 \fIpathname\fP がその inotify
+インスタンスに追加されていなければ、 監視対象ディスクリプタが新規に割り当てられる。 \fIpathname\fP
+がすでに監視対象になっていれば、既存の監視アイテムに対する ディスクリプタが返される。
 
-.\"O The watch descriptor is returned by later
-.\"O .BR read (2)s
-.\"O from the inotify file descriptor.
-.\"O These reads fetch
-.\"O .I inotify_event
-.\"O structures (see
-.\"O .BR inotify (7))
-.\"O indicating file system events;
-.\"O the watch descriptor inside this structure identifies
-.\"O the object for which the event occurred.
-これ以降に inotify ファイルディスクリプタから
-.BR read (2)
-を行うと、監視対象ディスクリプタが返される。
-これらの
-.BR read ()
-を行うと、ファイルシステムイベントを示す
-.I inotify_event
-構造体が読み出される
-.RB ( inotify (7)
-参照)。この構造体内の監視対象ディスクリプタにより、
-どのオブジェクトでそのイベントが発生したかを特定できる。
-.\"O .SH "RETURN VALUE"
+これ以降に inotify ファイルディスクリプタから \fBread\fP(2)  を行うと、監視対象ディスクリプタが返される。 これらの
+\fBread\fP()  を行うと、ファイルシステムイベントを示す \fIinotify_event\fP 構造体が読み出される (\fBinotify\fP(7)
+参照)。この構造体内の監視対象ディスクリプタにより、 どのオブジェクトでそのイベントが発生したかを特定できる。
 .SH 返り値
-.\"O On success,
-.\"O .BR inotify_add_watch ()
-.\"O returns a nonnegative watch descriptor.
-.\"O On error \-1 is returned and
-.\"O .I errno
-.\"O is set appropriately.
-成功すると、
-.BR inotify_add_watch ()
-は非負の監視対象ディスクリプタを返す。
-エラーの場合、\-1 を返し、
-.I errno
+成功すると、 \fBinotify_add_watch\fP()  は非負の監視対象ディスクリプタを返す。 エラーの場合、\-1 を返し、 \fIerrno\fP
 を適切に設定する。
-.\"O .SH ERRORS
 .SH エラー
-.TP
-.B EACCES
-.\"O Read access to the given file is not permitted.
+.TP 
+\fBEACCES\fP
 指定されたファイルに対する読み出しアクセスが許可されていない。
-.TP
-.B EBADF
-.\"O The given file descriptor is not valid.
+.TP 
+\fBEBADF\fP
 指定されたファイルディスクリプタが有効ではない。
-.TP
-.B EFAULT
-.\"O .I pathname
-.\"O points outside of the process's accessible address space.
-.I pathname
-が指すアドレスがプロセスがアクセスできるアドレス空間外である。
-.TP
-.B EINVAL
-.\"O The given event mask contains no valid events; or
-.\"O .I fd
-.\"O is not an inotify file descriptor.
-指定されたイベントマスクに有効なイベントが含まれていない。
-もしくは
-.I fd
-が inotify ファイルディスクリプタではない。
-.TP
-.B ENOMEM
-.\"O Insufficient kernel memory was available.
+.TP 
+\fBEFAULT\fP
+\fIpathname\fP が指すアドレスがプロセスがアクセスできるアドレス空間外である。
+.TP 
+\fBEINVAL\fP
+指定されたイベントマスクに有効なイベントが含まれていない。 もしくは \fIfd\fP が inotify ファイルディスクリプタではない。
+.TP 
+\fBENOENT\fP
+\fIpathname\fP のディレクトリ部分の構成要素が、存在しないか、
+リンク切れのシンボリックリンクである。
+.TP 
+\fBENOMEM\fP
 カーネルメモリが十分になかった。
-.TP
-.B ENOSPC
-.\"O The user limit on the total number of inotify watches was reached or the
-.\"O kernel failed to allocate a needed resource.
-inotify 監視対象の総数がユーザが追加できる上限に達していた。
-もしくは、必要な資源の割り当てにカーネルが失敗した。
-.\"O .SH VERSIONS
+.TP 
+\fBENOSPC\fP
+inotify 監視対象の総数がユーザが追加できる上限に達していた。 もしくは、必要な資源の割り当てにカーネルが失敗した。
 .SH バージョン
-.\"O Inotify was merged into the 2.6.13 Linux kernel.
 inotify は Linux カーネル 2.6.13 に組み込まれた。
-.\"O .SH "CONFORMING TO"
 .SH 準拠
-.\"O This system call is Linux-specific.
 このシステムコールは Linux 独自である。
-.\"O .SH "SEE ALSO"
 .SH 関連項目
-.BR inotify_init (2),
-.BR inotify_rm_watch (2),
-.BR inotify (7)
+\fBinotify_init\fP(2), \fBinotify_rm_watch\fP(2), \fBinotify\fP(7)