SPI Programming Manual (G06.24+, H06.03+, J06.03+)

General SPI Programming Guidelines
SPI Programming Manual427506-006
5-9
Starting the Management Process
Starting the Management Process
Some subsystem server processes can be started through SYSGEN or by an operator
before the application is run; some can be explicitly started by the application using the
NEWPROCESS or PROCESS_CREATE_ procedure; and some can be started either
way. How the server can be started and in what form it is run depend on the
subsystem and, in some cases, on decisions made at your installation. Some
subsystems have processes that should be run as permanent servers under specific
process names, to be shared by more than one process. Running the management
process as a permanent server saves each requester the overhead (significant in TAL)
of starting the process each time it needs to use it. Using a permanent server can also
be advantageous if you are using the Safeguard software to implement security
restrictions on access to the subsystem.
For some subsystems, the requester can either start a copy of the server for itself or
use a shared copy. Some servers that permit this choice let you tell the server whether
it should stop when its last requester closes it. For NonStop Kernel subsystem servers
that provide such control, you supply this information to the server by giving the
appropriate value to the AUTOSTOP parameter when you start the server process.
You include this parameter in the
param-string part of the RUN command to start
the server, or in the corresponding parameter-string part of the startup message your
application sends to the server process immediately after it has started the new
process by calling the NEWPROCESS or PROCESS_CREATE_ procedure. (For
information about the startup message, see the
Guardian Programmers Guide
.) The
AUTOSTOP parameter is an ASCII string of this form:
[ HRS ]
AUTOSTOP time [ MINS ]
[ SECS ]
where HRS, MINS, or SECS is the unit of time used, and time is an integer whose
range is -1 to 9999 for MINS or SECS or -1 to 999 for HRS. If no time unit is specified,
SECS is implied.
Specifying AUTOSTOP with a
time greater than 0 directs the server to wait the
interval specified by
time after its last requester has closed it before stopping itself.
The server accepts new opens during this interval, and if a requester opens it before
the interval expires, the timing starts fresh the next time its last requester closes it.
Specifying AUTOSTOP with a
time of -1 directs the server to wait indefinitely (not
stop itself). You should generally specify this value for a permanent server.
Specifying AUTOSTOP with a
time of 0, or not specifying AUTOSTOP at all for a
subsystem server that implements it, directs the server to stop immediately when its
last requester closes it.
For more information about starting the management process for a particular
subsystem, see the appropriate management programming manual.