NAME

GRPC_INITIALIZE - Initializes Ninf-G.

SYNOPSIS

INTEGER FUNCTION GRPC_INITIALIZE(CONFIG_FILE)

ARGUMENTS

CHARACTER(*) CONFIG_FILE
The configuration file for the client

DESCRIPTION

The GRPC_INITIALIZE() function initializes Ninf-G. The configuration file specified by CONFIG_FILE is read and the values are saved in global variables within Ninf-G.

If an empty string is specified in CONFIG_FILE, the configuration file specified by the NG_CONFIG_FILE environment variable is used as the configuration file.

If the NG_CONFIG_FILE environment variable is also undefined or an empty string, then $HOME/.ngconf is used as the configuration file.

Signal

In its implementation, Ninf-G Client uses SIGINT, SIGTERM and SIGHUP. When a Ninf-G Client catches one of them, it cancels all outstanding sessions, destructs all function/object handles, then exits.

Attention

GRPC_INITIALIZE() overwrites signal handlers of signals used by Ninf-G Client and GRPC_FINALIZE() restores them.

Ninf-G Client may not work correctly if signal() or sigaction() system call is called between grpc_initialize() and grpc_finalize(). Instead, GRPC_SIGNAL_HANDLER_SET_NP() should be used for registering signal handlers.

Ninf-G Client compiled with pthread flavor may not work correctly if a thread is created prior to grpc_initialize() or some signals are removed from signal mask in each thread.

This function is MT-unsafe.

RETURN VALUE

If successful, GRPC_NO_ERROR is returned. In the case of an error, Error code is returned.

ERRORS

GRPC_CONFIGFILE_NOT_FOUND
The configuration file does not exist.
The configuration file could not be read.
GRPC_CONFIGFILE_ERROR
The content of the configuration file is invalid.
GRPC_ALREADY_INITIALIZED
Ninf-G is already initialized.
GRPC_OTHER_ERROR_CODE
Internal error detected.

last update : $Date$