Synchronet v3.19b-Win32 (install) has been released (Jan-2022).

You can donate to the Synchronet project using PayPal.

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
util:jsexec [2020/11/13 19:54] – [Command Line] update to latest usage output digital manutil:jsexec [2021/01/30 11:43] – [Command Line] Now with '-r' support digital man
Line 16: Line 16:
  
 <file> <file>
-usage: jsexec [-opts] [path]module[.js] [args]+usage: jsexec [-opts] [[path/]module[.js] or -r js-expression] [args]
  
 available opts: available opts:
Line 23: Line 23:
     -C             do not change the current working directory (to CTRL dir)     -C             do not change the current working directory (to CTRL dir)
     -d             run in background (daemonize)     -d             run in background (daemonize)
-    -m<bytes>      set maximum heap size (default=8388608 bytes) +    -m<bytes>      set maximum heap size (default=16777216 bytes)
-    -s<bytes>      set context stack size (default=16384 bytes)+
     -t<limit>      set time limit (default=864000, 0=unlimited)     -t<limit>      set time limit (default=864000, 0=unlimited)
     -y<interval>   set yield interval (default=10000, 0=never)     -y<interval>   set yield interval (default=10000, 0=never)
Line 93: Line 92:
 JSexec includes an instance of a special User Interface class called ''uifc''. JSexec includes an instance of a special User Interface class called ''uifc''.
  
-FIXME+See the [[ref:UIFC]] reference page for more details.
  
 ===== shebang ===== ===== shebang =====
Line 104: Line 103:
 This allows JSexec scripts to be executed easily via [[:howto:apache|CGI]] as well as other command-line conveniences on Unix-like operating systems. This allows JSexec scripts to be executed easily via [[:howto:apache|CGI]] as well as other command-line conveniences on Unix-like operating systems.
  
 +===== Output =====
 +
 +JSexec supports multiple output methods and streams:
 +
 +  - **Error** (default stream: ''stderr'')\\ JS ''log()'' messages with log-levels of ''LOG_ERR'' or lower
 +  - **Status** (default stream: ''stderr'')\\ JS ''log()'' messages with log-levels higher than ''LOG_ERR''\\ JSexec startup/compile/shutdown progress messages
 +  - **Console** (default stream: ''stdout'')\\ JS ''write()'' ''writeln()'' ''printf()'' ''alert()'' and ''prompt()'' messages
 +
 +==== syslog ====
 +
 +When JSexec is executed on *nix operating systems with the ''-d'' (Daemonize) option, all JS ''log()'' messages are directed to ''syslog''.
 +
 +==== Suppression ====
 +  * **Status** output is suppressed by default when JSexec is run without a controlling TTY. This behavior can be overridden with the ''-A'' and ''-S'' command-line options.
 +  * **Status** output can be manually suppressed with the ''-n'' (Null) command-line option.
 +  * **Console** output can be suppressed with the ''-q'' (Quiet) command-line option. 
 +
 +==== Redirection ====
 +  * The output streams may be redirected to specific filenames via command-line options.
 +  * **Error** output can be forked to both ''stderr'' and a specified filename via the ''-e'' command-line option.
 ===== See Also ===== ===== See Also =====
   * [[custom:javascript|JavaScript]]   * [[custom:javascript|JavaScript]]