• docs/v322_new.md exec/tes

    From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Mon Oct 26 00:09:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/4365e08932e3ba60d0f41e58
    Modified Files:
    docs/v322_new.md exec/tests/qwkjob/hub.js pack.js src/sbbs3/qwk.cpp qwkjob.cpp qwkjob.h sbbs.h
    Log Message:
    qwkjob: take over a QWK lock left by a crashed holder after an hour

    The user (data/pack<user#>.lock), REP and hub (data/qnet/<HUBID>.lock)
    locks were taken with TIMEOUT_MUTEX_FILE (12 hours) as the fmutex maximum
    age. On POSIX a lock file outlives a holder that crashes, and these locks
    are now taken by the Web server, Services and jsexec too, so one crash
    left that user's or hub's QWK traffic refused for up to 12 hours, logged
    only at debug level.

    The jobs and the Terminal Server's QWK download and upload now take the
    locks with QWKJOB_LOCK_MAX_AGE (1 hour). A refusal is logged with the
    holder's text and how long the lock has been held, at LOG_NOTICE once that exceeds QWKJOB_LOCK_NOTICE_AGE (5 minutes), else at LOG_DEBUG. The event thread's hub call-out takes the lock through qwkjob_lock_hub(), so it
    logs the same way.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Mon Oct 26 00:09:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/251c99b699627b5dbad0ad3b
    Modified Files:
    docs/v322_new.md exec/tests/qwkjob/hub.js src/sbbs3/nopen.c qwk.cpp qwkjob.cpp qwkjob.h
    Log Message:
    fmutex_close(): remove only our own lock file; hub lock ages out at 12 h

    fmutex_open() takes over a lock file older than its max_age, and nothing refreshes a lock's time stamp while it is held. fmutex_close() then
    unlinked by name, so a holder that outlived max_age removed the lock of
    the process that took it over, leaving the next job free to run beside
    it. On POSIX, fmutex_close() now unlinks only when the open descriptor and
    the named file have the same device and inode; a missing or different file
    is no longer ours and is left alone. The descriptor is now always closed:
    a failed unlink used to return early and leak it. (Windows deletes on
    close and is unchanged.)

    The QWKnet hub lock is held across the event thread's call-out, which can
    run longer than the hour that QWK job locks were given for a crashed
    holder. The hub lock goes back to 12 hours (QWKJOB_HUB_LOCK_MAX_AGE, as
    before the QWK job locks); the per-user and REP locks, held only for one
    pack or import, keep 1 hour (QWKJOB_USER_LOCK_MAX_AGE).

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • From Rob Swindell (on Debian L@VERT to Git commit to main/sbbs/m on Sat Nov 14 13:59:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/1fc7b3b579e137acec3b7f1e
    Modified Files:
    docs/v322_new.md exec/tests/test.js src/sbbs3/exec.cpp
    Log Message:
    Search mods and exec for relative ?script paths not found from ctrl

    A ?script command line (;EXEC, bbs.exec(), external program, editor and
    menu command lines) with a bare script name is searched for in the
    startup directory, mods and exec. A relative path containing a directory
    was only opened relative to the current directory, which is the ctrl
    directory, so ?tests/test.js failed even though exec/tests/test.js
    exists.

    Such a path is still tried relative to ctrl first, so every command line
    that resolved before resolves the same way (e.g. ?../xtrn/...). Only when
    it isn't found there is it searched for like a bare name: startup
    directory, then mods, then exec.

    The @-code test runner's usage comment now uses the short form:
    ;EXEC ?tests/test.js atcodes

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>