Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Migrating Guardian Applications to the OSS
Environment
Open System Services Porting Guide520573-006
8-13
Guardian Process-Management Procedures
OSS processes. If you wish to use a subsystem or product that runs only in the OSS
environment, you may need to manage the processes from the Guardian environment.
When using Guardian procedures, OSS processes are identified by process handles
rather than by process IDs. You can get your own process handle using a Guardian
procedure call, such as PROCESSHANDLE_GETMINE_.
Most Guardian process-management procedures can access OSS processes, but only
a small set of OSS process-management functions can access Guardian processes.
Some of the Guardian procedures that can manipulate OSS processes are:
When PROCESS_ACTIVATE_ and PROCESS_STOP_ are used on a target OSS
process, they are equivalent to kill(pid, SIGCONT) and kill(pid, SIGSTOP)
respectively, including the delivery of the SIGCHLD signal to the parent process.
The PROCESS_GETINFO_ and PROCESS_GETINFOLIST_ procedures can be used
to get information about OSS processes as well as Guardian processes. The attributes
of an OSS process can be modified using the PROCESS_SETINFO_ and
PROCESS_SETSTRINGINFO_ procedures.
In addition, the following procedures create processes. These process-creation
procedures can be used in a Guardian program to create new processes that can then
be manipulated by the process-management functions. These procedures are
discussed in detail in Using Process-Creation Calls on page 6-13.
The Guardian Programmers Guide describes the use of these process-management
procedures. Sample programs showing the use of some of these Guardian process-
Procedure Description
OSS_PID_NULL_ Returns a null OSS process ID
PROCESS_ACTIVATE_ Returns process to the ready state
PROCESS_DEBUG_ Invokes debugging facility on calling process
PROCESS_GETINFO_ Obtains limited set of information about a process
PROCESS_GETINFOLIST_ Obtains detailed information about a process
PROCESS_SETINFO_ Alters attribute of a specified process
PROCESS_SETSTRINGINFO_ Sets string information of a process
PROCESS_STOP_ Deletes a process
PROCESS_SUSPEND_ Places process into suspended state
PROCESSHANDLE_*_ [Various process handle procedure calls]
PROCESSNAME_CREATE_ Creates unique process name
SETLOOPTIMER Sets caller's process loop-timer value
PROCESS_LAUNCH_ Creates a new Guardian
process
PROCESS_SPAWN_ Creates a new OSS process