• src/sbbs3/jsexec.cpp

    From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Tue Sep 29 15:57:27 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/aba1e3e94f2480835d0936a1
    Modified Files:
    src/sbbs3/jsexec.cpp
    Log Message:
    jsexec: don't call lprintf() from the SIGTERM/SIGHUP handlers

    break_handler() and recycle_handler() logged "Terminated/Recycled Locally"
    via lprintf(), which locks output_mutex. A signal arriving while the main thread was inside lprintf() deadlocked the process on that mutex, so a long-running jsexec service (IRC bot, ircd) could ignore SIGTERM until systemd's stop timeout SIGKILLed it. Reproduced in 15 of 40 SIGTERMs to a script that logs continuously; 0 of 40 with this change.

    The handlers now only record the signal and set the flags; the messages
    are logged from the main thread once js_exec() returns.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    --- SBBSecho 3.37-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)