Hi,
attached patch against test76 adds inotify support and the
--with-notify=... configure option that defaults to the current check
for dnotify using no special method if dnotify cannot be compiled, and
can be set to none, dnotify and inotify. If it is set to dnotify or
inotify, failure to compile a test program results in an error.
Also, it adds
| file change notification method ..... : <method>
to the output at the end of configure.
The only thing I don't like about this patch is the fact that I had to
add a field notify_context to struct io, but I didn't see a different
way to handle this.
Also, the patch doesn't support the condition parameter, it simply
always asks for all the relevant changes. I don't really see that it is
useful for in the context of file system notifications anyway.
I modeled this after ioloop-notify-dn.c with my other patch applied to
it, if you don't like the other patch you'll want to "revert"
that
change in the new ioloop-notify-inotify.c file as well.
Oh, and obviously I didn't include patches to configure and all the
Makefiles, so of course you'll have to run automake. But you already
knew that :)
I only tested this with maildir. I did add IN_MODIFY so I think it
should work with mbox too, but someone should probably verify.
Have fun,
johannes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inotify.diff
Type: text/x-patch
Size: 8474 bytes
Desc: not available
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20050708/4dcc7062/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: This is a digitally signed message part
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20050708/4dcc7062/attachment-0003.bin>