inotify.7: Remind reader of the cookie value in discussion of rename events

Reported-by: Jan Kara <jack@suse.cz>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-04-04 09:25:14 +02:00
parent 6f1a495406
commit fa51f4d941
1 changed files with 7 additions and 4 deletions

View File

@ -652,14 +652,17 @@ create a new inotify file descriptor,
and then re-create watches and cache entries and then re-create watches and cache entries
for the objects to be monitored.) for the objects to be monitored.)
.SS Dealing with rename() events .SS Dealing with rename() events
The As noted above, the
.B IN_MOVED_FROM .B IN_MOVED_FROM
and and
.B IN_MOVED_TO .B IN_MOVED_TO
events that are generated by event pair that is generated by
.BR rename (2) .BR rename (2)
are usually available as consecutive events when reading can be matched up via their shared cookie value.
from the inotify file descriptor. However, the task of matching has some challenges.
These two events are usually consecutive in the event stream available
when reading from the inotify file descriptor.
However, this is not guaranteed. However, this is not guaranteed.
If multiple processes are triggering events for monitored objects, If multiple processes are triggering events for monitored objects,
then (on rare occasions) an arbitrary number of then (on rare occasions) an arbitrary number of