OSDN Git Service

(split) Import translated manuals from JM CVS Repository.
[linuxjm/LDP_man-pages.git] / draft / man2 / inotify_init.2
1 .\" man2/inotify_init.2 - inotify_init man page
2 .\"
3 .\" Copyright (C) 2005 Robert Love
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .\" USA.
24 .\"
25 .\" 2005-07-19 Robert Love <rlove@rlove.org> - initial version
26 .\" 2006-02-07 mtk, minor changes
27 .\" 2008-10-10 mtk: add description of inotify_init1()
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 .\" Updated 2008-11-10, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.12
33 .\"
34 .TH INOTIFY_INIT 2 2008-10-10 "Linux" "Linux Programmer's Manual"
35 .\"O .SH NAME
36 .SH Ì¾Á°
37 .\"O inotify_init, inotify_init1 \- initialize an inotify instance
38 inotify_init, inotify_init1 \- inotify ¥¤¥ó¥¹¥¿¥ó¥¹¤ò½é´ü²½¤¹¤ë
39 .\"O .SH SYNOPSIS
40 .SH ½ñ¼°
41 .nf
42 .B #include <sys/inotify.h>
43 .sp
44 .B "int inotify_init(void);"
45 .BI "int inotify_init1(int " flags );
46 .fi
47 .\"O .SH DESCRIPTION
48 .SH ÀâÌÀ
49 .\"O .BR inotify_init ()
50 .\"O initializes a new inotify instance and returns a file descriptor associated
51 .\"O with a new inotify event queue.
52 .BR inotify_init ()
53 ¤Ï¡¢¿·µ¬¤Î inotify ¥¤¥ó¥¹¥¿¥ó¥¹¤ò½é´ü²½¤·¡¢ºîÀ®¤µ¤ì¤¿ inotify ¥¤¥Ù¥ó¥È¥­¥å¡¼
54 ¤ËÂбþ¤¹¤ë¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
55
56 .\"O If
57 .\"O .I flags
58 .\"O is 0, then
59 .\"O .BR inotify_init1 ()
60 .\"O is the same as
61 .\"O .BR inotify_init ().
62 .\"O The following values can be bitwise ORed in
63 .\"O .IR flags
64 .\"O to obtain different behavior:
65 .BR inotify_init1 ()
66 ¤Ï¡¢
67 .I flags
68 ¤¬ 0 ¤Î¾ì¹ç¡¢
69 .BR inotify_init ()
70 ¤ÈƱ¤¸¤Ç¤¢¤ë¡£
71 .I flags
72 ¤Ë°Ê²¼¤ÎÃͤò¥Ó¥Ã¥ÈËè¤ÎÏÀÍýÏ (OR) ¤Ç»ØÄꤹ¤ë¤³¤È¤Ç¡¢
73 °Û¤Ê¤ëÆ°ºî¤ò¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
74 .TP 12
75 .B IN_NONBLOCK
76 .\"O Set the
77 .\"O .BR O_NONBLOCK
78 .\"O file status flag on the new open file description.
79 .\"O Using this flag saves extra calls to
80 .\"O .BR fcntl (2)
81 .\"O to achieve the same result.
82 ¿·¤·¤¯À¸À®¤µ¤ì¤ë¥ª¡¼¥×¥ó¥Õ¥¡¥¤¥ëµ­½Ò (open file description) ¤Î
83 BR O_NONBLOCK
84 ¥Õ¥¡¥¤¥ë¥¹¥Æ¡¼¥¿¥¹¥Õ¥é¥°¤ò¥»¥Ã¥È¤¹¤ë¡£
85 ¤³¤Î¥Õ¥é¥°¤ò»È¤¦¤³¤È¤Ç¡¢
86 .B O_NONBLOCK
87 ¤ò¥»¥Ã¥È¤¹¤ë¤¿¤á¤Ë
88 .BR fcntl (2)
89 ¤òÄɲäǸƤӽФ¹É¬Íפ¬¤Ê¤¯¤Ê¤ë¡£
90 .TP
91 .B IN_CLOEXEC
92 .\"O Set the close-on-exec
93 .\"O .RB ( FD_CLOEXEC )
94 .\"O flag on the new file descriptor.
95 .\"O See the description of the
96 .\"O .B O_CLOEXEC
97 .\"O flag in
98 .\"O .BR open (2)
99 .\"O for reasons why this may be useful.
100 ¿·¤·¤¤¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¡¼¤ËÂФ·¤Æ
101 close-on-exec
102 .RB ( FD_CLOEXEC )
103 ¥Õ¥é¥°¤ò¥»¥Ã¥È¤¹¤ë¡£
104 ¤³¤Î¥Õ¥é¥°¤¬Ìò¤ËΩ¤ÄÍýͳ¤Ë¤Ä¤¤¤Æ¤Ï¡¢
105 .BR open (2)
106 ¤Î
107 .B O_CLOEXEC
108 ¥Õ¥é¥°¤ÎÀâÌÀ¤ò»²¾È¤Î¤³¤È¡£
109 .\"O .SH "RETURN VALUE"
110 .SH ÊÖ¤êÃÍ
111 .\"O On success, these system calls return a new file descriptor.
112 .\"O On error, \-1 is returned, and
113 .\"O .I errno
114 .\"O is set to indicate the error.
115 À®¸ù¤¹¤ë¤È¡¢¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï¿·¤·¤¤¥Õ¥¡¥¤¥ë¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
116 ¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
117 .I errno
118 ¤ò¥¨¥é¡¼¤ò¼¨¤¹ÃͤËÀßÄꤹ¤ë¡£
119 .\"O .SH ERRORS
120 .SH ¥¨¥é¡¼
121 .TP
122 .B EINVAL
123 .\"O .RB ( inotify_init1 ())
124 .\"O An invalid value was specified in
125 .\"O .IR flags .
126 .RB ( inotify_init1 ())
127 ̵¸ú¤ÊÃͤ¬
128 .I flags
129 ¤Ë»ØÄꤵ¤ì¤¿¡£
130 .TP
131 .B EMFILE
132 .\"O The user limit on the total number of inotify instances has been reached.
133 inotify ¥¤¥ó¥¹¥¿¥ó¥¹¤ÎÁí¿ô¤¬¥æ¡¼¥¶Ã±°Ì¤Î¾å¸Â¤Ë㤷¤Æ¤¤¤¿¡£
134 .TP
135 .B ENFILE
136 .\"O The system limit on the total number of file descriptors has been reached.
137 inotify ¥¤¥ó¥¹¥¿¥ó¥¹¤ÎÁí¿ô¤¬¥·¥¹¥Æ¥à¤Î¾å¸Â¤Ë㤷¤Æ¤¤¤¿¡£
138 .TP
139 .B ENOMEM
140 .\"O Insufficient kernel memory is available.
141 ¥«¡¼¥Í¥ë¥á¥â¥ê¤¬½½Ê¬¤Ë¤Ê¤«¤Ã¤¿¡£
142 .\"O .SH VERSIONS
143 .SH ¥Ð¡¼¥¸¥ç¥ó
144 .\"O .BR inotify_init ()
145 .\"O first appeared in Linux 2.6.13.
146 .\"O .BR inotify_init1 ()
147 .\"O was added in Linux 2.6.27.
148 .BR inotify_init ()
149 ¤Ï Linux 2.6.13 ¤Ç½é¤á¤ÆÅо줷¤¿¡£
150 .BR inotify_init1 ()
151 ¤Ï Linux 2.6.27 ¤ÇÄɲ䵤줿¡£
152 .\"O .SH "CONFORMING TO"
153 .SH ½àµò
154 .\"O These system calls are Linux-specific.
155 ¤³¤ì¤é¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï Linux Æȼ«¤Ç¤¢¤ë¡£
156 .\"O .SH "SEE ALSO"
157 .SH ´ØÏ¢¹àÌÜ
158 .BR inotify_add_watch (2),
159 .BR inotify_rm_watch (2),
160 .BR inotify (7)