Re: system.exec() vs. bbs.exec() for native command line program
By: Nightfox to All on Sun Oct 19 2014 10:10 am
I know that one difference between system.exec() and bbs.exec() is that bbs.exec() can run Baja modules and JavaScript scripts and system.exec() is for running native programs, but it seems that bbs.exec() can run native programs as well (also, the EX_NATIVE flag can be used with bbs.exec() to specify that it's a native 32-bit application). So if you need to run a native program from a Synchronet JavaScript script, what's the difference between using bbs.exec() and system.exec(), and does it matter which one
you use?
The 'system' object is available in all Synchronet JS environments (jsexec, servers, servces), while 'bbs' is only available in the Terminal Server (for telnet, Rlogin, SSH connections).
The bbs.exec() can be used to execute a native program with redirected input/output. system.exec() does not support redirected I/O.
If your script is intended for use in the terminal server, I would use bbs.exec().
digital man
Synchronet "Real Fact" #43:
Synchronet added JavaScript suppport with v3.10a (2001).
Norco, CA WX: 83.7øF, 24.0% humidity, 7 mph SE wind, 0.00 inches rain/24hrs
---
þ Synchronet þ Vertrauen þ Home of Synchronet þ
telnet://vert.synchro.net