Guardian Programmer's Guide

Table Of Contents
Creating and Managing Processes
Guardian Programmer’s Guide 421922-014
16 - 50
Deleting Other Processes
COMPLETION^CODE,
TERMINATION^INFO,
SPI^SUBSYSTEM^ID,
MESSAGE^TEXT:TEXT^LENGTH)
For details about SPI error numbers and SPI subsystem identifiers, refer to the SPI
Programming Manual.
Programs not using SPI can use the termination-info and text:length
parameters to report arbitrary integer and string values, respectively. TACL displays
nonzero termination-info and non-empty text for processes that it runs.
Deleting Other Processes
You can delete another Guardian process by supplying the process handle to the
PROCESS_STOP_ procedure. You are allowed to stop a user process if it has not
made itself unstoppable and if one of the following conditions is true:
The process has called SETSTOP to set the stop mode to 0, making it stoppable
by anyone.
A Safeguard access control list (ACL) associated with the process gives you
permission to stop the process.
Your process is locally authenticated or the process you are stopping is remotely
authenticated, and one of the following conditions is true:
You have the same process access ID or creator access ID as the process.
You are the group manager for the process access ID or creator access ID of
the process.
You are the super ID (255,255).
(Being locally authenticated on a system means either that the process has logged on
by successfully calling USER_AUTHENTICATE_ (or VERIFYUSER) on the system or
that the process was created by a process that had done so. A process is also
considered local if it is run from a program file that has the PROGID attribute set.)
When you delete another process, the operating system sets the completion code in
the Process deletion message to 6, indicating that the process was deleted by another
process.
The following example shows a process deleting a process that it previously created
(and which therefore has the same process access ID):
.
.
ERROR := PROCESS_LAUNCH_( PARAM_LIST,
ERROR_DETAIL,
OUTPUT_LIST:$LEN(OUTPUT_LIST),
OUTPUT_LIST_LEN);
IF ERROR <> 0 THEN ...