From fa51f4d941c89dbddf6a3e64c9684ce05a985120 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 4 Apr 2014 09:25:14 +0200 Subject: [PATCH] inotify.7: Remind reader of the cookie value in discussion of rename events Reported-by: Jan Kara Signed-off-by: Michael Kerrisk --- man7/inotify.7 | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/man7/inotify.7 b/man7/inotify.7 index 9672f1353..07c5a1ba3 100644 --- a/man7/inotify.7 +++ b/man7/inotify.7 @@ -652,14 +652,17 @@ create a new inotify file descriptor, and then re-create watches and cache entries for the objects to be monitored.) .SS Dealing with rename() events -The +As noted above, the .B IN_MOVED_FROM and .B IN_MOVED_TO -events that are generated by +event pair that is generated by .BR rename (2) -are usually available as consecutive events when reading -from the inotify file descriptor. +can be matched up via their shared cookie value. +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. If multiple processes are triggering events for monitored objects, then (on rare occasions) an arbitrary number of