* Fallback to polling for files not supported by kqueue

* Do not send an ENDEXISTS event on NOTE_REVOKE
* Handle kevent aggregation if multiple event types are requested
* Mimic FAM's behavior of never following symbolic links
* Add exhaustive error handling
* Remove all the legacy thread-safe code since gamin is now single-threaded

PR:		79680
Submitted by:	Jean-Yves Lefort <jylefort@brutele.be>
This commit is contained in:
Joe Marcus Clarke 2005-04-10 17:36:01 +00:00
parent f1e25b8d3c
commit 83fe564826
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=132908
4 changed files with 610 additions and 619 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= gamin
PORTVERSION= 0.0.26
PORTREVISION?= 9
PORTREVISION?= 10
CATEGORIES?= devel
MASTER_SITES= http://www.gnome.org/~veillard/gamin/sources/
@ -25,21 +25,7 @@ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
CONFLICTS= fam-[0-9]*
.if !defined(GAMIN_SLAVE)
OPTIONS= KQUEUE "Enable the KQueue backend (UFS only)" on
.endif
.include <bsd.port.pre.mk>
.if !defined(GAMIN_SLAVE)
.if defined(WITHOUT_KQUEUE)
CONFIGURE_ARGS+= --disable-kqueue
.else
CONFIGURE_ARGS+= --enable-kqueue
.endif
.endif
post-patch:
@${FIND} ${WRKSRC} -type f | ${XARGS} ${TOUCH} -f
.include <bsd.port.post.mk>
.include <bsd.port.mk>

File diff suppressed because it is too large Load diff

View file

@ -1,20 +1,12 @@
--- server/gam_kqueue.h.orig Sat Mar 26 18:32:19 2005
+++ server/gam_kqueue.h Sat Mar 26 18:36:11 2005
@@ -0,0 +1,24 @@
+
--- server/gam_kqueue.h.orig Fri Apr 8 14:50:41 2005
+++ server/gam_kqueue.h Fri Apr 8 14:51:01 2005
@@ -0,0 +1,16 @@
+#ifndef __MD_KQUEUE_H__
+#define __MD_KQUEUE_H__
+
+#include <glib.h>
+#include "gam_poll.h"
+#include "gam_subscription.h"
+
+#define VN_NOTE_MOST (NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | \
+ NOTE_ATTRIB | NOTE_LINK | NOTE_RENAME | \
+ NOTE_REVOKE)
+#define VN_NOTE_ALL VN_NOTE_MOST
+#define VN_NOTE_CHANGED (NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | NOTE_LINK)
+
+G_BEGIN_DECLS
+
+gboolean gam_kqueue_init (void);

View file

@ -2,4 +2,7 @@ Gamin is a file and directory monitoring system defined to be a subset of the
FAM (File Alteration Monitor) system. This is a service provided by a library
which allows to detect when a file or a directory has been modified.
Whereas the FreeBSD port of FAM polls files every few seconds, this port
includes a kqueue(2) backend for immediate notification of most alterations.
WWW: http://www.gnome.org/~veillard/gamin/index.html