summaryrefslogtreecommitdiffstats
path: root/autoreload_inotify.c
AgeCommit message (Collapse)Author
2018-02-18Ignore outdated inotify eventsBert Münnich
2017-10-16One header file for type definitions and function declarationsBert Münnich
2017-05-17Update copyright notice in autoreload_inotify.cBert Münnich
2017-05-17Detect all file overwrites in autoreload_inotifyBert Münnich
mv(1) inside the same filesystem was not detected. Supporting this case made it necessary to always watch the directory. Turns out the logic and state keeping between arl_setup() and arl_handle() is easier, when using different watch descriptors for the file and the directory and not using a oneshot descriptor for the file. Requiring an absolute canonical path for arl_setup() simplifies dir and base name splitting. No need for dirname(3) and basename(3) anymore.
2017-05-17Compiler independent buffer alignmentBert Münnich
2017-05-17Read all available inotify eventsBert Münnich
Loop reading from inotify fd in arl_handle(); requires non-blocking inotify fd.
2017-05-17Simplify inotify cleanupBert Münnich
2017-05-17Revised error reporting in autoreload_inotifyBert Münnich
No repeated error messages after failed initialization. No error messages on failed inotify_rm_watch().
2017-05-17Fix code-style in autoreload_inotify.cBert Münnich
2017-05-17Revised autoreload interfaceBert Münnich
Make the header only contain the public interface and nothing from the implementation. All functions get a handle to their self object, like the img_ and tns_ and win_ functions. All necessary data (file path) is also passed as an argument, so that no extern redeclarations are needed. Make arl_setup_dir() private, it's not called outside the module. Make arl_handle() return true if the file has changed, so that the reloading of the file can be done by the caller.
2017-05-17Add autoreload support by inotify (and dummy backend nop)Max Voit