User Activity

  • Posted a comment on merge request #3 on Watchdog

    Paul, It works great! Thanks for the great solution! P.S. I just realized, that in my shared memory approach, I didn't really need shm_open()/shm_unlink() and could have used the same mmap(..., MAP_SHARED | MAP_ANONYMOUS, ...) as you did in your fix.

  • Posted a comment on merge request #3 on Watchdog

    Paul, Oh, great solution! Let me give it a try.

  • Posted a comment on merge request #3 on Watchdog

    Let me see if your idea for comparing times can be implemented quickly. Here's another approach (please, find a proof-of-concept patch attached), which tries to detect a time jump, and wait for the whole file check interval before returning a failure. This won't work correctly in a terminal case of time jumping very frequently, or on a heavily loaded system, where system-monotonic time difference varies greatly. Also, there might be some other conditions, which I missed. To me, shared memory approach...

  • Posted a comment on merge request #3 on Watchdog

    Paul, Sorry, I crafted a quick proof-of-concept patch before reading your email. (please, find it attached) Basically, it sets up a shared memory segment, calls check_file_stat(), copies updated filemode back to parent, tears down the shared memory segment. This might not be very efficient, but it makes every file check operate on its own memory segment preventing possible races. Being a proof-of-concept, it lacks any error checking whatsover. It seems to work, but does obviously create a shared...

  • Posted a comment on merge request #3 on Watchdog

    Sure, no problem. Ah, I see, that's watchdog 6.0 changes, right? Glad that they got merged into master finally. Time for a new release. ;) The bad news is that my file mtime check change doesn't work with dd3c4b6 Safe check for file status because the latter forks a new process for every check and the saved mtime doesn't get carried over. Not sure what's the right thing to do -- need a way for the func run the in child to pass something back to the parent. (shmem, pipe, something else?)

  • Posted a comment on merge request #3 on Watchdog

    Paul, Thank you for merging the pull request so quickly! Wow, there are lots of changes. The code builds on a recent amd64 Linux distro (gcc-7.3, glibc-2.27), and cross-compiles for ARM (gcc-4.8, glibc-2.16) just fine. I'll do some testing and let you know if something doesn't work anymore.

  • Posted a comment on ticket #6 on Watchdog

    Here is another implementation of the same idea: https://sourceforge.net/p/watchdog/code/merge-requests/3/ Basically, the same thing but a bit simpler, without maintaining the correction value.

  • Created merge request #3 on Watchdog

    Use monotonic clock for file mtime monitoring

View All

Personal Data

Username:
ahippo
Joined:
2003-03-21 19:27:37

Projects

This is a list of open source software projects that Andrey Mazo is associated with:

Personal Tools