Guardian Application Conversion Guide

Opening and Communicating With a High-PIN Server
Converting C Applications
5–22 096047 Tandem Computers Incorporated
Monitoring a High-PIN
Server
If your program monitors a high-PIN server, you must convert the following
operations:
Opening and closing $RECEIVE
Reading process-deletion and status-change messages
Using the CHILD_LOST_ procedure
The following paragraphs describe how to convert these operations. These steps also
can apply to any creator process that monitors a process that it has created.
Opening $RECEIVE
Your requester might open $RECEIVE using the OPEN procedure:
short receive_name[12] = "$RECEIVE ";
...
c_code = OPEN (receive_name,
receive_file_number,
read_open_close_msgs,
receive_depth);
Convert your requester to open $RECEIVE using the FILE_OPEN_ procedure. Use a
file-name string for the $RECEIVE file name instead of the internal file-name format.
Specify the length as a separate integer value.
Bit 14 of the
options
parameter must be zero (which is the default value) for the
system to send D-series system messages to $RECEIVE; otherwise, the system sends
C-series system messages to $RECEIVE for the requester.
An example of a FILE_OPEN_ procedure call for $RECEIVE is:
#define receive_name_length 8;
char receive_name[receive_name_len + 1] = "$RECEIVE";
...
/* Open $RECEIVE to read D-series system messages */
error = FILE_OPEN_(receive_name,
receive_name_length,
receive_file_number,
/* access_mode */ ,
/* exclusion_mode */ ,
/* nowait_operations */ ,
receive_depth,
options);