OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / 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 .\"*******************************************************************
30 .\"
31 .\" This file was generated with po4a. Translate the source file.
32 .\"
33 .\"*******************************************************************
34 .TH INOTIFY_INIT 2 2008\-10\-10 Linux "Linux Programmer's Manual"
35 .SH 名前
36 inotify_init, inotify_init1 \- inotify インスタンスを初期化する
37 .SH 書式
38 .nf
39 \fB#include <sys/inotify.h>\fP
40 .sp
41 \fBint inotify_init(void);\fP
42 \fBint inotify_init1(int \fP\fIflags\fP\fB);\fP
43 .fi
44 .SH 説明
45 \fBinotify_init\fP()  は、新規の inotify インスタンスを初期化し、作成された inotify イベントキュー
46 に対応するファイルディスクリプタを返す。
47
48 \fBinotify_init1\fP()  は、 \fIflags\fP が 0 の場合、 \fBinotify_init\fP()  と同じである。 \fIflags\fP
49 に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることができる。
50 .TP  12
51 \fBIN_NONBLOCK\fP
52 新しく生成されるオープンファイル記述 (open file description) の BR O_NONBLOCK
53 ファイルステータスフラグをセットする。 このフラグを使うことで、 \fBO_NONBLOCK\fP をセットするために \fBfcntl\fP(2)
54 を追加で呼び出す必要がなくなる。
55 .TP 
56 \fBIN_CLOEXEC\fP
57 新しいファイル・ディスクリプターに対して close\-on\-exec (\fBFD_CLOEXEC\fP)  フラグをセットする。
58 このフラグが役に立つ理由については、 \fBopen\fP(2)  の \fBO_CLOEXEC\fP フラグの説明を参照のこと。
59 .SH 返り値
60 成功すると、これらのシステムコールは新しいファイルディスクリプタを返す。 エラーの場合、\-1 を返し、 \fIerrno\fP をエラーを示す値に設定する。
61 .SH エラー
62 .TP 
63 \fBEINVAL\fP
64 (\fBinotify_init1\fP())  無効な値が \fIflags\fP に指定された。
65 .TP 
66 \fBEMFILE\fP
67 inotify インスタンスの総数がユーザ単位の上限に達していた。
68 .TP 
69 \fBENFILE\fP
70 inotify インスタンスの総数がシステムの上限に達していた。
71 .TP 
72 \fBENOMEM\fP
73 カーネルメモリが十分になかった。
74 .SH バージョン
75 \fBinotify_init\fP()  は Linux 2.6.13 で初めて登場した。 \fBinotify_init1\fP()  は Linux
76 2.6.27 で追加された。
77 .SH 準拠
78 これらのシステムコールは Linux 独自である。
79 .SH 関連項目
80 \fBinotify_add_watch\fP(2), \fBinotify_rm_watch\fP(2), \fBinotify\fP(7)