inotify.7: Added section noting limiations and caveats of inotify

Reported-by: Jan Kara <jack@suse.cz>
Reported-by: Lennart Poettering <mzjro@0pointer.net>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2010-09-27 04:04:38 +02:00
parent c59a150bde
commit 613836aaa5
1 changed files with 19 additions and 2 deletions

View File

@ -23,7 +23,7 @@
.\" 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 2010-09-27 "Linux" "Linux Programmer's Manual"
.SH NAME
inotify \- monitoring file system events
.SH DESCRIPTION
@ -377,10 +377,27 @@ The
.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.
Note that the event queue can overflow.
In this case, events are lost.
Robust applications should handle the possibility
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