Guardian Programmer's Guide

Table Of Contents
Creating and Managing Processes
Guardian Programmer’s Guide 421922-014
16 - 53
Activating Another Process
If the process identified by PROCESS^HANDLE does not exist, then the
PROCESS_SUSPEND_ procedure returns error 14.
If your process does not have the authority to suspend the identified process, then the
PROCESS_SUSPEND_ procedure returns error 48. To have the authority to suspend
a process, your process must either have the same process access ID as the process
you want to suspend, be the group manager of that process access ID, or have the
process access ID of the super ID user.
Activating Another Process
To activate a suspended process, supply the PROCESS_ACTIVATE_ procedure with
the process handle of the process you want to activate.
ERROR := PROCESS_ACTIVATE_(PROCESS^HANDLE);
IF ERROR <> 0 THEN ...
The process then remains in the runnable state until suspended again by the
SUSPEND command or the PROCESS_SUSPEND_ procedure.
If the process identified by PROCESS^HANDLE does not exist, then the
PROCESS_ACTIVATE_ procedure returns error 14.
If your process does not have the authority to activate the identified process, then the
PROCESS_ACTIVATE_ procedure returns error 48. To have the authority to activate a
process, your process must either have the same process access ID as the process
you want to activate, be the group manager of that process access ID, or have the
process access ID of the super ID user.
Getting and Setting Process Information
You can use the PROCESS_GETINFO_, PROCESS_GETINFOLIST_,
PROCESS_GETPAIRINFO_, and PROCESSHANDLE_GETMINE_ procedures to
retrieve information about processes. The PROCESS_SETINFO_ and
PROCESS_SETSTRINGINFO_ procedures enable you to set process information.
This subsection provides examples of how to use the above procedures to retrieve
critical information. For complete details, refer to the Guardian Procedure Calls
Reference Manual.
Getting Process Information
To retrieve information about existing processes, you can use the
PROCESS_GETINFO_, PROCESS_GETINFOLIST_, PROCESS_GETPAIRINFO_, or
PROCESSHANDLE_GETMINE_ procedure. PROCESS_GETINFO_ is convenient for
retrieving specific information about a specific process, such as:
The name of the home terminal
The creator access ID and process access ID