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
Porting UNIX Applications to the OSS Environment
Open System Services Porting Guide—520573-006
7-8
Process Characteristics
information on using the mknod() function, refer to the mknod(2) reference page
either online or in the Open System Services System Calls Reference Manual.
Local Guardian files can also be accessed by OSS functions through the /G directory
in the OSS file system. Pathnames in the /G directory have the form:
/G/volume/subvolume/file_identifier
where the $ and periods of the Guardian filename are replaced by slashes (/).
A complete, fully qualified Guardian filename has four components: node name,
volume name, subvolume name, and a file identifier; for example,
\MYNODE.$MYVOL.MYSUBVOL.MYFILE. Guardian filenames containing node
names are accessible through the /E directory, where pathnames have the form:
/E/node_name/G/volume/subvolume/file_identifier
OSS functions read and write odd-unstructured Guardian files and read EDIT files.
OSS functions cannot access structured Guardian files. These files can be accessed in
an OSS program only by using Guardian procedure calls. Access to Guardian files is
controlled by the “RWEP” character string, which defines Read, Write, Execute, and
Purge access. More details on the OSS and Guardian file systems can be found in the
Open System Services Programmer’s Guide.
Process Characteristics
OSS processes have the same characteristics as UNIX processes in most UNIX
systems. You can create, control, and terminate OSS processes as you would in other
UNIX environments. A set of process functions specific to HP have been added to
provide more flexibility in propagating attributes during process creation and are
discussed in Using HP Extensions on page 7-25.
OSS processes have a full set of Guardian attributes, typically associated with
Guardian processes. Guardian processes have some OSS attributes; OSS processes
have an additional set of attributes specific to OSS that are not associated with
Guardian processes. A small set of OSS process-management functions can access
Guardian processes.
You can create OSS processes with the fork() function and run programs with the
exec set of functions. The attributes of the parent process are propagated to the child
process, and the child process has an OSS process ID that uniquely identifies it. An
OSS process is a member of a process group and can participate in a job control
session.
An OSS process can send signals to and receive signals from other OSS processes.
You can query and modify the process environment using OSS functions such as
getpid() and putenv(). OSS processes receive notification when a child process
terminates with the SIGCHLD signal and can use the wait() and waitpid()
functions. More details on the characteristics of OSS and Guardian processes and on
interoperability can be found in Process Interoperability on page 5-6.