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

This method is a much more direct means of starting an OSS process from the Guardian
environment, because the OSS shell command interpreter is not involved.
A new OSS process is created optionally with an assigned name, with the caller becoming the
Guardian parent of the OSS child process. The caller will be notified of child process termination
through a system message on $RECEIVE, not through an OSS SIGCHLD signal.
DEFINEs can be propagated to the new process. OSS processes can be created in a waited or
nowait manner. The files to be opened in the new process must be specified in a file descriptor
structure that is passed as an argument to the call. Certain inheritance features and process attributes
can be specified for the OSS process created. An example of how this Guardian procedure can
be used to start up an OSS process from the Guardian environment is shown in the Open System
Services Programmer’s Guide.
Another benefit of using PROCESS_SPAWN_ to create an OSS process from the Guardian
environment is that when the calling process is a Guardian monitor process pair, the monitor can
ensure that an OSS child process is restarted if it stops. The OSS child process can be considered
to be a persistent process in this case. Because the PROCESS_SPAWN_ procedure can be used
to create an OSS process in a nowait manner, the calling process can continue processing while
the child process is being created. More information on managing OSS processes from the Guardian
environment is available in the Open System Services Programmer’s Guide.
Starting an OSS Program From the Guardian Environment 153