aboutsummaryrefslogtreecommitdiffstats
path: root/man7/inotify.7
diff options
context:
space:
mode:
Diffstat (limited to 'man7/inotify.7')
-rw-r--r--man7/inotify.734
1 files changed, 17 insertions, 17 deletions
diff --git a/man7/inotify.7 b/man7/inotify.7
index 3dd4c4d316..9ead9b24cc 100644
--- a/man7/inotify.7
+++ b/man7/inotify.7
@@ -33,12 +33,12 @@ When a directory is monitored, inotify will return events
for the directory itself, and for files inside the directory.
The following system calls are used with this API:
-.BR inotify_init (),
-.BR inotify_add_watch (),
-.BR inotify_rm_watch (),
-.BR read (),
+.BR inotify_init (2),
+.BR inotify_add_watch (2),
+.BR inotify_rm_watch (2),
+.BR read (2),
and
-.BR close ().
+.BR close (2).
.BR inotify_init (2)
creates an inotify instance and returns a file descriptor
@@ -50,11 +50,11 @@ Each item ("watch") in the watch list specifies the pathname of
a file or directory,
along with some set of events that the kernel should monitor for the
file referred to by that pathname.
-.BR inotify_add_watch ()
+.BR inotify_add_watch (2)
either creates a new watch item, or modifies an existing watch.
Each watch has a unique "watch descriptor", an integer
returned by
-.BR inotify_add_watch ()
+.BR inotify_add_watch (2)
when the watch is created.
.BR inotify_rm_watch (2)
@@ -71,11 +71,11 @@ To determine what events have occurred, an application
from the inotify file descriptor.
If no events have so far occurred, then,
assuming a blocking file descriptor,
-.BR read ()
+.BR read (2)
will block until at least one event occurs.
Each successful
-.BR read ()
+.BR read (2)
returns a buffer containing one or more of the following structures:
.in +0.25i
.nf
@@ -94,7 +94,7 @@ struct inotify_event {
.I wd
identifies the watch for which this event occurs.
It is one of the watch descriptors returned by a previous call to
-.BR inotify_add_watch ().
+.BR inotify_add_watch (2).
.I mask
contains bits that describe the event that occurred (see below).
@@ -141,11 +141,11 @@ inotify events.
The following bits can be specified in
.I mask
when calling
-.BR inotify_add_watch ()
+.BR inotify_add_watch (2)
and may be returned in the
.I mask
field returned by
-.BR read ():
+.BR read (2):
.in +0.25i
.TS
lB lB
@@ -181,7 +181,7 @@ macro is defined as a bit mask of all of the above events.
This macro can be used as the
.I mask
argument when calling
-.BR inotify_add_watch ().
+.BR inotify_add_watch (2).
Two additional convenience macros are
.BR IN_MOVE ,
@@ -195,7 +195,7 @@ IN_CLOSE_WRITE|IN_CLOSE_NOWRITE.
The following further bits can be specified in
.I mask
when calling
-.BR inotify_add_watch ():
+.BR inotify_add_watch (2):
.in +0.25i
.TS
lB lB
@@ -213,13 +213,13 @@ IN_ONLYDIR Only watch \fIpathname\fP if it is a directory
The following bits may be set in the
.I mask
field returned by
-.BR read ():
+.BR read (2):
.in +0.25i
.TS
lB lB
lB l.
Bit Description
-IN_IGNORED Watch was removed explicitly (\fBinotify_rm_watch\fP())
+IN_IGNORED Watch was removed explicitly (\fBinotify_rm_watch\fP(2))
or automatically (file was deleted, or
file system was unmounted)
IN_ISDIR Subject of this event is a directory
@@ -271,7 +271,7 @@ correct order on the inotify file descriptor.
The
.B FIONREAD
-.BR ioctl ()
+.BR ioctl (2)
returns the number of bytes available to read from an
inotify file descriptor.