-
Ting-Wei Lan authored
Previously, kqueue file monitor only add event sources for directories regardless of the type of the file being monitored. Doing so may be possible on inotify, but it is not sufficient on kqueue. Watching a directory on kqueue doesn't report changes made to files under it, and we must watch files themselves to get notified. This problem is fixed by adding a second watch for non-directory file monitors, and the result is that we are now able to receive 'CHANGED' and 'ATTRIBUTE_CHANGED' events for non-directory files. Since having two watches on one file monitor requires many code changes to work properly, this commit also changes the following things: - NOTE_ALL macro is now replaced by note_all inline function. Since the kqueue backend is shared by all BSD operating systems, there are a few difference between these systems. It is easier to do '#ifdef' check in a function than in a macro. - Both g_kqueue_file_monitor_callback and g_kqueue_fi...
09c019a4