Open System Services Programmer's Guide

OSS process-creation functions invoked by a member of an OSS process pair have the following
effects:
fork() creates a new process that inherits the usual attributes from its parent. The process
name is not inherited; therefore, the new process is not relevant to the original process pair.
Functions in the exec...() family associate a new program image with the current PID.
Operationally, a new process is created (with a different CPU, PIN identity), and the process
performing the exec terminates.
IMPORTANT: A member of an OSS process pair should not perform exec; if it does, that
original member no longer exists.
tdm_spawn() creates a new process that is not relevant to the pair.
PROCESS_SPAWN_ is similar to tdm_spawn(), unless it has the name option that creates
a backup process.
Process Status Display
Beginning with the J06.14 and H06.25 RVUs, the TACL STATUS command provides the following
process-status identifiers:
“Y” – OSS backup process
“X” – OSS process
“B” – Guardian backup process
Previous versions of TACL display “X” for any OSS process, including a backup.
Known Restrictions
The crtlns.h facilities are not supported for OSS. The _ns_start_backup() function creates
a Guardian backup process. All the other _ns_... functions deal with (Guardian) file state; these
functions work in OSS processes provided the target files are Guardian.
Because the primary and backup processes' PIDs are different:
The backup process cannot “take over” OSS file locks.
A signal sent with the kill command or kill() function affects only the process designated.
NOTE: This list is not exhaustive.
Other Considerations
To a first approximation, an OSS process pair is a Guardian process pair with PIDs. There are no
NonStop enhancements to OSS files, sockets, and other related OSS objects.
For the activities special to process pairs, the application uses the underlying Guardian facilities,
which were designed for NonStop programming. The relevant features (such as receive/sync depth
and sync IDs) of the Guardian (Enscribe) file system are available.
OSS processes do not receive startup, assign, and param messages from their parent.
PROCESS_SPAWN_ accepts parameters for the vector of arg and env strings; the parent (primary)
can easily pass on its own arguments and environment to the child (backup).
To the extent that the PID is used only for identification, as in the shm...() shared memory
facilities, or the sem...() semaphore mechanism, it can be considered local to the process.
HP recommends that a process pair protect itself from unwanted external signals by blocking them,
so the use of PID in kill() becomes irrelevant.
160 Managing Processes