OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / release / man2 / inotify_add_watch.2
1 .\" man2/inotify_add_watch.2 - inotify_add_watch man page
2 .\"
3 .\" Copyright (C) 2005 Robert Love
4 .\" and Copyright, 2006 Michael Kerrisk
5 .\"
6 .\" This is free documentation; you can redistribute it and/or
7 .\" modify it under the terms of the GNU General Public License as
8 .\" published by the Free Software Foundation; either version 2 of
9 .\" the License, or (at your option) any later version.
10 .\"
11 .\" The GNU General Public License's references to "object code"
12 .\" and "executables" are to be interpreted as the output of any
13 .\" document formatting or typesetting system, including
14 .\" intermediate and printed output.
15 .\"
16 .\" This manual is distributed in the hope that it will be useful,
17 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
18 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 .\" GNU General Public License for more details.
20 .\"
21 .\" You should have received a copy of the GNU General Public
22 .\" License along with this manual; if not, write to the Free
23 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
24 .\" USA.
25 .\"
26 .\" 2005-07-19 Robert Love <rlove@rlove.org> - initial version
27 .\" 2006-02-07 mtk, various changes
28 .\"
29 .\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI
30 .\"         all rights reserved.
31 .\" Translated 2006-08-15, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.39
32 .\"
33 .TH INOTIFY_ADD_WATCH 2 2006-02-07 "Linux" "Linux Programmer's Manual"
34 .SH Ì¾Á°
35 inotify_add_watch \- ½é´ü²½ºÑ¤ß inotify ¥¤¥ó¥¹¥¿¥ó¥¹¤Ë´Æ»ëÂоݤòÄɲ乤ë
36 .SH ½ñ¼°
37 .B #include <sys/inotify.h>
38 .sp
39 .BI "int inotify_add_watch(int " fd ", const char *" pathname ", uint32_t " mask );
40 .SH ÀâÌÀ
41 .BR inotify_add_watch ()
42 ¤Ï¡¢
43 .I pathname
44 ¤Ç»ØÄꤵ¤ì¤¿°ÌÃ֤ˤ¢¤ë¥Õ¥¡¥¤¥ë¤ò´Æ»ë¤¹¤ë´Æ»ë¥¢¥¤¥Æ¥à (watch) ¤Î¿·µ¬Äɲá¢
45 ¤Þ¤¿¤Ï´û¸¤Î´Æ»ë¥¢¥¤¥Æ¥à¤ÎÊѹ¹¤ò¹Ô¤¦¡£
46 ¸Æ¤Ó½Ð¤·¸µ¤Ï¡¢´Æ»ëÂоݤΥե¡¥¤¥ë¤ËÂФ¹¤ëÆɤ߽Ф·µö²Ä¤ò
47 »ý¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
48 .I fd
49 °ú¤­¿ô¤Ï¡¢Êѹ¹¤ò¹Ô¤¦´Æ»ëÂоݥꥹ¥È (watch list) ¤ò»ý¤Ä inotify
50 ¥¤¥ó¥¹¥¿¥ó¥¹¤ò»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤¢¤ë¡£
51 .I pathname
52 ¤Î¤É¤Î¥¤¥Ù¥ó¥È¤ò´Æ»ë¤¹¤ë¤«¤Ï¡¢°ú¤­¿ô¤Î¥Ó¥Ã¥È¥Þ¥¹¥¯
53 .I mask
54 ¤Ç»ØÄꤹ¤ë¡£
55 .I mask
56 ¤ËÀßÄê¤Ç¤­¤ë¥Ó¥Ã¥È¤ÎÀâÌÀ¤Ë¤Ä¤¤¤Æ¤Ï
57 .BR inotify (7)
58 ¤ò»²¾È¤Î¤³¤È¡£
59
60 .BR inotify_add_watch ()
61 ¤Î¸Æ¤Ó½Ð¤·¤¬À®¸ù¤¹¤ë¤È¡¢Êѹ¹ÂоݤΠinotify ¥¤¥ó¥¹¥¿¥ó¥¹¤Ç
62 .I pathname
63 ¤ËÂбþÉÕ¤±¤é¤ì¤ë°ì°Õ¤Ê´Æ»ëÂоݥǥ£¥¹¥¯¥ê¥×¥¿ (watch descriptor) ¤òÊÖ¤¹¡£
64 .I pathname
65 ¤¬¤½¤Î inotify ¥¤¥ó¥¹¥¿¥ó¥¹¤ËÄɲ䵤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¡¢
66 ´Æ»ëÂоݥǥ£¥¹¥¯¥ê¥×¥¿¤¬¿·µ¬¤Ë³ä¤êÅö¤Æ¤é¤ì¤ë¡£
67 .I pathname
68 ¤¬¤¹¤Ç¤Ë´Æ»ëÂоݤˤʤäƤ¤¤ì¤Ð¡¢´û¸¤Î´Æ»ë¥¢¥¤¥Æ¥à¤ËÂФ¹¤ë
69 ¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬ÊÖ¤µ¤ì¤ë¡£
70
71 ¤³¤ì°Ê¹ß¤Ë inotify ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤«¤é
72 .BR read (2)
73 ¤ò¹Ô¤¦¤È¡¢´Æ»ëÂоݥǥ£¥¹¥¯¥ê¥×¥¿¤¬ÊÖ¤µ¤ì¤ë¡£
74 ¤³¤ì¤é¤Î
75 .BR read ()
76 ¤ò¹Ô¤¦¤È¡¢¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¥¤¥Ù¥ó¥È¤ò¼¨¤¹
77 .I inotify_event
78 ¹½Â¤ÂΤ¬Æɤ߽Фµ¤ì¤ë
79 .RB ( inotify (7)
80 »²¾È)¡£¤³¤Î¹½Â¤ÂÎÆâ¤Î´Æ»ëÂоݥǥ£¥¹¥¯¥ê¥×¥¿¤Ë¤è¤ê¡¢
81 ¤É¤Î¥ª¥Ö¥¸¥§¥¯¥È¤Ç¤½¤Î¥¤¥Ù¥ó¥È¤¬È¯À¸¤·¤¿¤«¤òÆÃÄê¤Ç¤­¤ë¡£
82 .SH ÊÖ¤êÃÍ
83 À®¸ù¤¹¤ë¤È¡¢
84 .BR inotify_add_watch ()
85 ¤ÏÈóÉé¤Î´Æ»ëÂоݥǥ£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
86 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
87 .I errno
88 ¤òŬÀÚ¤ËÀßÄꤹ¤ë¡£
89 .SH ¥¨¥é¡¼
90 .TP
91 .B EACCES
92 »ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ëÆɤ߽Ф·¥¢¥¯¥»¥¹¤¬µö²Ä¤µ¤ì¤Æ¤¤¤Ê¤¤¡£
93 .TP
94 .B EBADF
95 »ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤¬Í­¸ú¤Ç¤Ï¤Ê¤¤¡£
96 .TP
97 .B EFAULT
98 .I pathname
99 ¤¬»Ø¤¹¥¢¥É¥ì¥¹¤¬¥×¥í¥»¥¹¤¬¥¢¥¯¥»¥¹¤Ç¤­¤ë¥¢¥É¥ì¥¹¶õ´Ö³°¤Ç¤¢¤ë¡£
100 .TP
101 .B EINVAL
102 »ØÄꤵ¤ì¤¿¥¤¥Ù¥ó¥È¥Þ¥¹¥¯¤ËÍ­¸ú¤Ê¥¤¥Ù¥ó¥È¤¬´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¡£
103 ¤â¤·¤¯¤Ï
104 .I fd
105 ¤¬ inotify ¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤Ç¤Ï¤Ê¤¤¡£
106 .TP
107 .B ENOMEM
108 ¥«¡¼¥Í¥ë¥á¥â¥ê¤¬½½Ê¬¤Ë¤Ê¤«¤Ã¤¿¡£
109 .TP
110 .B ENOSPC
111 inotify ´Æ»ëÂоݤÎÁí¿ô¤¬¥æ¡¼¥¶¤¬ÄɲäǤ­¤ë¾å¸Â¤Ë㤷¤Æ¤¤¤¿¡£
112 ¤â¤·¤¯¤Ï¡¢É¬Íפʻñ¸»¤Î³ä¤êÅö¤Æ¤Ë¥«¡¼¥Í¥ë¤¬¼ºÇÔ¤·¤¿¡£
113 .SH ¥Ð¡¼¥¸¥ç¥ó
114 inotify ¤Ï Linux ¥«¡¼¥Í¥ë 2.6.13 ¤ËÁȤ߹þ¤Þ¤ì¤¿¡£
115 .SH ½àµò
116 ¤³¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux Æȼ«¤Ç¤¢¤ë¡£
117 .SH ´ØÏ¢¹àÌÜ
118 .BR inotify_init (2),
119 .BR inotify_rm_watch (2),
120 .BR inotify (7)