DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Programming with Remote Procedure Calls (RPC)

Port monitor support

Port monitors such as inetd(1Mtcp) and listen(1M) can monitor network addresses for specified RPC services. Whenever a request comes in for a particular service, the port monitor spawns a server process to provide for it. After the call has been serviced, the server can exit. This has the advantage of conserving system resources: fewer blocked processes waiting for work.

It may be useful for services to wait for a specified interval after satisfying a service request, on the chance that another request will follow. If there is no call within the specified time, the server will exit and some port monitors, like inetd, will continue to monitor for the server. If a later request for the service occurs, the port monitor will give the request to a waiting server process (if any), rather than spawning a new process.


NOTE: Some port monitors, like listen, treat requests for a particular service in one of two ways:

By default, services created using rpcgen wait for 120 seconds after servicing a request before exiting. The programmer can, however, change that interval with the -K flag.

rpcgen -K 20 proto.x

The server will wait only for 20 seconds before exiting. To create a server that exits immediately, -K 0 can be used. To create a server that never exits (a standing server), the appropriate argument is -K -1.

All servers generated by rpcgen assume the following support from port monitors:

See ``Using port monitors'' for a further discussion of port monitors.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004