Ting-Wei Lan
09c019a4f0
kqueue: Make it possible to pass file monitor tests
...
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_file_monitor_cancel
now holds a lock before accessing kqueue_sub structs. This fixes a
crash when these two functions are called from different threads,
causing g_kqueue_file_monitor_callback to access freed memory.
- 'mask' variable in g_kqueue_file_monitor_callback is now removed.
The usage of 'mask' was wrong because of the 'mask > 0' check.
'CHANGED' event has value 0 so the 'mask > 0' check made it
impossible to emit 'CHANGED' events.
- kqueue-missing scans can now be triggered from the kqueue event
callback instead of always waiting for 4 seconds.
- Don't remove a file from kqueue on unlink unless its hard link count
has dropped to zero.
- Don't use 'else if' in the check of 'fflags'. It is possible for a
kevent to have multiple flags set.
- Don't use g_file_monitor_emit_event directly. Always use
g_file_monitor_source_handle_event to report events.
Events submitted to g_file_monitor_emit_event are delivered
immediately, but events sent to g_file_monitor_source_handle_event
are scheduled by GLocalFileMonitor. If we mix the two, the order of
events will be wrong and tests will fail.
- Report 'CHANGES_DONE_HINT' immediately after 'CREATED' if the file
created is not a regular file. This is copied from ih_event_callback.
2018-06-17 11:26:32 +08:00
..
2018-01-05 13:01:03 +00:00
2017-05-29 19:53:34 +02:00
2018-05-04 17:16:10 +01:00
2017-05-29 19:53:34 +02:00
2018-04-18 15:13:02 +01:00
2018-06-17 11:26:32 +08:00
2018-06-06 12:18:30 +02:00
2018-02-21 13:57:10 +00:00
2018-05-10 11:46:17 +01:00
2016-07-19 14:18:49 +01:00
2009-03-31 19:39:16 -04:00
2017-11-10 11:47:57 +00:00
2012-04-20 15:02:48 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-11-12 21:04:30 +01:00
2017-11-07 14:50:23 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-03-13 12:45:13 +00:00
2018-01-03 11:08:37 +00:00
2017-10-26 18:51:51 +02:00
2017-05-29 19:53:34 +02:00
2017-07-24 19:52:48 +02:00
2014-02-06 12:02:53 +00:00
2017-11-01 12:54:14 +00:00
2017-05-29 19:53:34 +02:00
2017-12-04 11:42:58 +00:00
2017-05-29 19:53:34 +02:00
2017-10-26 14:08:42 +02:00
2017-05-29 19:53:34 +02:00
2017-11-07 14:51:12 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-01-05 20:42:06 +00:00
2017-05-29 19:53:34 +02:00
2017-08-03 10:21:13 +01:00
2017-05-29 19:53:34 +02:00
2018-05-25 03:06:07 +00:00
2017-05-29 19:53:34 +02:00
2018-04-27 16:46:19 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-04-25 17:23:50 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-02-16 11:15:02 +00:00
2018-02-02 10:05:55 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-02-21 14:20:59 +00:00
2017-05-29 19:53:34 +02:00
2017-11-17 11:28:43 +00:00
2017-05-29 19:53:34 +02:00
2018-01-31 22:25:02 +00:00
2017-05-29 19:53:34 +02:00
2018-03-13 12:09:01 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-03-13 12:09:01 +00:00
2017-05-29 19:53:34 +02:00
2018-04-25 17:23:50 +02:00
2017-05-29 19:53:34 +02:00
2018-05-31 08:25:31 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-04-19 16:36:16 +01:00
2018-01-12 15:29:29 +00:00
2018-06-05 14:01:47 +00:00
2015-01-30 16:58:40 +01:00
2018-01-05 19:29:35 +00:00
2018-01-05 19:29:35 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-01-11 16:03:05 +00:00
2017-05-29 19:53:34 +02:00
2017-06-05 16:07:52 +01:00
2017-05-29 19:53:34 +02:00
2017-11-17 11:28:43 +00:00
2017-05-29 19:53:34 +02:00
2018-02-02 10:07:12 +01:00
2017-05-29 19:53:34 +02:00
2018-01-12 15:29:29 +00:00
2017-05-29 19:53:34 +02:00
2017-08-07 17:31:31 +01:00
2017-05-29 19:53:34 +02:00
2017-06-28 19:50:57 -04:00
2017-11-07 14:51:12 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-04-25 15:30:46 +01:00
2017-05-29 19:53:34 +02:00
2017-12-04 11:42:58 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-04-27 16:46:19 +01:00
2018-04-10 11:22:41 +01:00
2018-04-25 15:30:46 +01:00
2017-05-29 19:53:34 +02:00
2017-08-03 10:21:13 +01:00
2017-05-29 19:53:34 +02:00
2017-11-28 14:28:50 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-05-04 17:13:39 +01:00
2018-01-08 16:28:34 +01:00
2018-03-28 11:49:59 +01:00
2017-05-29 17:57:39 -04:00
2018-05-28 16:58:13 +00:00
2018-05-28 17:13:30 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-11-07 14:51:12 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-07-18 17:31:29 -04:00
2018-05-04 18:32:43 -07:00
2018-01-15 18:26:56 +00:00
2017-05-29 19:53:34 +02:00
2018-04-27 16:46:19 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-11-12 16:36:16 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-05-15 15:54:18 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-06-09 16:45:09 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-05-29 17:16:38 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2016-06-15 16:15:12 -04:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-01-04 11:01:40 -05:00
2018-05-28 13:50:55 +02:00
2018-05-28 13:50:55 +02:00
2018-05-28 13:50:55 +02:00
2018-05-28 13:50:55 +02:00
2017-05-29 19:53:34 +02:00
2018-05-28 13:50:55 +02:00
2018-05-28 13:50:55 +02:00
2018-05-28 14:03:37 +00:00
2018-05-28 13:50:55 +02:00
2018-05-28 13:50:55 +02:00
2018-05-28 13:50:55 +02:00
2017-05-29 19:53:34 +02:00
2017-08-18 14:46:23 +02:00
2018-05-28 13:50:55 +02:00
2018-05-28 13:50:55 +02:00
2018-05-28 13:50:55 +02:00
2018-05-28 13:50:55 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-01-04 22:19:30 +01:00
2016-06-15 16:15:12 -04:00
2018-02-08 16:39:32 +00:00
2012-12-06 13:30:31 -05:00
2013-01-13 13:05:15 -05:00
2017-08-03 10:21:13 +01:00
2017-05-29 19:53:34 +02:00
2018-01-04 11:01:40 -05:00
2018-01-04 11:01:40 -05:00
2018-04-10 10:39:40 +01:00
2018-01-04 11:01:40 -05:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-10-26 14:08:42 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-05-26 13:16:13 +05:30
2018-04-11 11:03:03 +01:00
2017-09-12 12:32:20 +01:00
2017-05-29 19:53:34 +02:00
2018-04-30 13:02:41 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-06-05 14:53:15 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-05-28 17:19:59 +02:00
2017-11-01 12:46:38 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-12-04 11:42:58 +00:00
2017-05-29 19:53:34 +02:00
2018-04-18 15:13:02 +01:00
2017-05-29 19:53:34 +02:00
2017-11-01 12:46:38 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-04-25 17:23:50 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-04-27 16:46:19 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-05-24 23:29:17 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-11-28 14:14:19 +00:00
2017-05-29 19:53:34 +02:00
2018-01-08 11:50:26 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-02-28 15:07:27 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-06-03 10:30:17 +02:00
2017-06-03 10:30:17 +02:00
2018-02-01 14:58:28 +00:00
2018-01-09 16:24:27 +00:00
2018-01-09 16:24:27 +00:00
2018-04-11 15:03:43 +01:00
2017-05-29 19:53:34 +02:00
2018-04-11 15:03:43 +01:00
2017-05-29 19:53:34 +02:00
2018-02-28 17:39:04 +00:00
2017-05-29 19:53:34 +02:00
2018-04-11 15:03:43 +01:00
2017-05-29 19:53:34 +02:00
2017-12-04 11:42:58 +00:00
2017-05-29 19:53:34 +02:00
2018-05-25 03:06:07 +00:00
2017-05-29 19:53:34 +02:00
2018-01-23 14:24:12 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-03-25 00:10:21 -04:00
2017-06-03 10:30:17 +02:00
2017-05-29 19:53:34 +02:00
2018-05-25 03:06:07 +00:00
2018-05-25 03:06:07 +00:00
2018-02-13 08:04:24 -06:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-01-31 22:37:18 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-03-26 10:55:44 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-02-01 14:58:28 +00:00
2017-11-29 17:50:27 +00:00
2018-02-01 14:58:29 +00:00
2017-05-29 19:53:34 +02:00
2017-11-27 12:36:03 +01:00
2017-05-29 19:53:34 +02:00
2018-04-25 17:23:50 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-02-01 14:58:28 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-11-15 03:24:29 -08:00
2017-05-29 19:53:34 +02:00
2017-11-14 15:13:44 -08:00
2017-05-29 19:53:34 +02:00
2017-12-06 10:33:52 +00:00
2016-01-08 12:31:18 +09:00
2016-01-08 12:31:18 +09:00
2017-11-04 20:05:37 +01:00
2017-05-29 19:53:34 +02:00
2018-04-27 16:46:19 +01:00
2017-05-29 19:53:34 +02:00
2018-02-02 14:41:00 +01:00
2018-04-27 16:46:19 +01:00
2017-05-29 19:53:34 +02:00
2017-11-07 14:51:12 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-01-12 15:29:29 +00:00
2017-05-29 19:53:34 +02:00
2018-04-09 13:28:34 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-10-26 13:48:39 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-02-01 14:58:28 +00:00
2017-05-29 19:53:34 +02:00
2018-04-25 17:23:50 +02:00
2017-10-16 11:14:57 +01:00
2017-12-04 11:42:58 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-01-12 15:29:29 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-11-29 17:50:27 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-03-14 17:21:28 +00:00
2017-12-25 00:12:06 -08:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-02-13 16:27:32 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-10-26 18:51:51 +02:00
2017-05-29 19:53:34 +02:00
2017-11-07 14:51:12 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-04-27 16:46:19 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-03-26 10:49:25 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-09-13 17:38:42 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-01-08 19:17:01 -06:00
2018-01-08 19:17:01 -06:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-11-07 14:51:12 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-09-21 12:05:06 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-08-03 10:21:13 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-08-03 10:21:13 +01:00
2017-05-29 19:53:34 +02:00
2017-08-03 10:21:13 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-05-16 11:31:42 +01:00
2018-05-16 11:31:42 +01:00
2017-08-03 10:21:13 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-12-04 11:42:58 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-05-28 16:58:13 +00:00
2018-05-28 17:20:21 +02:00
2017-10-11 13:18:49 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-04-11 15:03:43 +01:00
2018-01-18 10:12:26 +00:00
2018-04-10 10:39:40 +01:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-06-01 11:00:28 +00:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2018-04-27 16:46:19 +01:00
2017-05-29 19:53:34 +02:00
2018-04-27 16:46:19 +01:00
2017-05-29 19:53:34 +02:00
2018-05-25 03:06:07 +00:00
2018-05-25 03:06:07 +00:00
2017-06-03 10:30:17 +02:00
2017-06-03 10:30:17 +02:00
2017-06-03 10:30:17 +02:00
2017-06-03 10:30:17 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00
2017-05-29 19:53:34 +02:00