dovecot-2.2: lib: kqueue notification should trigger also on fil...

dovecot at dovecot.org dovecot at dovecot.org
Wed Aug 19 10:42:45 UTC 2015


details:   http://hg.dovecot.org/dovecot-2.2/rev/412de6dea139
changeset: 18977:412de6dea139
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Aug 19 13:41:54 2015 +0300
description:
lib: kqueue notification should trigger also on file renames.
For example if dovecot.index.log is renamed to dovecot.index.log.2, we
should notice that since there's now a new dovecot.index.log containing new
changes.

diffstat:

 src/lib/ioloop-notify-kqueue.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r 3a8af59b379d -r 412de6dea139 src/lib/ioloop-notify-kqueue.c
--- a/src/lib/ioloop-notify-kqueue.c	Wed Aug 19 13:40:35 2015 +0300
+++ b/src/lib/ioloop-notify-kqueue.c	Wed Aug 19 13:41:54 2015 +0300
@@ -138,7 +138,8 @@
 	   event state transitions and not the current state.  With this flag,
 	   the same event is only returned once. */
 	MY_EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_CLEAR,
-		  NOTE_DELETE | NOTE_WRITE | NOTE_EXTEND | NOTE_REVOKE, 0, io);
+		  NOTE_DELETE | NOTE_RENAME | NOTE_WRITE | NOTE_EXTEND |
+		  NOTE_REVOKE, 0, io);
 	if (kevent(ctx->kq, &ev, 1, NULL, 0, NULL) < 0) {
 		i_error("kevent(%d, %s) for notify failed: %m", fd, path);
 		i_close_fd(&fd);


More information about the dovecot-cvs mailing list