Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
Interoperating Between Programming Environments
Open System Services Porting Guide—520573-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.