File: inotify_add_watch.2

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (120 lines) | stat: -rw-r--r-- 3,760 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
.\" man2/inotify_add_watch.2 - inotify_add_watch man page
.\"
.\" Copyright (C) 2005 Robert Love
.\" and Copyright, 2006 Michael Kerrisk
.\"
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" the License, or (at your option) any later version.
.\"
.\" The GNU General Public License's references to "object code"
.\" and "executables" are to be interpreted as the output of any
.\" document formatting or typesetting system, including
.\" intermediate and printed output.
.\"
.\" This manual is distributed in the hope that it will be useful,
.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
.\" License along with this manual; if not, write to the Free
.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
.\" USA.
.\"
.\" 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"
.SH ̾
inotify_add_watch \- Ѥ inotify 󥹥󥹤˴ƻоݤɲä
.SH 
.B #include <sys/inotify.h>
.sp
.BI "int inotify_add_watch(int " fd ", const char *" pathname ", uint32_t " mask );
.SH 
.BR inotify_add_watch ()
ϡ
.I pathname
ǻꤵ줿֤ˤեƻ뤹ƻ륢ƥ (watch) οɲá
ޤϴ¸δƻ륢ƥѹԤ
ƤӽФϡƻоݤΥեФɤ߽ФĤ
äƤʤФʤʤ
.I fd
ϡѹԤƻоݥꥹ (watch list)  inotify
󥹥󥹤򻲾ȤեǥץǤ롣
.I pathname
ΤɤΥ٥Ȥƻ뤹뤫ϡΥӥåȥޥ
.I mask
ǻꤹ롣
.I mask
ǤӥåȤˤĤƤ
.BR inotify (7)
򻲾ȤΤȡ

.BR inotify_add_watch ()
θƤӽФȡѹоݤ inotify 󥹥󥹤
.I pathname
бդդʴƻоݥǥץ (watch descriptor) ֤
.I pathname
 inotify 󥹥󥹤ɲäƤʤС
ƻоݥǥץ˳Ƥ롣
.I pathname
Ǥ˴ƻоݤˤʤäƤС¸δƻ륢ƥФ
ǥץ֤롣

ʹߤ inotify եǥץ
.BR read (2)
Ԥȡƻоݥǥץ֤롣

.BR read ()
Ԥȡե륷ƥ।٥Ȥ򼨤
.I inotify_event
¤Τɤ߽Ф
.RB ( inotify (7)
)ι¤δƻоݥǥץˤꡢ
ɤΥ֥ȤǤΥ٥ȤȯǤ롣
.SH ֤
ȡ
.BR inotify_add_watch ()
δƻоݥǥץ֤
顼ξ硢\-1 ֤
.I errno
Ŭڤꤹ롣
.SH 顼
.TP
.B EACCES
ꤵ줿եФɤ߽ФĤƤʤ
.TP
.B EBADF
ꤵ줿եǥץͭǤϤʤ
.TP
.B EFAULT
.I pathname
ؤɥ쥹ץǤ륢ɥ쥹ֳǤ롣
.TP
.B EINVAL
ꤵ줿٥ȥޥͭʥ٥ȤޤޤƤʤ
.I fd
 inotify եǥץǤϤʤ
.TP
.B ENOMEM
꤬ͥʬˤʤä
.TP
.B ENOSPC
inotify ƻоݤ桼ɲäǤ¤ãƤ
⤷ϡɬפʻ񸻤γƤ˥ͥ뤬Ԥ
.SH С
inotify  Linux ͥ 2.6.13 Ȥ߹ޤ줿
.SH 
Υƥॳ Linux ȼǤ롣
.SH Ϣ
.BR inotify_init (2),
.BR inotify_rm_watch (2),
.BR inotify (7)