• exec/tests/qwkjob/pack.js

    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/4a18a063c5f20918ebd09fc8
    Modified Files:
    exec/tests/qwkjob/pack.js src/sbbs3/exec.cpp ftpsrvr.cpp qwkjob.cpp web/root/qwk.ssjs
    Log Message:
    qwkjob: spare live jobs' temp dirs; FTP and web packet re-checks

    - The temp/qwk/ prune judged a job directory stale by its modification
    time alone (1 hour), so a running job whose directory sat idle (a slow
    archiver, a stalled network file system) could have it deleted. The age
    is now 6 hours, and a directory named for this host is kept while its
    process is running: another process is checked with kill(pid, 0)
    (OpenProcess() on Windows), this process by the job directories it has
    in use.
    - FTP: while waiting for a packing slot, a QWK download now re-checks for
    data/file/<user#>.qwk after each wait and sends a packet another session
    created meanwhile, instead of packing again over the one being sent.
    - qwk.ssjs: an "empty" pack result serves a packet another session created
    since the first check, as the FTP server does.
    - A job's headless sbbs_t has no usable startup or server hosts for a
    JavaScript context, which an EX_SH ?script archiver could reach through
    external() -> js_execxtrn(). js_execxtrn() and js_execfile() now refuse
    in a job ("JavaScript not available in QWK jobs") without calling
    js_init().

    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:58:00 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/3881be3f01b1a70348c07ce1
    Modified Files:
    exec/tests/qwkjob/pack.js src/sbbs3/ftpsrvr.cpp jsexec.cpp main.cpp qwkjob.cpp qwkjob.h sbbs.h services.cpp websrvr.cpp web/root/qwk.ssjs
    Log Message:
    qwkjob: log like the hosting session; name files after this machine

    QWK job log lines carried a fixed per-server label ("ftp <alias> ...",
    "web", "srvc", "term") where the server's own lines carry the client socket number. Each session now hands the job a copy of its server's job host
    labeled with its socket (FTP, Web and Services, formatted "%04d" like their other lines) or "Node N" (Terminal Server scripts), so the lines read
    "1752 <alias> Packing QWK Message Packet". Jobs started from event-thread scripts get no label, since the event log already tags them.

    The per-host part of job file names (temp dirs, data/file staging names and
    the FTP and Web REP names) was the configured system host name, a FQDN ("vert.synchro.net"). It is now the machine name from gethostname() ("VERT"), as in sbbs.<host>.ini and the per-host semaphore files; the new qwkjob_local_host_name() returns it, made safe for a file name, and qwk.ssjs uses system.local_host_name. The lock files' owner text is unchanged.

    The data/file staging names now say what they hold: <user#>.<host>.<pid>.qwk.tmp for a QWK packet being packed, and <user#>.<host>.ftp<socket>.rep.tmp / <user#>.<host>.web<token>.rep.tmp for
    a REP packet being queued.

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