Ice 3.8
C++ API Reference
Loading...
Searching...
No Matches

◆ main() [2/3]

int Ice::Service::main ( int argc,
const char *const argv[],
InitializationData initData = {} )

The primary entry point for services.

This function examines argv for reserved options and takes the appropriate action. The reserved options are shown below.

Win32:

–service NAME

Unix:

–daemon [–nochdir] [–noclose]

If –service or –daemon are specified, the program runs as a service, otherwise the program runs as a regular foreground process. Any service-specific (and Ice-specific) options are stripped from argv (just as for Ice::initialize).

Parameters
argcThe number of arguments in argv.
argvThe command-line arguments.
initDataConfiguration data for the new communicator.
Returns
The application's exit status: EXIT_FAILURE or EXIT_SUCCESS.