Guardian Procedure Calls Reference Manual

If the process is a remote process running on the local system and the request to stop it
is from a local process, these user IDs or associated processes can stop the process:
local super ID
the process' creator access ID (CAID) or the group manager of the CAID
the process' process access ID (PAID) or the group manager of the PAID
If the process is a remote process on the local system and the request to stop it is from a
remote process, these user IDs or associated processes can stop the process:
a network super ID
the process' network process access ID
the process' network process access ID group manager
the process' network creator access ID
the process' network creator access ID group manager
Being local 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.
Rules for stopping an OSS process
The same rules apply when stopping an OSS process with the PROCESS_STOP_ procedure
as apply for the OSS kill() function. See the kill(2) function reference page either
online or in the Open System Services System Calls Reference Manual.
Rules for stopping any process: stop mode
When a process tries to stop another process, another item checked is the stop mode of that
process. The stop mode is a value associated with every process that determines what other
processes can stop it. The stop mode, set by the SETSTOP procedure, is defined as follows:
Any other process can stop the process.0
Only the process qualified by the above rules can stop the process.1
No other process can stop the process.2
The process can always stop itself.
Errors other than 0 can be returned by PROCESS_STOP_ under these conditions:
If the process (or process pair) does not exist, error 11 is returned.
If the stop request passes the security checks but the process is running at stop mode 2,
the stop request is queued pending the reduction of the stop mode to 1. Error 638 is
returned.
If the stop request does not pass the security checks and the process is running at stop
mode 1 or 2, the stop request is queued pending the reduction of the stop mode to 0.
Error 639 is returned.
If it is not possible to communicate with the processor where the process is running, error
201 is returned.
Returning control to the caller before the process is stopped
When error is 0, 638, or 639, PROCESS_STOP_ returns control to the caller before the
specified process is actually stopped. If error is 0, the process does not execute any more
user code. However, you ensure that the process has terminated before you attempt to access
PROCESS_STOP_ Procedure 1125