• src/sbbs3/xtrn.cpp

    From rswindell@1:103/705 to CVS commit on Sun Aug 2 13:23:34 2020
    src/sbbs3 xtrn.cpp 1.262 1.263
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv16614

    Modified Files:
    xtrn.cpp
    Log Message:
    Add support for %^ command-line specifer which expands to the system architecture (e.g. "i686" for Win32 builds, "x64" for Linux-x86_64 builds).
    Currently, there underlying XPDEV macro definition does not differentiate between arm32 and arm64, but it should. Next...

    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Sun Aug 30 13:52:51 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/ec5cbb848bc16419cc4267a9
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Fix compile issue in previous commit. Add more semicolons.One can't have too many semicolons.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to sbbs/master on Thu Nov 5 00:02:18 2020
    https://gitlab.synchro.net/sbbs/sbbs/-/commit/ccf41a4c15bfdbb1b1aa46d3
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Don't log blank lines output from external programs on *nix
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbsmaster on Tue Nov 24 19:41:45 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/e2a9066d89af60010e8bf55b
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Fix Linux-DOSEMU buffer overflow warnings with sprintf() usage (!!!)
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbsmaster on Wed Nov 25 01:33:16 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/8312547f3d4e276ac722b7df
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Trim left-most whitespace from stderr lines of externals before logging.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Wed Nov 25 13:27:08 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/ca424956d4f80d5d313b7eca
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Don't do the special DOSEMU cmdline specifier magic if the cmd starts with '?'JavaScript modules are intuitively "native" and have not historically requiredthe "native" option to be set to "yes" in SCFG.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Fri Nov 27 20:20:45 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/02a967b2403024c0a572eb45
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Trim white-space from the start of stderr-logged string from xtrns... like the last commit that did this, but do in the other 2 places wherestderr output is logged as log messages.Also, include the extended program name in the stderr log messages, making iteasier to find the output you're looking for.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Mon Nov 30 17:09:27 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/5a1ab6a7e8040e06aecf3868
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    A second pass at: Better native vs. DOS cmd-line detection in cmdstr()cmdstr() is often called for non-executable command-lines (e.g. for @include: file name/path arguments), so don't default to native unless a mode value was specified. Hopefully addresses issue reported by bobrob without breaking anything else (again).
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Wed Dec 2 01:15:22 2020
    https://gitlab.synchro.net/main/sbbs/-/commit/87926cdac705ac979c403a5d
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Fix new GCC warning about unused variable.
    --- SBBSecho 3.11-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Wed Feb 17 10:55:55 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/0e6853aeef28d32a26bc2c46
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Correctly support 1,000 arguments to an externalPreviously, more than 999 arguments would overrun a buffer and breakthings.Fixes CID 33313
    --- SBBSecho 3.12-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sun Apr 4 13:22:13 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/7505f317f5581340ed1a9f60
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Fix use of uninitialized local variable (err_pipe[]) on *nixAnd other weirdness around EX_NOLOG mode checks.Addresses Coverity-scan CID 330048.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Wed Jan 26 20:10:24 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/9445866c80a38b5ee6c170ea
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Ignore VDD WriteFile() failures if the child process has terminatedIf the child process (e.g. door game) has terminated, don't log errors if/when WriteFile() to the mailslot fails. This would be expected as the mailslot is created/owen-by sbbsexec.dll which would also terminate along with the process, thus closing the mailslot. Hopefully resolves the errors reported by DesotoFireflite (VALHALLA).
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sat Jan 29 12:32:30 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/08ce315f97a09569f169ef89
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Suppress "VDD Open failed" warning if child process terminatedAnother log message reported by DesotoFireflite (VALHALLA) that can happen when a user has typed something while the programming is running and the program terminates before the data can be sent to it.
    --- SBBSecho 3.14-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Thu Apr 28 18:55:48 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/47e604723eb6eb602ed7e463
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    When running 16-bit DOS commands "offline" on Windows, don't use dosxtrnWe shouldn't need a virtual UART/FOSSIL driver to execute "offline" program (e.g. timed events) in the first place, and our virtual UART/FOSSIL for Windows wouldn't work right in the scenario anyway even if it did load successfully.This resolves the reported issues with timed events configured as not "native" returning error 255 (and not running successfully) on Windows with SBBS v3.19. I'm not even sure what changed exactly in xtrn.cpp, dosxtrn.c, and sbbexec.c between v3.18 and v3.19 that's causing this to now fail, but it (using DOSXTRN to run offline DOS programs) really shouldn't have been attempted in the first place. So that was just a design issue that happened to kind of sort of work up until v3.19.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Tue Jun 14 23:09:25 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/e54263fde0be580dcbaf77c8
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Log command-line that led to logged error opening DOSXTRN.RET
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Sat Jul 2 12:22:07 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/280f16f4f373956c17d2a5eb
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Add EXECDIR, DATADIR, and XTRNDIR to DOSemu command replacement tokensAs requested. This closes issue #416
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Wed Jul 6 18:23:10 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/ce475f794e112fa9c9f435c6
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Don't log error opening DOSXTRN.RET when terminating an externalIf we detect a client disconnection and terminate DOSXTRN.EXE, don't try to open DOSXTRN.RET and log an error when the file doesn't exist (as would be expected).
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Fri Oct 7 18:42:19 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/e7109c87bc43f21636c5f981
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    When user hangs-up on external programs on *nix, try to terminate w/SIGTERMPreviously, when a user disconnected or ran out of time while running astdio-based external program on *nix, if the program was still running, we'dsend it a SIGHUP, wait up to 10 seconds for the process to terminate and ifit did not, terminate it (ungracefully) with SIGKILL. Since some programscatch SIGTERM (and not SIGHUP) to indicate a termination request, we now willfirst attempt a SIGHUP, wait up to 5 seconds for the process to terminate andif it does not, then send a SIGTERM and wait up to another 5 seconds for itto terminate and if it doesn't, then finally send it a SIGKILL (which cannotbe caught and always results in an ungraceful termination of the childprocess).This doesn't resolve any specific problem with any specific stdio-basedexternal program, but I was playing around with ESR's port of Adventure(https://gitlab.com/esr/open-adventure) and a new auto-save/restore of gamestate and noticed that we weren't using SIGTERM for this situation, though weshould have. Most modern programs, if they catch SIGHUP at all, use it toindicate a refresh of configuration or data files, not a termination request(or indication that a user has "hung up"). So SIGTERM is more reasonable to beexpected to be caught and initiate the graceful termination of the childprogram that we're hoping for.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Thu Dec 29 09:35:16 2022
    https://gitlab.synchro.net/main/sbbs/-/commit/f78a70986d1e3b21b09ca32e
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Fix name of data event
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to Git commit to main/sbbs/master on Wed Jan 25 10:29:48 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/23513871ebc07d81e7cb83d8
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    0-init the 'gamedir' variableResolves CID 434888, not sure why this one didn't show up before.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Fri Oct 20 20:19:52 2023
    src/sbbs3 xtrn.cpp 1.251 1.252
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv19890

    Modified Files:
    xtrn.cpp
    Log Message:
    When the passthru_thead is running, the protocol (%p) command-line specifier will now expand to "raw" rather than "telnet/rlogin/ssh". This disables IAC handling in sexpots, for example, which isn't needed or desired when using
    the passthru socket.

    Also, put some conditional checks for passthru_thread_running in external()
    and if it's not (e.g. for testing purposes), then lock the input_thread_mutex instead of changing passthru_socket_active. This is currently just a way to easily test the differences between direct and passthru socket I/O
    (dependant on whether or not the passthru_thread is running which is controlled in main.cpp.


    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to rswindell on Fri Oct 20 20:19:52 2023
    Re: src/sbbs3/xtrn.cpp
    By: rswindell to CVS commit on Wed Aug 21 2019 11:31 am

    When the passthru_thead is running, the protocol (%p) command-line specifier will now expand to "raw" rather than "telnet/rlogin/ssh". This disables IAC handling in sexpots, for example, which isn't needed or desired when using the passthru socket.

    Course I meant to say "sexyz", not "sexpots". I seem to be conflating those two stupid program names more often latey.

    digital man

    Synchronet/BBS Terminology Definition #36:
    HTTPS = Secure HTTP (authenticated and encrypted HTTP over TLS)
    Norco, CA WX: 87.9øF, 31.0% humidity, 6 mph E wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From rswindell@1:103/705 to CVS commit on Fri Oct 20 20:19:52 2023
    src/sbbs3 xtrn.cpp 1.256 1.257
    Update of /cvsroot/sbbs/src/sbbs3
    In directory cvs:/tmp/cvs-serv28552

    Modified Files:
    xtrn.cpp
    Log Message:
    In *nix builds, change the second almost identical log "Executing external"
    log message to:
    - only log the message if the "full command line" is different than the
    command-line argument to the external() function. I'm pretty sure that was
    the reason for the addition of this log message, for debugging Linux-DOSEMU
    issues where the fullcmdline != cmdline.
    - change from INFO to DEBUG log level
    - change the message from "executing external: " to "Executing cmd-line: "


    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Fri Nov 10 21:03:12 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/47773812d5d779c3a2d5466a
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Eliminate unsafe sprintf calls (replaced with snprintf) in *nix build
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell (on Debian Linux)@1:103/705 to Git commit to main/sbbs/master on Fri Dec 8 23:03:47 2023
    https://gitlab.synchro.net/main/sbbs/-/commit/90de66ac9910333dfdf76d98
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Move the startup directory checking to the "native" block of *nix build

    of sbbs_t::external()

    The startup directory for DOS doors might not be a valid Unix (case-sensitive) path, so let's just do that check in the native block here.

    Also, removed a bunch of redundant startup_dir ==/!= NULL checks. It can't be NULL here.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Mon Feb 12 14:07:17 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/241475effe9d6c09d677b323
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Since on at least Debian 12.4, the ttydefaults array is completely
    wrong, do c_cc the stupid (but POSIXly correct) way with a billion
    supporting.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Mon Feb 12 14:26:47 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/d1642fb88cf3d8ac38c6d8e2
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Explicitly initialize c_cc to _POSIX_VDISABLE since we can't know
    that we're setting all the values anymore. :(
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Deucе@1:103/705 to Git commit to main/sbbs/master on Mon Feb 12 14:54:00 2024
    https://gitlab.synchro.net/main/sbbs/-/commit/9db2d372ed865d17b7fb4ce2
    Modified Files:
    src/sbbs3/xtrn.cpp
    Log Message:
    Don't use i for loop index since it's signed.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)