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

Table Of Contents
OSS Porting Considerations
Open System Services Porting Guide520573-006
6-26
Starting a Guardian Server Process
procedure PROCESS_SPAWN_ to start OSS processes; see Starting an OSS Server
Process on page 6-26.
Starting a Guardian Server Process
Typically, a client program is started by an application user at a terminal. A Guardian
server can be started by an operator or system manager, or by the Guardian LISTNER
process, depending on the way you design the server. When a client or server program
is started, the person starting the program might need to set one or more TCP/IP
attributes to control how the program operates.
In the Guardian environment, you can use the LISTNER process to start a Guardian
server such as FTP or TELNET or a server that you develop. When the LISTNER
process receives the notification, it starts the server targeted by the request. The target
server creates a socket using host-name and source-port information, then accepts the
pending connection request on the newly created socket. Data is transferred between
the NonStop target server and the remote client through the Guardian socket until one
or the other terminates the connection.
For more information on the LISTNER process, TCP/IP servers, and Guardian sockets,
refer to one of the following manuals:
TCP/IP Configuration and Management Manual
TCP/IPv6 Configuration and Management Manual
TCP/IP (Parallel Library) Configuration and Management Manual
Additionally, the TCP/IP Programming Manual discusses starting TCP/IP servers.
The Guardian Programmers Guide contains information about queuing messages on
$RECEIVE, writing server programs, and communicating with Guardian processes.
Further, refer to the interprocess communication discussions in the Open System
Services Programmers Guide for information on Guardian and OSS processes
communicating across processes, nodes, and within one processor using $RECEIVE.
Starting an OSS Server Process
The Guardian LISTNER process cannot start servers in the OSS environment as it
does in the Guardian environment. However, you can use the LISTNER process to
start a Guardian process which in turn starts an OSS process with the Guardian
procedure PROCESS_SPAWN_.
The process that calls PROCESS_SPAWN_ is a Guardian parent, regardless of
whether it is an OSS or Guardian process. The parent process reads system
messages from $RECEIVE, which is a special file through which a process receives
system messages or messages from other processes. OSS and Guardian processes
can communicate between nodes, between processors, and within the same processor
through their $RECEIVE files.