Patch: inotify monitor being too agressive
Frederic Crozat
fcrozat at mandriva.com
Thu Mar 27 02:40:44 PDT 2008
Hi,
I've got bug report on dbus not seeing new configuration files (while
inotify monitoring should work fine).
After some investigation, I noticed inotify monitoring is a little too
good : when file are created by package manager, IN_CREATE event might
be fired before file is finished writing on disk : in this case, dbus
will discard the file (since it is not valid XML) and will not put back
a monitor on configuration directory.
Attached patch fixes this behavior by monitoring only IN_CLOSE_WRITE,
IN_DELETE, IN_MOVE_TO and IN_MOVE_FROM events. This way, only atomic
changes to configuration file are monitored.
It also fixes a build error when enabling verbose mode.
--
Frederic Crozat <fcrozat at mandriva.com>
Mandriva
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dbus-1.1.20-fixmonitor.patch
Type: text/x-patch
Size: 1385 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/dbus/attachments/20080327/1b517678/attachment.bin
More information about the dbus
mailing list