OmniSciDB  ab4938a6a3
anonymous_namespace{QueryRunner.cpp} Namespace Reference

Functions

void calcite_shutdown_handler () noexcept
 
void mapd_signal_handler (int signal_number)
 
void register_signal_handler ()
 

Variables

std::shared_ptr< Calciteg_calcite = nullptr
 

Function Documentation

◆ calcite_shutdown_handler()

void anonymous_namespace{QueryRunner.cpp}::calcite_shutdown_handler ( )
noexcept

Definition at line 56 of file QueryRunner.cpp.

Referenced by mapd_signal_handler(), QueryRunner::QueryRunner::QueryRunner(), and QueryRunner::QueryRunner::reset().

56  {
57  if (g_calcite) {
58  g_calcite->close_calcite_server();
59  g_calcite.reset();
60  }
61 }
std::shared_ptr< Calcite > g_calcite
Definition: QueryRunner.cpp:54
+ Here is the caller graph for this function:

◆ mapd_signal_handler()

void anonymous_namespace{QueryRunner.cpp}::mapd_signal_handler ( int  signal_number)

Definition at line 63 of file QueryRunner.cpp.

References calcite_shutdown_handler(), logger::ERROR, LOG, and logger::shutdown().

Referenced by register_signal_handler().

63  {
64  LOG(ERROR) << "Interrupt signal (" << signal_number << ") received.";
66  // shut down logging force a flush
68  // terminate program
69  if (signal_number == SIGTERM) {
70  std::exit(EXIT_SUCCESS);
71  } else {
72  std::exit(signal_number);
73  }
74 }
#define LOG(tag)
Definition: Logger.h:188
void shutdown()
Definition: Logger.cpp:310
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ register_signal_handler()

void anonymous_namespace{QueryRunner.cpp}::register_signal_handler ( )

Definition at line 76 of file QueryRunner.cpp.

References mapd_signal_handler().

76  {
77  std::signal(SIGTERM, mapd_signal_handler);
78  std::signal(SIGSEGV, mapd_signal_handler);
79  std::signal(SIGABRT, mapd_signal_handler);
80 }
void mapd_signal_handler(int signal_number)
Definition: QueryRunner.cpp:63
+ Here is the call graph for this function:

Variable Documentation

◆ g_calcite

std::shared_ptr<Calcite> anonymous_namespace{QueryRunner.cpp}::g_calcite = nullptr