[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
https://github.com/dmatveev/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 ;;
esac
-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,)
AC_CHECK_HEADER(sys/inotify.h)
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_OBJ=inotify.o
- 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
fi ;;
esac
+AC_SUBST(LIB_INOTIFY)
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@
address@hidden@
address@hidden@
+
SETTINGS_CFLAGS = @SETTINGS_CFLAGS@
SETTINGS_LIBS = @SETTINGS_LIBS@
@@ -468,7 +470,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE)
$(LIBIMAGE) \
$(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \
$(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \
$(LIBGNUTLS_LIBS) $(LIB_PTHREAD) \
- $(GFILENOTIFY_LIBS) $(LIB_MATH) $(LIBZ)
+ $(GFILENOTIFY_LIBS) $(LIB_INOTIFY) $(LIB_MATH) $(LIBZ)
$(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT)
$(MAKE) -C ../leim leim-list.el EMACS="$(bootstrap_exe)"
--
2.6.2
- Re: kqueue in Emacs 25.1?, (continued)
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/12
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/13
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/13
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/13
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/13
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/16
- Re: kqueue in Emacs 25.1?, John Wiegley, 2015/11/16
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/17
- Re: kqueue in Emacs 25?, Michael Albinus, 2015/11/25
- Re: kqueue in Emacs 25?, John Wiegley, 2015/11/25
- Re: kqueue in Emacs 25.1?,
Wolfgang Jenkner <=
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/07
- Re: kqueue in Emacs 25.1?, Paul Eggert, 2015/11/08
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/08
- Re: kqueue in Emacs 25.1?, Michael Albinus, 2015/11/07
- Re: kqueue in Emacs 25.1?, Wolfgang Jenkner, 2015/11/07
Re: Dynamic loading progress, John Wiegley, 2015/11/06