-
Notifications
You must be signed in to change notification settings - Fork 2
command_line
The HS standalone application has a number of command line options to control how it is executed.
Entering the following command at the UNIX or VMS prompt:
hs -h
prints out the list of options:
usage: -c (compile only)
-d mask (debug mask: OR of {1,2,4,8,..,512} )
-e method (enable 'method' to receive messages)
-f file (input from 'file' instead of stdin)
-g (parse cgi POST or GET)
-h (print this help)
-i (interactive mode)
-l log (output to 'log' instead of stdout)
-n service/port (tcp/ip listen service name or port)
-q (quiet mode)
-r (ROOT mode)
-s stream (input from 'stream' instead of stdin)
-t [instance#]object (set target name of program)
-u hostname (set hostname)
-v (echo input stream)
-w (ward fileio functions
-x (double expression size)
-y (Debug cgi scripts)
[arg1 [arg2 [arg3 [...]]]]
where hs is the name of the HS application, and -h is the command line option that tells HS to print a help message. The command line options are fully explained below.
With no options specified, HS will enter interactive mode with time stamp logging turned on, where it will parse and execute commands typed by the user. The date, time, and HS object name is pre-pended to all output, and can be turned off or on with the timestamp method.
The -c option means to compile (parse) the HS commands without executing them. It can be used with the -f option to check a HS program file for errors.
This option puts HS into interactive mode with time stamp logging turned off. Commands typed by the user will be parsed and executed.
Runs HS quietly, without the usual output messages. The -q option should be specified whenever the -g option is used to run HS as a cgi script.
The input commands are printed to the output, along with the line number.
Use this option when HS is executed as a cgi script, called by a web server in response to the POST or GET http method (usually issued by a form control in a web page). The name/value pairs are extracted into HS variables, which can be accessed in a HS program. The -q (quiet) option should be specified with -g.
Use this option to debug CGI scripts. Ie. In the shebang line.
#!/local/bin/hs -giyf
The '-y' option will cause HS to emit the proper sequences so that the action of the script can be seen.
Content-Type: text/plain
followed by a list of the CGI args.
Take the input commands from stream. For example:
hs -s 'put ( "Hello World" );'
causes HS to execute the put method.
Specifying the -f file option causes HS to execute commands from a file. HS will then exit, unless the idle method was called.
The -e method option will enable the method for execution by an incoming EVENT or QUERY message.
Normally, the target name of the HS application is set to the process name (VMS) or the login name (UNIX). This option allows you to specify the target name. The object part of the name is the class name. If a unique instance of the class name is required, then it can be specified with the -t option. (See the instantiate method.)
This option causes all output normally printed to stdout to go to a file called log.
HS has a number of debug modes that can be toggled on with a mask. Use this option to turn on various debug modes. (See the debug method.)
This is the tcp/ip listen service name or port that HS listens on for inter-process communication. Typically, port 7001 is used.
Designates the HS as a "root" HS, which means it is at the top of the hierarchy for inter-process communication. For example, HS running router.hyp runs with -r. There can be only one HS process with an -r designation on any given OS environment.
hs -f router.hyp -rt router -n 7001 -l router_start.log &
Sets the name of the localhost, to resolve DNS name resolution for hosts that are mult-honed.
Wards off the use of HS functions that do disk I/O. Used with CGI, this prevents the use of HS scripts that can otherwise read or write to the server disk.
HS prints out a help message describing the command line options, then exits.