INOTIFY_INIT(3C) | Standard C Library Functions | INOTIFY_INIT(3C) |
inotify_init, inotify_init1 - initialize an inotify instance
#include <sys/inotify.h> int inotify_init(void);
int inotify_init1(int flags);
The inotify_init() and inotify_init1() functions both create an inotify(5) instance that can be operated upon via inotify_add_watch(3C), inotify_rm_watch(3C) and read(2). inotify instances are represented as file descriptors, and should be closed via close(2).
The only difference between the two functions is their signature; inotify_init() takes no arguments, while inotify_init1() takes a flags argument that can have any of the following values:
IN_CLOEXEC
IN_NONBLOCK
Upon succesful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error.
The inotify_init() and inotify_init1() functions will fail if:
EINVAL
EMFILE
While the inotify(5) facility is implemented for purposes of offering compatibility for Linux-borne applications, native applications may opt to use it instead of (or in addition to) the PORT_SOURCE_FILE capability of event ports. See inotify(5) for details and restrictions.
September 17, 2014 | OmniOS |