main.cpp File Reference


Detailed Description

Main application entry point.

Definition in file main.cpp.

#include <hn/hnprec.h>
#include <hn/hydranode.h>
#include <hn/log.h>

Include dependency graph for main.cpp:

Go to the source code of this file.


Functions

void do_backtrace ()
 Prints call trace to standard error device.
void on_terminate ()
 Handles termination event from system.
void on_fatal_exception ()
 Handles fatal exceptions event from system.
void onSignal (int signum)
 Signal handler (on POSIX systems only).
void onCrash (int signum)
 Signal handler for fatal crash signals.
void initSignalHandlers ()
int main (int argc, char *argv[])

Function Documentation

void do_backtrace  ) 
 

Prints call trace to standard error device.

Definition at line 90 of file main.cpp.

Referenced by on_fatal_exception(), and on_terminate().

void initSignalHandlers  ) 
 

Definition at line 84 of file main.cpp.

Referenced by main().

int main int  argc,
char *  argv[]
 

Definition at line 134 of file main.cpp.

References initSignalHandlers(), HydraNode::instance(), on_fatal_exception(), on_terminate(), and HydraNode::run().

Here is the call graph for this function:

void on_fatal_exception  ) 
 

Handles fatal exceptions event from system.

Definition at line 122 of file main.cpp.

References do_backtrace(), and Log::printLast().

Referenced by main().

Here is the call graph for this function:

void on_terminate  ) 
 

Handles termination event from system.

Definition at line 110 of file main.cpp.

References do_backtrace(), and Log::printLast().

Referenced by main().

Here is the call graph for this function:

void onCrash int  signum  ) 
 

Signal handler for fatal crash signals.

void onSignal int  signum  ) 
 

Signal handler (on POSIX systems only).

Attempts to perform a clean shutdown when SIGQUIT or SIGTERM is received.