mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-28 01:06:17 +00:00
- Fix 100% CPU usage looping when a vnode change event came but it was never
untriggered. Patch by Rui Lopes PR: ports/103525 Submitted by: Robin Breathe <robin@isometry.net> (maintainer)
This commit is contained in:
parent
4a43e6024f
commit
86aec86281
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=173703
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= dovecot
|
||||
DISTVERSION= 1.0.rc7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail ipv6
|
||||
MASTER_SITES= http://www.dovecot.org/releases/
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
--- src/lib/ioloop-notify-kqueue.c 16 Aug 2006 17:58:03 -0000 1.3.2.2
|
||||
+++ src/lib/ioloop-notify-kqueue.c 26 Aug 2006 13:55:01 -0000 1.3.2.3
|
||||
@@ -111,7 +111,10 @@
|
||||
io->callback = callback;
|
||||
io->context = context;
|
||||
|
||||
- EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD,
|
||||
+ /* EV_CLEAR flag is needed because the EVFILT_VNODE filter reports
|
||||
+ event state transitions and not the current state. With this flag,
|
||||
+ the same event is only returned once. */
|
||||
+ EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_CLEAR,
|
||||
NOTE_DELETE | 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);
|
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= dovecot
|
||||
DISTVERSION= 1.0.rc7
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= mail ipv6
|
||||
MASTER_SITES= http://www.dovecot.org/releases/
|
||||
|
||||
|
14
mail/dovecot/files/patch-src_lib_ioloop-notify-kqueue.c
Normal file
14
mail/dovecot/files/patch-src_lib_ioloop-notify-kqueue.c
Normal file
@ -0,0 +1,14 @@
|
||||
--- src/lib/ioloop-notify-kqueue.c 16 Aug 2006 17:58:03 -0000 1.3.2.2
|
||||
+++ src/lib/ioloop-notify-kqueue.c 26 Aug 2006 13:55:01 -0000 1.3.2.3
|
||||
@@ -111,7 +111,10 @@
|
||||
io->callback = callback;
|
||||
io->context = context;
|
||||
|
||||
- EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD,
|
||||
+ /* EV_CLEAR flag is needed because the EVFILT_VNODE filter reports
|
||||
+ event state transitions and not the current state. With this flag,
|
||||
+ the same event is only returned once. */
|
||||
+ EV_SET(&ev, fd, EVFILT_VNODE, EV_ADD | EV_CLEAR,
|
||||
NOTE_DELETE | 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);
|
Loading…
Reference in New Issue
Block a user