Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-221
terminate_program (supplementary)
text_length
if used, the value of text must be exactly text_length bytes long. The maximum
length is 80 bytes.
Usage Guidelines
•
The terminate_program function is similar to the exit function but allows you to pass
all of the allowed information to the Guardian system procedure PROCESS_STOP_.
•
For active backup process pairs, if the primary process calls exit and specifies
normal termination (the option value is zero), both the primary and backup
processes terminate.
•
In order to ensure that all cleanup operations that the C library needs to perform are
done, it is important that you do not call the Guardian system procedures STOP,
ABEND, or PROCESS_STOP_ directly to terminate your program.
However, STOP should only be replaced with terminate_program when your process
wants to stop itself. For stopping another process, you still use the STOP or
PROCESS_STOP procedure.
•
Descriptions of all of the parameters for the terminate_program function, except for
dummy, are identical to the corresponding parameters for the PROCESS_STOP_
system procedure. See the Guardian Procedure Calls Reference Manual for further
information.