Commit graph

6 commits

Author SHA1 Message Date
Colin Walters
8a9880ffd2 Clean up inotify watch handling
Substantially based on a patch by Matthias Clasen <mclasen@redhat.com>
kqueue implementation by Joe Marcus Clarke <marcus@freebsd.org>

Previously, when we detected a configuration change (which included
the set of config directories to monitor for changes), we would
simply drop all watches, then readd them.

The problem with this is that it introduced a race condition where
we might not be watching one of the config directories for changes.

Rather than dropping and readding, change the OS-dependent monitoring
API to simply take a new set of directories to monitor.  Implicit
in this is that the OS-specific layer needs to keep track of the
previously monitored set.
2010-02-01 16:22:56 -05:00
Tobias Mueller
dc33f4f774 Bug 21161 - Update the FSF address
No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 5baf2f856a)
2009-07-14 15:39:47 -04:00
Havoc Pennington
d012387afe 2007-07-13 Havoc Pennington <hp@redhat.com>
* Add indent-tabs-mode: nil to all file headers.
2007-07-14 02:44:01 +00:00
Havoc Pennington
43b944a0a6 2007-06-15 Havoc Pennington <hp@redhat.com>
* dbus/dbus-sysdeps.c (_dbus_set_errno_to_zero)
	(_dbus_get_is_errno_nonzero, _dbus_get_is_errno_eintr)
	(_dbus_strerror_from_errno): family of functions to abstract
	errno, though these are somewhat bogus (really we should make our
	socket wrappers not use errno probably - the issue is that any
	usage of errno that isn't socket-related probably is not
	cross-platform, so should either be in a unix-only file that can
	use errno directly, or is a bug - these general errno wrappers
	hide issues of this nature in non-socket code, while
	socket-specific API changes would not since sockets are allowed
	cross-platform)
2007-06-15 19:28:36 +00:00
John (J5) Palmieri
fe1f793a4f * bus/dir-watch-default.c, bus/dir-watch-dnotify.c,
bus/dir-watch-kqueue.c (bus_watch_directory): Pass in a BusContext
  instead of a void *.  kqueue uses this to get the context's loop
  while the other modules ignore the parameter.  This allows us to
  avoid platform conditionals

* bus/bus.c (process_config_postinit): Pass in the context to the
  watch
2006-10-19 19:43:05 +00:00
John (J5) Palmieri
d387411488 * dbus/dbus-sysdeps.h:
* dbus/dbus-sysdeps.c:
* dbus/dbus-string.c:
  s/_dbus_printf_length/_dbus_printf_string_upper_bound to comform with
  GLib's function which does the same thing

* configure.in:
* bus/Makefile.am:
* bus/dir-watch-default.c:
* bus/dir-watch-dnotify.c:
* bus/dir-watch-kqueue.c:
  Add kqueue directory watching for freebsd and split the directory
  watching code into seperate files per method/arch
  (patches from Timothy Redaelli <drizzt at gufi dotorg>)
2006-08-08 22:08:39 +00:00