Guardian Programmer's Guide

Table Of Contents
Creating and Managing Processes
Guardian Programmer’s Guide 421922-014
16 - 49
Deleting Your Own Process
completion code information. Abnormal termination and completion codes are
described in the following paragraphs.
Abnormal Deletion
You can indicate abnormal deletion by setting the options parameter to 1 for
abnormal deletion. The operating system sends out the Process deletion message
with bit 15 of word 37 set to 1.
The following example deletes your process abnormally:
OPTIONS := 1;
CALL PROCESS_STOP_(!process^handle!,
!specifier!,
OPTIONS);
If the options parameter is zero or omitted, then the process terminates normally.
With normal termination, bit 15 of word 37 of the Process deletion message defaults to
zero.
Setting Completion Codes
When deleting your own process, you can return additional information in the Process
deletion message by setting completion codes.
The compl-code parameter takes an integer value that is reported in word 16 of the
Process deletion message for the recipient of the message to interpret. The number
assigned to this parameter overrides the default values of 0 for normal deletion and
various nonzero values for abnormal deletion. For more information on using
completion codes, see Appendix C in the Guardian Procedure Calls Reference
Manual.
If your process defines Subsystem Programmatic Interface (SPI) error numbers, your
process can use the termination-info, spi-ssid, and text:length
parameters of the PROCESS_STOP_ procedure to return detailed completion code
information in the system message:
The termination-info parameter contains an integer representing the SPI
error number. This value is passed in word 17 of the system message.
The spi-ssid parameter identifies the SPI subsystem. This information is
passed in words 18 through 23 of the system message.
The text:length parameter contains up to 80 bytes of text to be read by the
message recipient. This information is passed in the system message beginning
at word 41. The length (in bytes) of the text message is specified in word 34.
The following statement sends completion code information in the Process deletion
message:
CALL PROCESS_STOP_(!process^handle!,
!specifier!,
!options!,