Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
OSS Porting Considerations
Open System Services Porting Guide—520573-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 Programmer’s 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 Programmer’s 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.