• src/sbbs3/xtrn.cpp

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Saturday, March 01, 2025 15:05:35
    https://gitlab.synchro.net/main/sbbs/-/commit/76fa22e427a7b9978084bf94
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Remove lprintf() call from child process of fork() call on *nix

    the info-level debug message "Detaching external process"... as this appears
    to be the cause of background events hanging sometimes, on Linux (at least).

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Monday, October 20, 2025 20:05:53
    https://gitlab.synchro.net/main/sbbs/-/commit/35d530c3a4eccd6b2ed1964b
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Disable pause when running an external program.

    Not sure if this is from the terminal overhaul or from the unicode
    support, but passthru_thread calls rputs() which calls cp437_out()
    which calls outchar() which calls check_pause().

    Also, put an EINTR wrapper around waidpid()... that wasn't the
    problem I was seeing, but it's a theoretically possible one.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Monday, October 20, 2025 20:24:10
    https://gitlab.synchro.net/main/sbbs/-/commit/47e263f1e72073e9488db9f8
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Remove unneeded debug logging.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Tuesday, October 21, 2025 01:09:42
    https://gitlab.synchro.net/main/sbbs/-/commit/00d24f1bfc0f8e2f5453579f
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Revert "Disable pause when running an external program."

    This reverts commit 35d530c3a4eccd6b2ed1964bf21cbcf9237da721.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¨@VERT to Git commit to main/sbbs/master on Sunday, October 26, 2025 14:19:30
    https://gitlab.synchro.net/main/sbbs/-/commit/3f97c2713305442a55035063
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Fix error in 35d530c3a4e

    Instead of looping while waitpid() returned an error due to a signal,
    it was looping *until* waitpid() returned an error due to a signal.

    This could cause an infinite loop on *nix systems after an external
    exited if waitpid() was returning an error for some other reason.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Sunday, January 11, 2026 19:36:10
    https://gitlab.synchro.net/main/sbbs/-/commit/5d43eed990eda19d808d8c92
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Don't use dosemu paths in command-lines when dosemu support is disabled

    This just adds to confusion when debugging weird errors, like this:

    pack_qwk.cpp line 753 (pack_qwk) executing "H:\zip -jD /sbbs/data/file/0230.qwk

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Friday, July 10, 2026 01:39:22
    https://gitlab.synchro.net/main/sbbs/-/commit/f175c6ad7c7d35905bf19189
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Add cmdline specifiers for terminal type and charset (%< and %>) - lowercased

    e.g. for use on the command-line to (new door game) Immortal Barons https://andy5995.github.io/immortal-barons/door-setup/#character-set

    Allowing it to send UTF-8 or CP437, untranslated by sbbs, to the appropriate user/terminals, if desired.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Windows 11)@VERT to Git commit to main/sbbs/master on Tuesday, July 21, 2026 01:41:46
    https://gitlab.synchro.net/main/sbbs/-/commit/de1662c069cb723cd2acd958
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Log an error when an external program's command line is truncated

    sbbs_t::external() assembles the child's command line into
    fullcmdline[MAX_PATH + 1] -- 260 usable characters -- via SAFEPRINTF / SAFECOPY, both of which truncate SILENTLY. That string IS the child's entire command line, so an over-long one runs the program with its trailing
    arguments missing.

    The failure is very hard to diagnose because the evidence contradicts the symptom: the "Executing external" log line prints the command we MEANT to
    run, while the child received a shortened one. Observed with a SyncRetro
    door whose lobby built a 334-character line -- the ROM path fell off the end and the door reported its content missing while the log showed that
    content's full path, which sent the search in entirely the wrong direction.

    Log the truncation on both branches, with the length it was cut to, the
    length it needed, and the command as actually issued.

    The needed length is MEASURED from the inputs rather than read from snprintf()'s return, which looks backwards and is commented as such at both sites: genwrap.h redirects snprintf() to xpdev's safe_snprintf() unless USE_SNPRINTF is defined, and that wrapper clamps its return to size-1 (31 callers accumulate with `d += snprintf(...)` and would otherwise run past
    the buffer). USE_SNPRINTF is set only for darwin and freebsd, so the return value is the C99 would-be length on those and the truncated length on Linux
    and Windows -- a check written the obvious way would work on a developer's
    Mac and be silently dead in production.

    This only reports; nothing is resized. Note that cmdstr() has its own,
    earlier limit (cmdstr_output[512]) which is likewise silent, so a very long configured command line can already be shortened before external() ever
    sees it.

    Windows branch compiles clean; the *nix branch is UNCOMPILED here (no
    GCC/Clang on this host) and the log message has not yet been observed
    firing.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net