Guardian Programmer's Guide

Table Of Contents
Creating and Managing Processes
Guardian Programmer’s Guide 421922-014
16 - 38
Sending the Startup Sequence to a Process
Set CREATE_OPTIONS.<25> to 0 to cause D-series behavior. With this option, the
Process-deletion message is sent only to the caller of PROCESS_LAUNCH_ or to the
instance of the process pair that contains the caller of PROCESS_LAUNCH_. An
“instance” is any process in an unbroken chain of primary and backup processes.
Every process that is part of an instance has the same sequence number.
Set CREATE_OPTIONS.<25> to 1 to cause C-series behavior. With this option, a
process with the same name as the caller of PROCESS_LAUNCH_ receives the
Process-deletion message.
The following example requests C-series behavior:
.
.
PARAM_LIST.CREATE_OPTIONS.<25> := 1;
ERROR := PROCESS_LAUNCH_( PARAM_LIST,
ERROR_DETAIL,
OUTPUT_LIST:$LEN(OUTPUT_LIST),
OUTPUT_LIST_LEN);
Sending the Startup Sequence to a Process
Section 8, Communicating With a TACL Process, describes how the TACL process
sends a startup sequence to a new process that it has just created. Processes started
from a user-written process do not automatically receive a startup sequence. It is up to
you to determine what the sequence will be and how to do it.
If your new process expects the standard startup protocol (for example, if the new
process uses the INITIALIZER procedure), then you should issue a standard startup
sequence, with messages in the same format as issued by the TACL process. This
subsection describes how to do this.
When using the standard startup sequence, your program must perform the following
sequence:
1. Create the Startup message using a data structure in the form of a Startup
messa
ge. See Section
8, Communicating With a TACL Process, for details of the
Startup message format.
2. Create any Assign or Param messages you will send to the new process.
3. Create the new process using, for example, the PROCESS_LAUNCH_ procedure.
4. Open the new process.
5. Send the Startup message to the new process using the WRITE[X] procedure on
the open process file.
6. Optionally send Assign messages to the new process using the WRITE[X]
procedure on the open process file.
7. Optionally send a Param message to the new process using the WRITE[X]
procedure on the open process file.