grpc_initialize
- Initializes Ninf-G.
grpc_error_t grpc_initialize(char *config_file_name)
char *config_file_name
The grpc_initialize() function initializes Ninf-G and the Globus Toolkit used by Ninf-G. The configuration file specified by config_file_name is read and the values are saved in global variables within Ninf-G.
If NULL or an empty string is specified in config_file_name , 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.
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.
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.
If successful, GRPC_NO_ERROR is returned. In the case of an error, Error code is returned.
GRPC_CONFIGFILE_NOT_FOUND
GRPC_CONFIGFILE_ERROR
GRPC_ALREADY_INITIALIZED
GRPC_OTHER_ERROR_CODE