aboutsummaryrefslogtreecommitdiff
path: root/tests/test-chime-notifications.el
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-07-09 19:58:27 -0500
committerCraig Jennings <c@cjennings.net>2026-07-09 19:58:27 -0500
commite43e44cb4cef93b3e3ae68396a0af639cea1534f (patch)
tree251689657db975cd9b7e7d6bbaa5fb9a798e7860 /tests/test-chime-notifications.el
parent67eb495da255d0cf00c88448f8cfd232c88563d1 (diff)
downloadchime-e43e44cb4cef93b3e3ae68396a0af639cea1534f.tar.gz
chime-e43e44cb4cef93b3e3ae68396a0af639cea1534f.zip
fix: kill abandoned async children and discard their late callbacks
Three faults in one path, all made reachable by the watchdog. A callback returning just past the timeout ran against state that no longer belonged to it. It nil'd chime--process, which by then held the replacement child, so the overlap guard broke and a third child could spawn. It also reset the failure counter the watchdog had just incremented. Each spawn now captures a generation, and a result whose generation is stale is discarded whole. interrupt-process only asks. A child stuck in a blocking read ignores SIGINT and lives on as a zombie, invisible because chime--process was already cleared. The watchdog and chime--stop now call chime--kill-async-process, which silences the sentinel and calls delete-process. async.el kills a child's process buffer only on a zero exit, so every signalled child leaked one. With a persistent hang that's a buffer per chime-async-timeout until Emacs restarts. The kill path reaps the buffer itself. chime--stop also clears chime--consecutive-async-failures and chime--process-start-time, so a later chime-mode doesn't resume with the old count.
Diffstat (limited to 'tests/test-chime-notifications.el')
0 files changed, 0 insertions, 0 deletions