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

Table Of Contents
Migrating Guardian Applications to the OSS
Environment
Open System Services Porting Guide520573-006
8-32
Interactions Between Guardian and OSS Functions
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.