[Top][All Lists]

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

Using glib's g_file_monitor_file and g_file_monitor_directory

From: Michael Albinus
Subject: Using glib's g_file_monitor_file and g_file_monitor_directory
Date: Wed, 20 Mar 2013 21:40:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)


for GNU/Linux systems, we have inotify support now. As discussed when it
was added, there are some drawbacks. So it seems to work for local file
systems only; network file systems might work, or not.

There is an alternative: glib's functions g_file_monitor_file and
g_file_monitor_directory. They will use inotify when it is
applicable. Otherwise, they implement polling, which is something we
would need also in Emacs, when no native file monitoring is possible.

g_file_monitor_file works even for gvfs mounted filesystems (I've tested
with mounts of kind davs://..., smb://... and ftp://...). Likely, via

And it also has a kqueue backend for NetBSD (see
https://mail.gnome.org/archives/commits-list/2012-November/msg03867.html). I
don't know whether this is used widely, 'tho.

What about adding this interface to Emacs, on C level? It could be in
parallel to, or replacing the inotify interface.

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]