Clean up inotify watch handling
Substantially based on a patch by Matthias Clasen <email@example.com> kqueue implementation by Joe Marcus Clarke <firstname.lastname@example.org> Previously, when we detected a configuration change (which included the set of config directories to monitor for changes), we would simply drop all watches, then readd them. The problem with this is that it introduced a race condition where we might not be watching one of the config directories for changes. Rather than dropping and readding, change the OS-dependent monitoring API to simply take a new set of directories to monitor. Implicit in this is that the OS-specific layer needs to keep track of the previously monitored set.
Showing with 224 additions and 96 deletions