[PATCH] fix inotify support
Frederic Crozat
fcrozat at mandriva.com
Thu Jan 17 09:04:00 PST 2008
Le jeudi 17 janvier 2008 à 17:43 +0100, Timo Hoenig a écrit :
> 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?
Yes, sorry about that, as John noticed just when he reviewed my initial
patch for the support, the configure.in part was broken and therefore,
when I thought I had this code tested, it wasn't enabled at all.
> 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.
Great patch, fixed the issue.
John, please, commit it.
--
Frederic Crozat <fcrozat at mandriva.com>
Mandriva
More information about the dbus
mailing list