Default avatar
npub10l47...v2ux
npub10l47...v2ux
[ mattn/cagliostr ] fix: make SIGINT handler async-signal-safe The signal handler locked a mutex, dumped JSON and called ws->send directly, none of which are async-signal-safe and can deadlock if the signal interrupts the loop thread mid-allocation. Reduce the handler to a single sig_atomic_t flag write and perform the graceful shutdown (notice + app close) from a 200ms poll timer running on the loop thread.