Guardian Native C Library Calls Reference Manual (G06.28+, H06.05+)
terminate_program(3) Guardian Native C Library Calls Reference Manual
NAME
terminate_program - Terminates a process
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRESRL
G-series native OSS processes: /G/system/sysnn/zcresrl
H-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCREDLL
H-series OSS processes: /G/system/zdllnnn/zcredll
SYNOPSIS
#include <stdlib.h>
void terminate_program (
short dummy,
short options,
short completion_code,
short termination_info,
short *SPI_ssid,
char *text,
short text_length);
PARAMETERS
dummy is always a zero.
options Specifies whether the process is being stopped because of a normal or abnormal
condition. Specify 0 (zero) for normal termination (STOP). Specify 1 for abnor-
mal termination (ABEND). The default is zero.
completion_code
Specifies 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 Specifies the subsystem ID (SSID) that identifies the subsystem defining
termination_info. The format and use of the SSID is described in the SPI Pro-
gramming Manual.
text Specifies an optional string of ASCII text to be sent as part of the process dele-
tion message. If text is specified, text_length cannot be zero.
text_length Specifies the length of the text string, if present. The value of text_length cannot
be longer than the number of bytes of text . The maximum length is 80 bytes.
DESCRIPTION
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 the program.
The terminate_program( ) function is similar to the exit() function but can be used to pass all of
the allowed information to the Guardian system procedure PROCESS_STOP_.
7−6 Hewlett-Packard Company 527192-007