INOTIFY_INIT



INOTIFY_INIT

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
VERSIONS
CONFORMING TO
SEE ALSO
COLOPHON

NAME

inotify_init, inotify_init1 − initialize an inotify instance

SYNOPSIS

#include <sys/inotify.h>

int inotify_init(void);
int inotify_init1(int
flags);

DESCRIPTION

For an overview of the inotify API, see inotify(7).

inotify_init() initializes a new inotify instance and returns a file descriptor associated with a new inotify event queue.

If flags is 0, then inotify_init1() is the same as inotify_init(). The following values can be bitwise ORed in flags to obtain different behavior:

IN_NONBLOCK

Set the O_NONBLOCK file status flag on the new open file description. Using this flag saves extra calls to fcntl(2) to achieve the same result.

IN_CLOEXEC

Set the close-on-exec (FD_CLOEXEC) flag on the new file descriptor. See the description of the O_CLOEXEC flag in open(2) for reasons why this may be useful.

RETURN VALUE

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

ERRORS

EINVAL

(inotify_init1()) An invalid value was specified in flags.

EMFILE

The user limit on the total number of inotify instances has been reached.

ENFILE

The system limit on the total number of file descriptors has been reached.

ENOMEM

Insufficient kernel memory is available.

VERSIONS

inotify_init() first appeared in Linux 2.6.13; library support was added to glibc in version 2.4. inotify_init1() was added in Linux 2.6.27; library support was added to glibc in version 2.9.

CONFORMING TO

These system calls are Linux-specific.

SEE ALSO

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

COLOPHON

This page is part of release 3.69 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at http://www.kernel.org/doc/man−pages/.




More Linux Commands

manpages/XpGetScreenOfContext.3x.html
XpGetScreenOfContext(3x) - Obtains a pointer to the screen a
XpGetScreenOfContext returns the screen that is associated with the current print context of display. This call must be made after XpSetContext to determine whi

manpages/gluBeginTrim.3gl.html
gluBeginTrim(3gl) - delimit a NURBS trimming loop definition
Use gluBeginTrim to mark the beginning of a trimming loop, and gluEndTrim to mark the end of a trimming loop. A trimming loop is a set of oriented curve segment

manpages/logsave.8.html
logsave(8) - save the output of a command in a logfile......
The logsave program will execute cmd_prog with the specified argument(s), and save a copy of its output to logfile. If the containing directory for logfile does

manpages/boolfnames.3ncurses.html
numcodes(3ncurses) - curses terminfo global variables.......
This page summarizes variables provided by the curses librarys low-level terminfo interface. A more complete description is given in the curs_terminfo(3X) manua

manpages/operf.1.html
operf(1) Performance profiler tool for Linux (Man Page).....
Operf is the profiler tool provided with OProfile. Operf uses the Linux Performance Events Subsystem and, thus, does not require the obsolete oprofile kernel dr

manpages/is_idlok.3ncurses.html
is_idlok(3ncurses) - curses window properties (Man Page)....
This implementation provides functions which return properties set in the WINDOW structure, allowing it to be opaque if the symbol NCURSES_OPAQUE is defined: is

manpages/posix_openpt.3.html
posix_openpt(3) - open a pseudoterminal device (Man Page)...
The posix_openpt() function opens an unused pseudoterminal master device, returning a file descriptor that can be used to refer to that device. The flags argume

manpages/setttyent.3.html
setttyent(3) - get ttys file entry - Linux manual page......
setttyent.3 - These functions provide an interface to the file _PATH_TTYS (e.g., /etc/ttys). The function setttyent() opens the file or rewinds it if already op

manpages/mrtg-mibhelp.1.html
mrtg-mibhelp(1) A Table of some interesting OIDs (Man Page)
This File Contains a collection of interesting MIB Entries ... mrtg knows about their names ... depending on the ASN .1 Syntax you may have to put gauge into th

manpages/Tcl_Eval.3.html
Tcl_Eval(3) - execute Tcl scripts - Linux manual page.......
The procedures described here are invoked to execute Tcl scripts in various forms. Tcl_EvalObjEx is the core procedure and is used by many of the others. It exe

manpages/abs.3.html
abs(3) - compute the absolute value of an integer (ManPage)
The abs() function computes the absolute value of the integer argument j. The labs(), llabs() and imaxabs() functions compute the absolute value of the argument

manpages/gnutls_certificate_set_x509_key.3.html
gnutls_certificate_set_x509_key(3) - API function (ManPage)
gnutls_certificate_set_x509_key.3 - This function sets a certificate/private key pair in the gnutls_certificate_credentials_t structure. This function may be ca





We can't live, work or learn in freedom unless the software we use is free.