diff options
author | marcus <marcus@FreeBSD.org> | 2006-05-03 01:04:09 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2006-05-03 01:04:09 +0800 |
commit | 4b6c6d98388e9d0c5b85e41cb116dd4401473d73 (patch) | |
tree | 500af492dee5d8ec2feb26d236178ca32300055d /devel/dbus | |
parent | c1c9a0bff6ad2af718221fecef84ba5d6e1c32b3 (diff) | |
download | freebsd-ports-gnome-4b6c6d98388e9d0c5b85e41cb116dd4401473d73.tar.gz freebsd-ports-gnome-4b6c6d98388e9d0c5b85e41cb116dd4401473d73.tar.zst freebsd-ports-gnome-4b6c6d98388e9d0c5b85e41cb116dd4401473d73.zip |
Add a half-second delay before HUP'ing the system daemon when the system.d
contents change. This avoids a race with install(1) that causes dbus
to die. Also, adjust the list of kevent notes to be closer to what dnotify
is using in Linux.
Diffstat (limited to 'devel/dbus')
-rw-r--r-- | devel/dbus/Makefile | 2 | ||||
-rw-r--r-- | devel/dbus/files/patch-bus_dir-watch.c | 11 |
2 files changed, 8 insertions, 5 deletions
diff --git a/devel/dbus/Makefile b/devel/dbus/Makefile index 7903165e0264..4d8b9cabdd3c 100644 --- a/devel/dbus/Makefile +++ b/devel/dbus/Makefile @@ -7,7 +7,7 @@ PORTNAME= dbus PORTVERSION= 0.61 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES?= devel gnome MASTER_SITES= http://dbus.freedesktop.org/releases/ diff --git a/devel/dbus/files/patch-bus_dir-watch.c b/devel/dbus/files/patch-bus_dir-watch.c index 2eb1dfa1a882..c848f1fd9746 100644 --- a/devel/dbus/files/patch-bus_dir-watch.c +++ b/devel/dbus/files/patch-bus_dir-watch.c @@ -1,5 +1,5 @@ --- bus/dir-watch.c.orig Tue Jun 14 22:31:38 2005 -+++ bus/dir-watch.c Sun Jul 3 02:07:14 2005 ++++ bus/dir-watch.c Tue May 2 12:52:08 2006 @@ -28,17 +28,25 @@ #include <stdlib.h> #include <unistd.h> @@ -28,7 +28,7 @@ /* use a static array to avoid handling OOM */ static int fds[MAX_DIRS_TO_WATCH]; static int num_fds = 0; -@@ -92,6 +100,144 @@ bus_drop_all_directory_watches (void) +@@ -92,6 +100,147 @@ bus_drop_all_directory_watches (void) } } @@ -59,6 +59,10 @@ + + res = kevent (kq, NULL, 0, &ev, 1, &nullts); + ++ /* Sleep for half a second to avoid a race when files are install(1)'d ++ * to system.d. */ ++ usleep(500000); ++ + if (res > 0) + { + pid = getpid (); @@ -139,8 +143,7 @@ + } + + EV_SET (&ev, fd, EVFILT_VNODE, EV_ADD | EV_ENABLE | EV_CLEAR, -+ NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_LINK | NOTE_RENAME | -+ NOTE_REVOKE, 0, 0); ++ NOTE_DELETE | NOTE_EXTEND | NOTE_WRITE | NOTE_RENAME, 0, 0); + if (kevent (kq, &ev, 1, NULL, 0, NULL) == -1) + { + _dbus_warn ("Cannot setup a kevent for '%s'; error '%s'\n", dir, _dbus_strerror (errno)); |