mirror of https://github.com/mkerrisk/man-pages
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:
parent
c59a150bde
commit
613836aaa5
|
@ -23,7 +23,7 @@
|
||||||
.\" Formatted or processed versions of this manual, if unaccompanied by
|
.\" Formatted or processed versions of this manual, if unaccompanied by
|
||||||
.\" the source, must acknowledge the copyright and authors of this work.
|
.\" 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
|
.SH NAME
|
||||||
inotify \- monitoring file system events
|
inotify \- monitoring file system events
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
@ -377,10 +377,27 @@ The
|
||||||
.BR ioctl (2)
|
.BR ioctl (2)
|
||||||
returns the number of bytes available to read from an
|
returns the number of bytes available to read from an
|
||||||
inotify file descriptor.
|
inotify file descriptor.
|
||||||
|
.SS Limitations and caveats
|
||||||
Inotify monitoring of directories is not recursive:
|
Inotify monitoring of directories is not recursive:
|
||||||
to monitor subdirectories under a directory,
|
to monitor subdirectories under a directory,
|
||||||
additional watches must be created.
|
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"
|
.SH "BUGS"
|
||||||
In kernels before 2.6.16, the
|
In kernels before 2.6.16, the
|
||||||
.B IN_ONESHOT
|
.B IN_ONESHOT
|
||||||
|
|
Loading…
Reference in New Issue