[Top][All Lists]

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

Re: kqueue in Emacs 25.1?

From: Wolfgang Jenkner
Subject: Re: kqueue in Emacs 25.1?
Date: Sat, 07 Nov 2015 15:52:33 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (berkeley-unix)

On Sat, Nov 07 2015, Michael Albinus wrote:

> The topic itself has been discussed a while ago: shall kqueue support be
> added to the file notification backends?

I'd say it depends on how you implement it: if you are trying to emulate
the inotify API it might be better to just link with libinotify-kqueue


On the other hand, if you are writing "native" support for kqueue, that
would be awesome :-)

As for emacs with libinotify-kqueue, I've tried this on FreeBSD
10-STABLE (before your recent changes to the notify stuff, though) and
it seems to work well when watching small directories, but emacs somehow
locks up for directories with more than 1500 files or so (while using,
say, inotifywait from inotify-tools seems to work without problems for
larger directories).

Here's the trivial patch for libinotify support, by the way:

-- >8 --
Subject: [PATCH] Tentative libinotify support.

 configure.ac    | 13 +++++++++----
 src/Makefile.in |  4 +++-
 2 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 83d45a9..4216821 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2696,19 +2696,24 @@ case $with_file_notification,$opsys in
     fi ;;
-dnl inotify is available only on GNU/Linux.
+dnl inotify is available on GNU/Linux, and on *BSD via libinotify.
 case $with_file_notification,$NOTIFY_OBJ in
   inotify, | yes,)
     if test "$ac_cv_header_sys_inotify_h" = yes ; then
-       AC_CHECK_FUNC(inotify_init1)
-       if test "$ac_cv_func_inotify_init1" = yes; then
+       AC_SEARCH_LIBS(inotify_init1, inotify)
+       if test "$ac_cv_search_inotify_init1" != no; then
          AC_DEFINE(HAVE_INOTIFY, 1, [Define to 1 to use inotify.])
-         NOTIFY_SUMMARY="yes -lglibc (inotify)"
+         LIB_INOTIFY=
+         if test "$ac_cv_search_inotify_init1" != "none required"; then
+            LIB_INOTIFY="$ac_cv_search_inotify_init1"
+         fi
+         NOTIFY_SUMMARY="yes $LIB_INOTIFY (inotify)"
     fi ;;
 dnl g_file_monitor exists since glib 2.18.  G_FILE_MONITOR_EVENT_MOVED
 dnl has been added in glib 2.24.  It has been tested under
diff --git a/src/Makefile.in b/src/Makefile.in
index 9c0a3bb..bb9c003 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -153,6 +153,8 @@ DBUS_OBJ = @DBUS_OBJ@
@@ -468,7 +470,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) 
 $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT)
        $(MAKE) -C ../leim leim-list.el EMACS="$(bootstrap_exe)"

reply via email to

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