Files
MeshTerm/meshterm
Jean-Pierre MartineauandClaude Opus 4.8 aa537d5503 Force process exit if teardown wedges on quit
The app sometimes hung on exit. The device/async teardown is clean; the
culprit is prompt_toolkit's Windows input reader, which runs on a
non-daemon executor thread blocked in a Win32 wait. In a rare teardown
race that thread stays blocked and the interpreter's atexit thread joins
hang the process after cleanup is already done.

Arm a daemon watchdog once the user commits to quitting: if a clean exit
doesn't complete within a grace period it flushes and os._exit(0)s. A
daemon thread still runs while the main thread is stuck in that join, so
it always terminates. The happy path is untouched (the process is gone
before the timer fires) and committed DB writes are durable regardless.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 19:35:25 -04:00
..