Gerd Hoffmann <kra...@redhat.com> writes: > On Di, 2015-11-03 at 19:00 -0500, Bandan Das wrote: >> + /* Add a new watch asap so as to not lose events >> */ > > This comment sounds like there is a race ("asap"). There isn't one, > correct ordering (adding the watch before reading the directory) is
Hmm, seems like there's still a small window. We may not have even started processing the event because we are still processing the earlier ones. > enough to make sure you don't miss anything. You might see create > events for objects already in the tree though, are you prepared to > handle that? Oh, interesting. Current version will happily add duplicate entries. I will add a check. > cheers, > Gerd