Guardian C Library Calls Reference Manual

terminate_program (supplementary)
3-220 128833Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
terminate_program (supplementary)
The terminate_program function writes to open files any data left in the buffers, closes
files, passes all of the allowed information to the Guardian system procedure
PROCESS_STOP_, and terminates execution of your C program.
dummy
is always a zero.
options
specifies whether the process is being stopped because of a normal or abnormal
condition. Specify zero for normal termination (STOP). Specify 1 for abnormal
termination (ABEND). The default is zero.
completion_code
is the completion code to be returned to the parent process in the process deletion
system message. Specify this parameter only if the calling process is terminating
itself and you want to return a completion code value other than the default of zero
(STOP) or 5 (ABEND).
termination_info
specifies the Subsystem Programmatic Interface (SPI) error number that identifies
what caused the process to stop itself. For more information on SPI error numbers
and subsystem IDs, refer to the SPI Programming Manual. If termination_info is not
specified, the default is zero.
SPI_ssid
is a subsystem ID (SSID) that identifies the subsystem defining termination_info.
The format and use of the SSID is described in the SPI Programming Manual.
text
if present and text_length is not zero, is a string of ASCII text to be sent as part of
the process deletion system message.
#include <stdlibh>
void terminate_program(short dummy,
short options,
short completion_code,
short termination_info,
short *SPI_ssid,
char *text,
short text_length);