Skip to content
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

feat: reliably detect config file modification #84

Merged
merged 6 commits into from
Mar 14, 2024

Conversation

shouya
Copy link
Owner

@shouya shouya commented Mar 14, 2024

As reported in #80, the fs watcher previously cannot detect config changes made using vim.

Vim's default save file behavior (controlled by backupcopy option) is to save the file under a new name and then rename it to override the original file. As such, the inode of the previously watched file is gone and will no longer triggers inotify events.

This PR addresses the issue by additionally detecting file remove events, and re-launch the watcher on the same path when the file is found deleted.

In case the config file is truly deleted instead of being overridden, the watcher will wait indefinitely until the file has been recreated.

Fixes #80.

@shouya shouya merged commit b249791 into master Mar 14, 2024
2 checks passed
@shouya shouya deleted the watch-config-file-rename branch March 14, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RSS_FUNNEL_WATCH=true is unreliable
1 participant