libinotify-kqueue
libinotify-kqueue copied to clipboard
incrond fails at monitoring directories
Hi,
On FreeBSD I built incron (on top of your libinotify) : http://inotify.aiken.cz/?section=incron&page=about&lang=en
it works great to minitor files but it fails at monitoring directories: $ ./incrontab -l /tmp IN_ALL_EVENTS logger toto
Nothing happen when I modify files in /tmp
Hello Baptiste,
Thanks for your report!
I have tried to build incron with the library on NetBSD several days earlier but failed (it haven't found sys/wait.h header or something like this). I will try to build it again today and to see what happens.
Did you run "make test" after building the library? The test results will probably give us more info regarding the issue.
Thanks again, Dmitry
Baptiste,
Could you please also check IN_CREATE and IN_DELETE notifications on incron (instead of IN_ALL_EVENTS)?. These events should be fired when a file or a subdirectory is created or removed in the watched directory.
Dmitry
On freebsd you can just drop the sys/wait.h maybe you can do the same on netbsd. the only problem you will have imho is cleanenv which you don't have and euiaccess (on freebsd we replace that by eaccess don't know for NetBSD)
BTW: IN_CREATE also fails
Ok, could you please rebuild the library with --enable-perrors configure option and post "make test" output here?
Thanks
Failed to open a file: No such file or directory .Collision found!: No error: 0 .............xx.........xx.......xx........................xx
In test "Directory notifications": failed: receive IN_DELETE_SELF on removing a directory failed: receive IN_IGNORED on removing a directory
In test "Open/close notifications": failed: receive IN_OPEN on cat failed: receive IN_CLOSE_NOWRITE on cat failed: receive IN_OPEN on ls failed: receive IN_CLOSE_NOWRITE on ls failed: receive IN_OPEN on modify failed: receive IN_CLOSE_WRITE on modify
Run: 62
Passed: 54 Failed: 8
Thanks!
So almost all the test cases for the directory notifications do pass on your system. All these failures are expected and known.
Now it would be very interesting to see if the library prints any error messages (now they are enabled) when starting watching on /tmp.
Could you please also try incron with other directories? The library 100% worked on my system when I've monitored changes in the /tmp/foo directory.
Dmitry
moniroting /tmp/foo directory work.
When I start monitoring only /tmp I got the following failures: Failed to open a file: Operation not supported Failed to start watching a dependency : Operation not supported
That should explain why the monitoring doesn't work.
Thanks
Okay, the issue becomes a bit more clear :) It is strange for me that library has failed to open /tmp. Probably it is because /tmp is a mount point for tmpfs or something like this, and I should pass some special flags to open(). Now I have a direction for the further investigation.
Thank you Baptiste very much!
While here, each incrond receive an event there is an error prompted: kevent failed: Interrupted system call
Thanks, will investigate it too.