kqueue: Only fallback to polling on /media and /run/media
commit41259ac173143fbb06bc07dab80fbe06493716df
authorTing-Wei Lan <lantw@src.gnome.org>
Sun, 3 Jun 2018 04:15:36 +0000 (3 12:15 +0800)
committerTing-Wei Lan <lantw@src.gnome.org>
Wed, 6 Jun 2018 16:38:07 +0000 (7 00:38 +0800)
tree44ef810430cce0ce0924cfc990911ed9b42ffbd8
parent70e4ca03403bd773b43775822ebf416cb3b8cbcd
kqueue: Only fallback to polling on /media and /run/media

The check in _ke_is_excluded, which causes GKqueueFileMonitor to
fallback to GPollFileMonitor when it returns TRUE, was made to prevent
file monitor from blocking unmount of removable drives on systems not
supporting O_EVTONLY flag in open. However, since g_mount_can_unmount
always returns TRUE on Unix-like platforms, the check always returns
TRUE on non-standard mount points, which is very likely to cause all
programs on the desktop to use the polling fallback if GNOME is
installed in a different prefix for development. This makes the desktop
sluggish and results in bad developer experience on *BSD.
gio/kqueue/gkqueuefilemonitor.c