1INOTIFY_INIT(2)            Linux Programmer's Manual           INOTIFY_INIT(2)
2
3
4

NAME

6       inotify_init, inotify_init1 - initialize an inotify instance
7

SYNOPSIS

9       #include <sys/inotify.h>
10
11       int inotify_init(void);
12       int inotify_init1(int flags);
13

DESCRIPTION

15       inotify_init()  initializes  a  new inotify instance and returns a file
16       descriptor associated with a new inotify event queue.
17
18       If flags is 0, then inotify_init1() is the same as inotify_init().  The
19       following  values  can  be  bitwise  ORed  in flags to obtain different
20       behavior:
21
22       IN_NONBLOCK Set the O_NONBLOCK file status flag on the  new  open  file
23                   description.  Using this flag saves extra calls to fcntl(2)
24                   to achieve the same result.
25
26       IN_CLOEXEC  Set the close-on-exec (FD_CLOEXEC) flag  on  the  new  file
27                   descriptor.   See  the description of the O_CLOEXEC flag in
28                   open(2) for reasons why this may be useful.
29

RETURN VALUE

31       On success, these system calls return a new file descriptor.  On error,
32       -1 is returned, and errno is set to indicate the error.
33

ERRORS

35       EINVAL (inotify_init1()) An invalid value was specified in flags.
36
37       EMFILE The user limit on the total number of inotify instances has been
38              reached.
39
40       ENFILE The system limit on the total number  of  file  descriptors  has
41              been reached.
42
43       ENOMEM Insufficient kernel memory is available.
44

VERSIONS

46       inotify_init()  first  appeared  in  Linux 2.6.13.  inotify_init1() was
47       added in Linux 2.6.27.
48

CONFORMING TO

50       These system calls are Linux-specific.
51

SEE ALSO

53       inotify_add_watch(2), inotify_rm_watch(2), inotify(7)
54

COLOPHON

56       This page is part of release 3.22 of the Linux  man-pages  project.   A
57       description  of  the project, and information about reporting bugs, can
58       be found at http://www.kernel.org/doc/man-pages/.
59
60
61
62Linux                             2008-10-10                   INOTIFY_INIT(2)
Impressum