Guardian Programmer's Guide

Table Of Contents
Creating and Managing Processes
Guardian Programmer’s Guide 421922-014
16 - 31
Specifying Process Attributes and Resources
Starting a High-PIN Process Programmatically: An Example
The following code fragment creates a new process to run at a high PIN or low PIN
depending on the inherited force-low characteristic. Note that
CREATE_OPTIONS.<31> is set to 0 in the input parameter structure. This example
assumes that the HIGHPIN file attribute is set in the program file of the process that
you are creating:
.
.
PARAM_LIST.CREATE_OPTIONS:= 0D; !bits 26 and 31 both set to 0
ERROR := PROCESS_LAUNCH_( PARAM_LIST,
ERROR_DETAIL,
OUTPUT_LIST:$LEN(OUTPUT_LIST),
OUTPUT_LIST_LEN);
Starting a High-PIN Process Interactively: Examples
The next example causes the TACL program to start any new processes at a high PIN:
3> SET HIGHPIN ON
The SET HIGHPIN ON command causes the TACL process to create any new process
with the force-low flag set to 0, allowing processes to be created at a high PIN, if the
HIGHPIN attribute is set in the object file being executed. (A TACL process always
runs with the ignore force-low flag set to 1.)
The following example uses the TACL run option to cause the program to run at a high
PIN, if possible.
20> RUN objfile /HIGHPIN ON/
Specifying the Home Terminal
By default, your process receives input from its home terminal and sends output to its
home terminal; that is, the home terminal name serves as the default value for the IN
and OUT parameters of the process Startup message (see Section 8, Communicating
With a TACL Process). Normally, the home terminal for a new process is the same as
for the creator process. However, you can choose a different home terminal for your
ne
w process by supplying values for the HOMETERM_NAME and
HOMETERM_NAME_LEN fields of the input parameter structure when calling the
PROCESS_LAUNCH_ procedure.
The following example specifies the home terminal:
.
.
TERM_NAME ':=' "$TERM1" -> @S^PTR;
@PARAM_LIST.HOMETERM_NAME = $XADR(TERM_NAME);
PARAM_LIST.HOMETERM_NAME_LEN := $DBL(@S^PTR '-' @TERM_NAME);
ERROR := PROCESS_LAUNCH_( PARAM_LIST,
ERROR_DETAIL,