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-7
Differences Between OSS and UNIX Environments
Differences Between OSS and UNIX
Environments
The OSS functions available to programmers conform to the POSIX.1 and POSIX.2
standards and to the XPG4 specifications. The OSS functions coexist on NonStop
systems with the traditional Guardian interfaces, which a programmer can also use
from an OSS program. Access to these Guardian interfaces is discussed in Using HP
Extensions on page 7-25.
This subsection presents the major differences between the OSS environment and
other common UNIX environments—specifically with the file system, process model,
and security model.
File Characteristics
The OSS environment supports two file systems: OSS and Guardian. The OSS file
system is a hierarchical file system consisting of directories and files within directories.
OSS files have logical filenames that follow the same conventions as files on other
UNIX systems—pathnames can be up to 1023 characters, and each pathname
component can be no greater than 248 characters. The conventions for root directories
and file attributes for the OSS file system are identical to those on other UNIX systems.
OSS file access is controlled by the same protection bits found on other UNIX systems.
OSS supports regular disk files and special files, such as directories, pipes, FIFOs, and
terminal character files. All OSS regular files are odd-unstructured files. Special device
files such as the /dev/tty and /dev/null files are supported through the OSS
functions and have the same meaning as on other UNIX systems. Opening /dev/tty
results in the opening of the program’s controlling tty, as it does on other UNIX
systems. Special files can also be created with the mknod() function. For more
setitimer() Use alarm().
setlinebuf() Use setvbuf().
sigblock() Use sigprocmask().
sigpause() Use sigsuspend().
sigsetmask() Use sigprocmask().
sigvec() Use sigpending().
timezone() Use localtime().
utimes() Use utime().
vfork() Use fork().
vhangup() Use tcsetattr().
wait3() Use waitpid().
Table 7-1. Functions Currently Not in the OSS Environment (page 2 of 2)
Function Replacement Recommendation