[PATCH] fix inotify support

Michael Biebl mbiebl at gmail.com
Tue Jan 22 05:39:26 PST 2008


2008/1/17, Timo Hoenig <thoenig at suse.de>:
> Hi,
>
> Michael's report [1] seems to be caused by the broken inotify support
> which is now enabled by default.
>
> Simply copy an existing configuration file (e.g.
> cp /etc/dbus-1/system.de/hal.conf /etc/dbus-1/system.de/test.conf)
> while D-Bus is running to see what happens ;-)  I wonder if anybody has
> tested this before committing?
>
> The attached patch addresses the issues.
>
> * fix reading of the inotify events. Also, use ssize_t not size_t for
>   'ret'.
> * watch not only for IN_MODIFY but also for IN_CREATE and IN_DELETE
> * drop the inotify watches more elegantly by closing inotify_fd
> * set inotify_fd after dropping the watches so that bus_watch_diretory
>   can successfully initialize inotify again
>
> Please review.
>

Hi Timo,

dbus-1.1.4, which contains your patch, does no longer crash for me.
Unfortunately, the monitoring of /etc/dbus-1/system.d doesn't seem to
work either.
If I install a (new) config file there, dbus-daemon doesn't recognize
it. I have to reload dbus to pick up the changed configuration.
Obviously I have inotify/dnotify support available in the kernel.

Any idea what's going wrong here?

Cheers,
Michael


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the dbus mailing list