aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-14 19:32:02 +0200
committeruser <user@clank>2026-08-14 19:32:02 +0200
commit6a6799bfc0eb8662df12b636e4fe537b84a5d484 (patch)
tree887b96ef94def60fad351cf41070a86be94a7f56 /docs
parentsl0ppty: saving the config reloads it (diff)
downloadslosh-6a6799bfc0eb8662df12b636e4fe537b84a5d484.tar.gz
slosh-6a6799bfc0eb8662df12b636e4fe537b84a5d484.tar.xz
slosh-6a6799bfc0eb8662df12b636e4fe537b84a5d484.zip
sl0ppty: one save, one reload
A double "config reloaded" was reported, and the immediate cause was me saving the file twice in a row — but looking properly turned up a real one underneath. One save is not always one inotify event. Watching a directory for CLOSE_WRITE, MOVED_TO and CREATE, an editor that *creates* the file rather than rewriting it produces CREATE and then CLOSE_WRITE, measured, and each one was reloading the config and announcing it. Rewriting in place gives one event, and so does the rename-over that sed and vim do, which is why it took a specific kind of editor to see it. Events now arm a deadline rather than reloading, and the reload happens once the file has been quiet for eighty milliseconds. That collapses the double, and also means an editor that writes in chunks is read after it has finished rather than halfway through — which should make the mid-save parse error, the thing the fail-open behaviour exists for, rarer than it was. The test counts the toasts, because toasts stack: a config that reloaded twice says so twice, which is exactly what was seen on screen. I checked it against the un-debounced build first and it reported two, so it is testing the thing it claims to.
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions