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

Table Of Contents
Interoperating Between Programming Environments
Open System Services Porting Guide520573-006
5-8
Process-Management Interoperability
Guardian processes. For example, if you want to use a product or subsystem that runs
only in the Guardian environment, you might need to manage a process from the
opposite environment.
The process handle of an OSS process allows most Guardian process-management
procedures to access it. On the other hand, a Guardian process does not have an OSS
process ID, which is required by most OSS process-management functions. There is a
small set of OSS process-management functions that can access Guardian processes.
Refer to the Open System Services Programmer’s Guide for a detailed discussion on
process-management; it includes various interoperability tables. It also includes
programming examples of how to mange processes with the OSS and Guardian APIs.
Guardian Procedure Calls Extended for OSS
The Open System Services Programmer’s Guide contains a table listing the many
Guardian process-management procedure calls that can access OSS processes. The
Guardian procedures that provide information about OSS processes as well as
Guardian processes are PROCESS_GETINFO_ and PROCESS_GETINFOLIST_. The
PROCESS_GETINFO_ procedure returns a limited set of information about a specified
process, including the process handle, execution priority, home terminal, type (OSS or
Guardian), swap file and program file statistics, and the OSS process ID if the process
is an OSS process.
The PROCESS_GETINFOLIST_ procedure returns detailed information about a
process or set of processes that meets specified criteria that identify processes for
which information is returned. A search parameter such as OSS process ID may be
specified to return detailed information about an OSS process. Search attributes,
particularly OSS attributes, can also be specified. The procedure call also returns OSS
attributes. Refer to the Guardian Procedure Calls Reference Manual for details about
these attributes.
It should be noted that when you are looking for detailed information about a process,
such as its controlling tty or an OSS program pathname, translation by a slower name
server may be involved. The caller of this routine should also provide sufficiently large
output buffers to hold the additional process information that can be returned.
OSS Functions for Accessing Guardian Processes
Many OSS process-management functions can access Guardian processes; some are
abort(), _exit(), exit(), getegid(), getenv(), geteuid(), getgid(),
getgroups(), getuid(), putenv(), setpgid(), setuid(), and times(). Refer
to the API interoperability tables in the Open System Services Programmer’s Guide for
more information on using OSS functions for accessing Guardian processes.
For specific information on a particular function, refer to the online reference pages, the
Open System Services Library Calls Reference Manual or the Open System Services
System Calls Reference Manual.