cfg-guard: a file lock and content-hash check for shared config files
The cfg-guard tool is presented as a guard for configuration files that many people edit. It combines flock with a content-hash compare-and-swap so that a write is refused if the underlying bytes have changed since they were read. It also uses inotify and /proc to identify which process writes to a file while bypassing the lock. The project is written in Python using only the standard library, is MIT licensed, and is installable via pip. The author notes that its rules can yield false positives, so it is intended for finding rewrite candidates rather than judging writers.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in