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

Table Of Contents
Porting UNIX Applications to the OSS Environment
Open System Services Porting Guide520573-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