OSDN Git Service

9e23183696b289dc4fc80898d252a94ab651751b
[linuxjm/LDP_man-pages.git] / draft / man2 / inotify_init.2
1 .\" Copyright (C) 2005 Robert Love
2 .\"
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
8 .\"
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
13 .\"
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 .\" GNU General Public License for more details.
18 .\"
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
22 .\" %%%LICENSE_END
23 .\"
24 .\" 2005-07-19 Robert Love <rlove@rlove.org> - initial version
25 .\" 2006-02-07 mtk, minor changes
26 .\" 2008-10-10 mtk: add description of inotify_init1()
27 .\"
28 .\"*******************************************************************
29 .\"
30 .\" This file was generated with po4a. Translate the source file.
31 .\"
32 .\"*******************************************************************
33 .TH INOTIFY_INIT 2 2012\-05\-04 Linux "Linux Programmer's Manual"
34 .SH 名前
35 inotify_init, inotify_init1 \- inotify インスタンスを初期化する
36 .SH 書式
37 .nf
38 \fB#include <sys/inotify.h>\fP
39 .sp
40 \fBint inotify_init(void);\fP
41 \fBint inotify_init1(int \fP\fIflags\fP\fB);\fP
42 .fi
43 .SH 説明
44 \fBinotify_init\fP()  は、新規の inotify インスタンスを初期化し、作成された inotify イベントキュー
45 に対応するファイルディスクリプタを返す。
46
47 \fBinotify_init1\fP()  は、 \fIflags\fP が 0 の場合、 \fBinotify_init\fP()  と同じである。 \fIflags\fP
48 に以下の値をビット毎の論理和 (OR) で指定することで、 異なる動作をさせることができる。
49 .TP  12
50 \fBIN_NONBLOCK\fP
51 新しく生成されるオープンファイル記述 (open file description) の BR O_NONBLOCK
52 ファイルステータスフラグをセットする。 このフラグを使うことで、 \fBO_NONBLOCK\fP をセットするために \fBfcntl\fP(2)
53 を追加で呼び出す必要がなくなる。
54 .TP 
55 \fBIN_CLOEXEC\fP
56 新しいファイル・ディスクリプターに対して close\-on\-exec (\fBFD_CLOEXEC\fP)  フラグをセットする。
57 このフラグが役に立つ理由については、 \fBopen\fP(2)  の \fBO_CLOEXEC\fP フラグの説明を参照のこと。
58 .SH 返り値
59 成功すると、これらのシステムコールは新しいファイルディスクリプタを返す。 エラーの場合、\-1 を返し、 \fIerrno\fP をエラーを示す値に設定する。
60 .SH エラー
61 .TP 
62 \fBEINVAL\fP
63 (\fBinotify_init1\fP())  無効な値が \fIflags\fP に指定された。
64 .TP 
65 \fBEMFILE\fP
66 inotify インスタンスの総数がユーザ単位の上限に達していた。
67 .TP 
68 \fBENFILE\fP
69 inotify インスタンスの総数がシステムの上限に達していた。
70 .TP 
71 \fBENOMEM\fP
72 カーネルメモリが十分になかった。
73 .SH バージョン
74 \fBinotify_init\fP()  は Linux 2.6.13 で初めて登場し、
75 ライブラリによるサポートは glibc バージョン 2.4 で追加された。
76 \fBinotify_init1\fP()  は Linux 2.6.27 で追加され、
77 ライブラリによるサポートは glibc バージョン 2.9 で追加された。
78 .SH 準拠
79 これらのシステムコールは Linux 独自である。
80 .SH 関連項目
81 \fBinotify_add_watch\fP(2), \fBinotify_rm_watch\fP(2), \fBinotify\fP(7)
82 .SH この文書について
83 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.52 の一部
84 である。プロジェクトの説明とバグ報告に関する情報は
85 http://www.kernel.org/doc/man\-pages/ に書かれている。