-
Notifications
You must be signed in to change notification settings - Fork 5
add test and sample #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Pretty sure the change to getMessage is incorrect, as a buffer can consist of multiple inotify messages |
It's not clear to me what your example code is supposed to accomplish, here. You might be interested in my LogFollower.hs example. It's basically an implementation of Perhaps you could remove the log rotation mechanism, and use that as part of your pull request. |
Ok, I see what you'd like to do, I think. I might be able to help you along a little bit, if you'd like. |
yep what would be awesome 🛩 |
something that I would like to test: fsnotify/fsnotify#92 (comment) same issue will happen here due to vim events after writing a file we will stop getting events |
Ok, it's pretty easy to create a simple "inotify dump" type programs, I created one myself which I just might be able to find. (Though I simply displayed the event flags field in hex, and didn't bother making it look super nice.) Regarding the issue you linked, that gets into a huge can of worms regarding file system semantics and the exact system calls that other programs use to manipulate a posix-ish file system. On ext4, I can totally rewrite the contents of a file without generating anything more than a move overwrite type of event, and I can be almost as clean on filesystems without |
Agreed that the issue gets complex if you start digging into it, found threads such as this that clearly exposes points as yours, and solutions such as implementing a posix filesystem using sqllite, or going though sqllite code since it: "competes against fopen not rdbms" which it's a suprising statement for me. Anyhow getting around the quirks of other programs (editors and such) way to handle files and still using just inotify imho remains a simpler (and perhaps naive) solution to monitor fs events. Hope that eventually handling this kind of events would be a must for any program that deals with fs, think that we are going in that direction with fanotify |
Yes, fanotify may well be a better, easier way to go, depending on your use case. Another example of something I've used this binding for, was for signaling javascript reloads in my react-comments backend for a previous incarnation of Facebook's react tutorial. |
No description provided.