UCM Unitec Home Page
      

Generic UCM Server

 UcmServer(U)

Synopsis   Environment   Description   Options   Diagnostics   Notes   Examples   See also

Synopsis

UcmServer -e prog -s service [-u user] [-d] [-f] [-l]

Environment

Unix, Windows NT

Description

The UcmServer program is a generic server daemon, that can be used to simplify dedicated server development. It approximates the functionality of the Internet Superserver inetd(1) for a single service. Multiple UcmServer’s may be started in order to provide daemons for different services.

Typically UcmServer is invoked at boot time from the /etc/rc startup file or from /etc/inittab (System V only).

Options

-e prog

Executable prog, to be started upon a connection request to service. If the full pathname of prog is not specified, it must be available through the PATH environment variable. The first command line argument argv[1] of prog contains the socket number to be used in the call to UcmInit(F) function. The ASCII socket number may be converted to a t_socket type by the atio(3) function.

-s service Identifies the service that UcmServer has to listen for. The service argument may be given as symbolic TCP/IP service name or as numeric port number. When using the symbolic service name, the same service must be defined in /etc/services or the Windows services file with type ftp. This option is required.
-u user This option will cause prog to be executed under the user ID user. The argument user may be given as symbolic user name or as numeric user ID. This option is available on Unix UCM only.
-d Run the server programs prog invisible in the background (detached) This option is available on Win32 UCM only.
-f Run the UcmServer program visible in the foreground. This option is available on Win32 UCM only.
-l Show connection log messages in the UcmServer console window. This option implies the f-option and is available on Win32 UCM only.

Diagnostics

UcmServer will fail and exit with status 1, if one or more of the following is true:

  • Not both of the e- and s-options are specified.
  • The user specified in the u-option could not be fount in /etc/passwd.
  • The program is unable to change to user. In order to change to another user ID (setuid(2)) the UcmServer program must have been invoked by root.

Notes

UcmServer can be stopped by the command kill -15 pid.

Unless started by the init(1) program, UcmServer will detach automatically from the calling process.

Examples

The following line could be included in the file /etc/rc(4):
/usr/ucm/UcmServer -s cssws -e /usr/lib/css/cssws 2>/tmp/cssws.log 1>&2


Unix System V only

The same service can be established on System V by inserting the following line /etc/inittab(4):

cssws:1:respawn:/usr/ucm/UcmServer -s cssws -e /usr/lib/css/cssws 2>/tmp/cssws.log 1>&2

See also

inetd(1), inetd.conf(4), init(1), initab(4), services(4)

 

Back to top