#include <stdlib.h>
#include <unistd.h>
#include <fstream>
#include <csignal>
#include "anyoption.h"
#include "TreqsConfig.h"
#include "Exceptions.h"
#include "Dispatcher.h"
#include "Activator.h"
#include "log4cxx/logger.h"
#include "log4cxx/basicconfigurator.h"
#include "log4cxx/helpers/exception.h"
#include "log4cxx/propertyconfigurator.h"
Functions | |
LoggerPtr | logger (Logger::getLogger("TReqS")) |
void | sig_custom (int sig) |
void | sig_terminate (int sig) |
Do all the necessary cleanup before ending program. | |
void | sig_reload_config (int sig) |
int | main (int argc, char **argv) |
Variables | |
treqs::Dispatcher | myDispatcher |
treqs::Activator | myActivator |
volatile std::sig_atomic_t | interruption |
This is the signal. |
LoggerPtr logger | ( | Logger:: | getLogger"TReqS" | ) |
int main | ( | int | argc, | |
char ** | argv | |||
) |
This is the main function. Get the configuration parameters, spawns the dispatcher and the activator. TReqS reacts to the following signals :
argc | the number of arguments | |
argv | the list of arguments |
void sig_custom | ( | int | sig | ) |
void sig_reload_config | ( | int | sig | ) |
This functions reload the configuration file and updates the parameters. The parameters wich can be hot-set are :
sig |
void sig_terminate | ( | int | sig | ) |
Do all the necessary cleanup before ending program.
volatile std::sig_atomic_t interruption |
This is the signal.