Guardian Application Conversion Guide
Allowing a High-PIN Creator
Converting TAL Applications
096047 Tandem Computers Incorporated 3–41
Convert your program to use the D-series PROCESS_GETPAIRINFO_ procedure to
return the process handle instead. This example returns the process handle of the
ancestor process:
INT ancestor^process^handle[0:ZSYS^VAL^PHANDLE^WLEN - 1];
CALL PROCESS_GETPAIRINFO_(!process^handle!,
!process^name:max^len!,
!pair^length!,
!primary^process^handle!,
!backup^process^handle!,
!search index!,
ancestor^process^handle);
Converting a Startup
Sequence That Does Not
Use INITIALIZER
This subsection describes the remaining steps for conversion assuming that you have
already converted any attempts to directly obtain the identity of your creator process
and decided that using the HIGHREQUESTERS attribute is inappropriate.
For a program that does not use INITIALIZER, you need to convert the way you
process the startup sequence as follows:
Use the FILE_OPEN_ procedure instead of OPEN when opening $RECEIVE to
read the startup sequence, and ask for D-series system messages.
Convert your code to handle D-series system messages, specifically system
messages -103 (Process open) and -104 (Process close).
Use the FILE_GETRECEIVEINFO_ procedure instead of RECEIVEINFO or
LASTRECEIVE if your program uses either of these procedures to identify the
sender of the startup sequence.
Opening $RECEIVE to Read the Startup Sequence
If your new process does not use INITIALIZER to process the startup sequence, then it
typically opens $RECEIVE using the OPEN procedure with the OPEN
flags
.<1> bit
set to 1 (
flags
= %40000). This allows you to receive system messages such as -30
(Process open) and -31 (Process close). Your existing program might open $RECEIVE
as follows:
INT .receive^name[0:11] := ["$RECEIVE", 8 * [" "]];
LITERAL read^open^close^msgs = %40000 ;
...
CALL OPEN (receive^name,
receive^file^number,
read^open^close^msgs, ! Value = %40000
receive^depth);