Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)

queue files can be used in the OSS environment in the same manner as they are used in the
Guardian environment. The use of OSS shared memory and OSS semaphores is encouraged when
communicating between two OSS processes, but flat segments can be shared between OSS and
Guardian processes using Guardian procedure calls as well.
Interactions Between Guardian and OSS Functions
There is a common problem associated with some forms of interprocess communication (including
death notification) between processes of differing Guardian and OSS types. This is referred to as
the exec problem. You must be aware of this issue when mixing OSS and Guardian IPC functions
within an OSS program.
When an OSS process calls one of the exec set of functions, the process remains in the OSS
sense, but dies (another one is built) in the Guardian sense. The OSS process retains the same
OSS process ID number, but can have different process handles throughout its lifecycle.
Each call to a function in the exec set of functions creates a new Guardian process that requires
a new process handle. OSS process cleanup is based on the OSS process ID; Guardian process
cleanup is based on the process handle. When an OSS process calls a function in the exec set
of functions, it loses its Guardian resources, because the Guardian process is terminated. The
resources given up include files opened by the Guardian API (whether using fopen() or
FILE_OPEN_), allocated (SEGMENT_ALLOCATE_) segments, Guardian semaphores, and so forth.
You must be aware of these Guardian resource losses when a call to a function in the exec set
of functions is used by an OSS process.
Porting a Guardian Program to the OSS Environment 161