.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
-.TH INOTIFY 7 2008-11-18 "Linux" "Linux Programmer's Manual"
+.TH INOTIFY 7 2011-12-07 "Linux" "Linux Programmer's Manual"
.SH NAME
inotify \- monitoring file system events
.SH DESCRIPTION
and
.B IN_MOVE_TO
events to be connected by the application.
+For all other event types,
+.I cookie
+is set to 0.
The
.I name
which equates to
IN_MOVED_FROM|IN_MOVED_TO,
and
-.B IN_CLOSE
+.BR IN_CLOSE ,
which equates to
IN_CLOSE_WRITE|IN_CLOSE_NOWRITE.
.PP
.BR IN_DONT_FOLLOW " (since Linux 2.6.15)"
Don't dereference \fIpathname\fP if it is a symbolic link.
.TP
+.BR IN_EXCL_UNLINK " (since Linux 2.6.36)"
+.\" commit 8c1934c8d70b22ca8333b216aec6c7d09fdbd6a6
+By default, when watching events on the children of a directory,
+events are generated for children even after they have been unlinked
+from the directory.
+This can result in large numbers of uninteresting events for
+some applications (e.g., if watching
+.IR /tmp ,
+in which many applications create temporary files whose
+names are immediately unlinked).
+Specifying
+.B IN_EXCL_UNLINK
+changes the default behavior,
+so that events are not generated for children after
+they have been unlinked from the watched directory.
+.TP
.B IN_MASK_ADD
Add (OR) events to watch mask for this pathname if
it already exists (instead of replacing mask).
.BR ioctl (2)
returns the number of bytes available to read from an
inotify file descriptor.
-
+.SS Limitations and caveats
Inotify monitoring of directories is not recursive:
to monitor subdirectories under a directory,
additional watches must be created.
+This can take a significant amount time for large directory trees.
+
+The inotify API provides no information about the user or process that
+triggered the inotify event.
+
+Note that the event queue can overflow.
+In this case, events are lost.
+Robust applications should handle the possibility of
+lost events gracefully.
+
+The inotify API identifies affected files by filename.
+However, by the time an application processes an inotify event,
+the filename may already have been deleted or renamed.
+
+If monitoring an entire directory subtree,
+and a new subdirectory is created in that tree,
+be aware that by the time you create a watch for the new subdirectory,
+new files may already have been created in the subdirectory.
+Therefore, you may want to scan the contents of the subdirectory
+immediately after adding the watch.
.SH "BUGS"
In kernels before 2.6.16, the
.B IN_ONESHOT