-
src/sbbs3/jsexec.c
From
deuce@1:103/705 to
CVS commit on Fri Dec 29 20:07:12 2017
src/sbbs3 jsexec.c 1.188 1.189
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv32075
Modified Files:
jsexec.c
Log Message:
DigitalMan's commit from over a year ago (1.184, Nov-15-2016) to fix console input on Windows (e.g. the prompt() method no longer worked) broke JSDoor,
and caused Windows and Linux console input to behave differently. Create functions to cook/thaw the tty, and call them around stdin things.
This change was related to his postpoll.js work, so that might be broken now.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
deuce@1:103/705 to
CVS commit on Fri Dec 29 20:23:24 2017
src/sbbs3 jsexec.c 1.189 1.190
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv2513
Modified Files:
jsexec.c
Log Message:
Fix previous commit for Windows.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Dec 29 20:42:55 2017
src/sbbs3 jsexec.c 1.190 1.191
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv4703
Modified Files:
jsexec.c
Log Message:
Remove 'ENABLE_VIRTUAL_TERMINAL_INPUT' : undeclared identifier
Not defined in MSVC2013.
Appears to work again/still.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 5 18:45:20 2018
src/sbbs3 jsexec.c 1.191 1.192
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/home/rswindell/sbbs/src/sbbs3
Modified Files:
jsexec.c
Log Message:
Fix gcc warnings about #warning usage (missing terminating ' char)
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Fri Jan 12 14:31:09 2018
src/sbbs3 jsexec.c 1.192 1.193
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv10850
Modified Files:
jsexec.c
Log Message:
Added command-line option -C (capital 'C'):
- This option instruts JSexec to *not* change the current working directory to
the control (CTRL) directory
- This is useful when using jsexec to deal with files and passing relative
paths or wildcards on the command-line
- Warning: scripts executed with this option may behave differently than the
same script executed from SBBS where the current working directory is always
the CTRL directory.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Tue Feb 13 23:55:11 2018
src/sbbs3 jsexec.c 1.193 1.194
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv2514
Modified Files:
jsexec.c
Log Message:
environ is a magic word in msvc2013+, don't use it (fixes crash in msvc2013/2017 build)
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
deuce@1:103/705 to
CVS commit on Thu Mar 8 15:52:33 2018
src/sbbs3 jsexec.c 1.196 1.197
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv17875
Modified Files:
jsexec.c
Log Message:
Interrupt syscalls on break_handler() signals.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Thu Mar 8 19:55:41 2018
src/sbbs3 jsexec.c 1.197 1.198
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/home/rswindell/sbbs/src/sbbs3
Modified Files:
jsexec.c
Log Message:
Output the name of the module that set the exit_code.
--- SBBSecho 3.03-Win32
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Mon Oct 22 00:41:16 2018
src/sbbs3 jsexec.c 1.199 1.200
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/home/rswindell/sbbs/src/sbbs3
Modified Files:
jsexec.c
Log Message:
Another gcc printf warning fix.
--- SBBSecho 3.06-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Sat Jan 19 17:55:56 2019
src/sbbs3 jsexec.c 1.201 1.202
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv24802
Modified Files:
jsexec.c
Log Message:
Fix long-standing bug: if jsexec was passed any option which requires a parameter value and no value was supplied (e.g. 'jsexec -c'), a null pointer dereference would cause the program to crash.
Also display more helpful error if option parameter value is missing.
--- SBBSecho 3.06-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
deuce@1:103/705 to
CVS commit on Wed May 29 09:44:28 2019
src/sbbs3 jsexec.c 1.203 1.204
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv24021
Modified Files:
jsexec.c
Log Message:
Support terminating the script from the debugger before it actually runs.
--- SBBSecho 3.07-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Mon Aug 5 20:22:24 2019
src/sbbs3 jsexec.c 1.204 1.205
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv2403
Modified Files:
jsexec.c
Log Message:
Call make_data_dirs() from JSexec. Without this, sbbs would have to be run to be sure all necessary dirs are created.
--- SBBSecho 3.08-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Thu Aug 8 08:29:38 2019
src/sbbs3 jsexec.c 1.205 1.206
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv4915
Modified Files:
jsexec.c
Log Message:
Remove call to make_data_dirs() - no exported from sbbs.dll. Also, scfgsave() already creates the dirs that were of concern (Transfser File Paths). May
want to DLL-export this and call from here later.
--- SBBSecho 3.08-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Tue Aug 27 01:12:09 2019
src/sbbs3 jsexec.c 1.206 1.207
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv32386
Modified Files:
jsexec.c
Log Message:
Restore cooked TTY mode *before* prompting for the user to hit ENTER when
run with the '-p' or '-!' options. This resolve the issue of (on Win32)
having to enter *twice* to close the program in this mode.
--- SBBSecho 3.09-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
deuce@1:103/705 to
CVS commit on Tue Aug 27 12:02:09 2019
src/sbbs3 jsexec.c 1.207 1.208
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv15318
Modified Files:
jsexec.c
Log Message:
Enable some interesting JS options for jsdoor only (for now).
These almost certainly improve performance a bunch, but may result in
new behaviours.
--- SBBSecho 3.09-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
deuce@1:103/705 to
CVS commit on Thu Aug 29 09:26:40 2019
src/sbbs3 jsexec.c 1.208 1.209
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv6296
Modified Files:
jsexec.c
Log Message:
We do *not* want JSOPTION_VAROBJFIX set since it causes variables to be
created in the global scope when when a scope is passed to load(), require()
or js.exec().
While having 'var x = 0;' and 'x = 0;' put x in different scopes is bad, we actually want them all in the passed scope, not the global scope... and that's not an option.
It looks like js.exec() will actually need to set scope as the global object and add a second global object to the original scope.
--- SBBSecho 3.09-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
deuce@1:103/705 to
CVS commit on Mon Sep 2 13:13:45 2019
src/sbbs3 jsexec.c 1.209 1.210
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv26977
Modified Files:
jsexec.c
Log Message:
Set values in JSDoor scfg_t required to create and use a TLS certificate...
scfg.prepped = TRUE
scfg.tls_certificate = -1
scfg.sys_inetaddr = "example.com"
scfg.sys_name = "JSDoor"
scfg.sys_pass = "ThisIsNotHowToDoSecurity"
--- SBBSecho 3.09-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Wed Apr 8 00:04:37 2020
src/sbbs3 jsexec.c 1.211 1.212
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv29331
Modified Files:
jsexec.c
Log Message:
Added support for exec/jsexec.ini file which can over-ride default values globally and per-module. Command-line options still take precedence.
For jsdoor builds, jsdoor.ini is supported in whatever directory jsdoor is run from.
Changed the default log level from Debug to Informational.
(If you need the old default, set LogLevel=debug in your ctrl/jsexec.ini file).
--- SBBSecho 3.10-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Sat Apr 11 23:09:59 2020
src/sbbs3 jsexec.c 1.213 1.214
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv21582
Modified Files:
jsexec.c
Log Message:
Remove unused string constant.
--- SBBSecho 3.10-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Mon May 4 15:01:19 2020
src/sbbs3 jsexec.c 1.214 1.215
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv18286
Modified Files:
jsexec.c
Log Message:
Move expected location of jsexec.ini from exec directory to ctrl directory:
- argv[0] does not always contain the full path to the executable, so that is
not a good way to locate the exec directory.
- since we already need to know the ctrl dir and that is the normal place to
put config files, that's where it shall be.
- jsdoor builds don't get a .ini file - I don't think they need it (?)
--- SBBSecho 3.11-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
rswindell@1:103/705 to
CVS commit on Mon May 4 21:09:11 2020
src/sbbs3 jsexec.c 1.215 1.216
Update of /cvsroot/sbbs/src/sbbs3
In directory cvs:/tmp/cvs-serv22813
Modified Files:
jsexec.c
Log Message:
Only complain about not being able to open ctrl/jsexec.ini, if the file exists
--- 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 Fri Nov 13 19:43:21 2020
https://gitlab.synchro.net/sbbs/sbbs/-/commit/74b4a948bb366ce463a78eef
Modified Files:
src/sbbs3/jsexec.c
Log Message:
More control over output streamsAdded options -A[filename] and -S[filename] to allow more control over which output streams go where (for mlong and his troubles with running ircd via systemd).-A controls "all messages" either sending all to stdout or the specified filename. This override the automatic suppression of the console output stream when run without a controlling TTY.-S controls "status message" (includes non-error level log messages), either sending the status messages to stdout or the specified filename. This also overrides the automatic suppression of the console output stream when run without a controlling TTY.
--- 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 Fri Nov 13 21:40:45 2020
-
From
Rob Swindell@1:103/705 to
Git commit to Main/master on Tue Nov 24 00:06:52 2020
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Sat Jan 30 02:22:11 2021
https://gitlab.synchro.net/main/sbbs/-/commit/6cd643a3e500532fd395fef1
Modified Files:
src/sbbs3/jsexec.c
Log Message:
Add -I (Interpret) command-line option to execute cmdline stringAt Tracker1's request/suggestion.jsexec -Itrue...Result (boolean): trueMore elaborate expressions can be evaluated and white-space included by quoting the "-I expression".Also, send all cmd-line usage errors to stderr and syntax help to stdout, always (Deuce's request).
--- 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 Sat Jan 30 02:22:11 2021
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Sat Jan 30 11:13:15 2021
-
From
Dream Master@1:103/705 to
Rob Swindell on Sat Jan 30 16:20:23 2021
Re: src/sbbs3/jsexec.c
By: Rob Swindell to Git commit to main/sbbs/master on Sat Jan 30 2021 11:13 am
Make it 'jsexec -r' (run) instead of 'jsexec -I'
Let me guess, I for instantiate? :)
Brian Klauss <-> Dream Master
Caught in a Dream | caughtinadream.com a Synchronet BBS
---
■ Synchronet ■ Caught in a Dream - caughtinadream.com
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
Digital Man@1:103/705 to
Dream Master on Sat Jan 30 15:40:45 2021
Re: src/sbbs3/jsexec.c
By: Dream Master to Rob Swindell on Sat Jan 30 2021 04:20 pm
Re: src/sbbs3/jsexec.c
By: Rob Swindell to Git commit to main/sbbs/master on Sat Jan 30 2021 11:13 am
Make it 'jsexec -r' (run) instead of 'jsexec -I'
Let me guess, I for instantiate? :)
I was thinking Invoke or Interpret, but the capital 'I' just isn't a great thing to convey or document (looks too much like an 'l') or use (shift key and all) when there's another option, so I went with '-r' for Run. :-)
--
digital man
Synchronet "Real Fact" #81:
Vertrauen has had the FidoNet node number 1:103/705 since 1992.
Norco, CA WX: 61.3°F, 50.0% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs --- SBBSecho 3.12-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
Dream Master@1:103/705 to
Digital Man on Sat Jan 30 17:19:17 2021
Re: src/sbbs3/jsexec.c
By: Digital Man to Dream Master on Sat Jan 30 2021 03:40 pm
I was thinking Invoke or Interpret, but the capital 'I' just isn't a great thing to convey or document (looks too much like an 'l') or use (shift key and all) when there's another option, so I went with '-r' for Run. :-)
I've come up with some crazy variables in my time. Hell, I wish all *nixes would keep their options the same. In AIX, if you want to see everything in terms of 1024, you use -g (df -g, for example). In Linux, -h (df -h), which Mibs, Gibs, or Tibs them.
Oh well.
Brian Klauss <-> Dream Master
Caught in a Dream | caughtinadream.com a Synchronet BBS
---
■ Synchronet ■ Caught in a Dream - caughtinadream.com
* 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 30 23:41:46 2021
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Sat Jan 30 23:44:13 2021
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Sun Feb 21 21:45:04 2021
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Sat Mar 6 14:10:06 2021
-
From
Deucе@1:103/705 to
Git commit to main/sbbs/master on Sun Mar 7 11:52:50 2021
https://gitlab.synchro.net/main/sbbs/-/commit/8f4425cba02558a1c2c31fca
Modified Files:
src/sbbs3/jsexec.c
Log Message:
Enable JSOPTION_VAROBJFIX for JSDoor.This option fixes the fact that the following two lines sometimesplace the variables in different scopes at the top-level of includedscripts:var x = 1;y = 2;I plan to use this to experiment on if this is what's causing muchof the remaining scope chain weirdness... it certain explains somethings we've been seeing (and possibly even things like the METHODJITissues DigitalMan saw yesterday).Enabling in sbbs/jsexec is a much
bigger lift, but this change mayend up being all upside... the docs have suggested this option alwaysbe set since it was originally introduced, and now that I understandscopes better, it's pretty clear why that is.
--- SBBSecho 3.13-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
Deucе@1:103/705 to
Git commit to main/sbbs/master on Sun Mar 7 21:26:57 2021
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Mon Apr 5 23:36:36 2021
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Sun Aug 8 23:40:32 2021
-
From
Rob Swindell@1:103/705 to
Git commit to main/sbbs/master on Thu Jun 16 21:47:40 2022
https://gitlab.synchro.net/main/sbbs/-/commit/d49facc893a919fefcb8969d
Modified Files:
src/sbbs3/jsexec.c
Log Message:
Flush console output stream after executing a scriptSolves problem of status output lines being interleved with consoleoutput (e.g. from print()) after executing a script.
--- SBBSecho 3.15-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
Rob Swindell (on Windows)@1:103/705 to
Git commit to main/sbbs/master on Mon May 1 12:00:24 2023
-
From
Deucе@1:103/705 to
Git commit to main/sbbs/master on Wed May 3 09:52:54 2023
-
From
Rob Swindell (on ChromeOS)@1:103/705 to
Git commit to main/sbbs/master on Sun Jun 11 14:33:40 2023
-
From
Rob Swindell (on ChromeOS)@1:103/705 to
Git commit to main/sbbs/master on Sun Jul 9 15:23:31 2023
-
From
Rob Swindell (on Windows)@1:103/705 to
Git commit to main/sbbs/master on Tue Aug 8 17:43:51 2023
https://gitlab.synchro.net/main/sbbs/-/commit/40995ce1868fdb8cdbacf2a6
Modified Files:
src/sbbs3/jsexec.c
Log Message:
Insure the exec_dir is *always* prepped (fix for Windows upgrade to v3.20)A "prepped" means directory means a relative path from the configuration files(or
default settings) has been converted to a full/absolute path with properslashes
for the platform (i.e. backslashes instead of forward-slashes onWindows).JSexec
doesn't require that the new v3.20 ctrl/*.ini files exist to run; thiswas necessary to be able to run 'jsexec update -> upgrade_to_v320.js' whichdoes the
ctrl/*.cnf to .ini file conversion (egg not required to buildchicken). When JSexec failed to load ctrl/msgs.ini(e.g. "!ERROR loading configuration files: 2
(No such file or directory)opening /sbbs/ctrl\msgs.ini"), it would continue to run, but not "prep" anyof the "path" settings (e.g. exec_dir).The first run of 'jsexec update.js' would fail to run upgrade_to_v320.exe(which does the v3.20 user base conversion) and a bunch of other (but not asimportant) update steps because Windows couldn't execute "../exec/*".Multiple errors would be displayed
in this case, but the most important (asreported by Ree in #synchronet of irc.synchro.net) was: '..' is not recognized as an internal or external commandright after the status output: No v3.20 user base found, running ../exec/upgrade_to_v320Notice the "../exec/" prefix, which is not support by Windows when specifyinga file path to execute.A second run of 'jsexec update' would work fine because the new v3.20 .inifiles would be successfully created after the first run (though the user basewas not).This is likely the same issue
that MRO reported recently when upgrading aWindows SBBS v3.19 install to v3.20 and not having the user base upgradedthe first time.
--- SBBSecho 3.20-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
-
From
Rob Swindell (on Windows 11)@1:103/705 to
Git commit to main/sbbs/master on Fri Dec 8 17:37:09 2023
https://gitlab.synchro.net/main/sbbs/-/commit/7b932f63e4f1d4275e55dfbf
Modified Files:
src/sbbs3/jsexec.c
Log Message:
Only create/use a single run-time for use in JSexec, even when re-runnning
The '-l' (loop) option would cause the JS runtime to be destroyed and
recreated for each new execution of the script, which resulted in memory
leaks in Windows builds (see issue #672 for details). So instead, just
use a single JS runtime here when the -l option is used to prevent that
from happening, though truth be told, that's likely not a normal/common occurrence. Other apparent JS-related memory leaks (e.g. in the web
server) appear to be of a common concern.
Likely upgrading to a modern libmozjs would also fix this issue, but
we're far short of being able to do that right now.
--- 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 Mon Feb 5 22:18:08 2024
https://gitlab.synchro.net/main/sbbs/-/commit/b53254b6bcc9d02aae63da2e
Modified Files:
src/sbbs3/jsexec.c
Log Message:
Resolve full path to specified ctrl directory, before chdir
If a relative path to the ctrl directory is specified on the command-line
or in the SBBSCTRL environment variable, the loading of ctrl/*.ini would
fail after the changing of the working directory.
We should probably get replace all use of FULLPATH with _fullpath someday,
but for now, I just went with majority-rule.
--- 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 Mon Feb 5 22:27:55 2024
-
From
Deucе@1:103/705 to
Git commit to main/sbbs/master on Sun Mar 17 00:13:16 2024
-
From
Deucе@1:103/705 to
Git commit to main/sbbs/master on Sun Mar 17 01:35:53 2024
https://gitlab.synchro.net/main/sbbs/-/commit/1e48f1252859924638b52e96
Modified Files:
src/sbbs3/jsexec.c
Log Message:
Don't use the non-standard third parameter to main for enivronment
Use the standard `extern char **environ' instead.
Fixes an issue with macOS.
Also, check that env is not NULL in js_init.
--- SBBSecho 3.20-Linux
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)