On Sun, Oct 09 2022, Eric DeCosta via GitGitGadget wrote: > Goal is to deliver fsmonitor for Linux that is on par with fsmonitor for > Windows and Mac OS. I applaud the effort, I gave this some light reviewing, I hope it helps. > This patch set builds upon previous work for done for Windows and Mac OS > (first 6 patches) to implement a fsmonitor back-end for Linux based on the > Linux inotify API. inotify differs significantly from the equivalent Windows > and Mac OS APIs in that a watch must be registered for every directory of > interest (rather than a singular watch at the root of the directory tree) > and special care must be taken to handle directory renames correctly. > > More information about inotify: > https://man7.org/linux/man-pages/man7/inotify.7.html You haven't said why/if you considered using fanotify() instead of inotify(), which seems like a more natural target to me. It's unlikely that anyone who cares to use this isn't also using a new enough kernel. See previous on-list discussions at: https://lore.kernel.org/git/?q=fanotify I think it would address some of the rac econditions you're mentioning here.