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-12
I/O Interoperability
over itself. Guardian native process cannot send a signal to or receive a signal
from another Guardian or OSS process using the kill() function.
•
Signals in native and TNS processes: any OSS process (native or G-series TNS)
can use OSS signal functions. Only a native Guardian process can use OSS signal
functions.
•
Interrupts from a terminal as signals: when a user types an interrupt key at a
terminal, an OSS process receives the interrupt as a signal. A Guardian process
receives the interrupt as a system message and must read its $RECEIVE file to
get the interrupt.
•
Process signal mask: the process signal mask of an OSS process is initialized to
that of its parent process. The process signal mask of a Guardian process is
initialized so that no signals are blocked from delivery to it.
•
Default signal handler: the Common Run-Time Environment (CRE) sets up a
default signal handler for a Guardian program written in C. The CRE does not set
up a default signal handler for an OSS program written in C.
Refer to the Guardian Programmer’s Guide for more information on signal handling for
Guardian processes. Refer also to the API interoperability table for TNS/R and TNS/E
native processes in the Open System Services Programmer’s Guide for details on
signal-related functions available in the native Guardian and OSS environments. The
Open System Services Programmer’s Guide also contains more information on signal
interoperability, relating to using the HP extension signal functions.
For the specifics of the signals functions in the OSS API, see the online reference
pages or the Open System Services System Calls Reference Manual and the Open
System Services Library Calls Reference Manual. For the specifics of the procedures
in the Guardian API, see the Guardian Procedure Calls Reference Manual.
I/O Interoperability
This subsection includes a brief discussion of I/O interoperability in the OSS
environment; specifically tape I/O, terminal I/O, and printer I/O.
Tape I/O
The OSS environment has no programmatic access to tapes; there are no OSS I/O
functions that apply to printers or tape drives. To access tapes in the OSS environment
you must use the pax utility. You can, however, use Guardian procedures to write OSS
files and output directly to tape and read the files directly from tape. The pax utility is
discussed in Section 2, The Development Environment. An example of how to use the
pax utility from a program is included in the Open System Services Programmer’s
Guide.