[glib/glib-2-54] inotify: Ignore IN_Q_OVERFLOW events



commit d97e0770903b1bbda980882d888a1447ed2fb481
Author: Philip Withnall <withnall endlessm com>
Date:   Fri Nov 24 20:00:38 2017 +0000

    inotify: Ignore IN_Q_OVERFLOW events
    
    There’s not much we can do about them, and if they go unhandled, they
    can propagate through to g_file_monitor_source_handle_event() and cause
    assertion failures due to not mapping to a GFileMonitorEvent.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776147

 gio/inotify/inotify-path.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gio/inotify/inotify-path.c b/gio/inotify/inotify-path.c
index 5110dff..f0528f4 100644
--- a/gio/inotify/inotify-path.c
+++ b/gio/inotify/inotify-path.c
@@ -532,8 +532,9 @@ ip_event_callback (ik_event_t *event)
   GList* dir_list = NULL;
   GList *file_list = NULL;
 
-  /* We can ignore the IGNORED events */
-  if (event->mask & IN_IGNORED)
+  /* We can ignore the IGNORED events. Likewise, if the event queue overflowed,
+   * there is not much we can do to recover. */
+  if (event->mask & (IN_IGNORED | IN_Q_OVERFLOW))
     {
       _ik_event_free (event);
       return TRUE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]