Class SignalHandler captures signals and reports the context where the signal occurs.
More...
#include <SignalHandler.h>
|
static void | handler (int signal) |
| Signal handler for various types of signals. More...
|
|
Class SignalHandler captures signals and reports the context where the signal occurs.
The signal handler is implemented as a singleton.
Definition at line 41 of file SignalHandler.h.
◆ SignalHandler()
souffle::SignalHandler::SignalHandler |
( |
| ) |
|
|
inlineprivate |
◆ enableLogging()
void souffle::SignalHandler::enableLogging |
( |
| ) |
|
|
inline |
◆ error()
void souffle::SignalHandler::error |
( |
const std::string & |
error | ) |
|
|
inline |
◆ handler()
static void souffle::SignalHandler::handler |
( |
int |
signal | ) |
|
|
inlinestaticprivate |
Signal handler for various types of signals.
Definition at line 164 of file SignalHandler.h.
◆ instance()
◆ reset()
void souffle::SignalHandler::reset |
( |
| ) |
|
|
inline |
Definition at line 113 of file SignalHandler.h.
115 perror(
"Failed to reset SIGSEGV signal handler.");
127 if (
msg !=
nullptr) {
128 std::cerr <<
error <<
" in rule:\n" <<
msg << std::endl;
130 std::cerr <<
error << std::endl;
◆ set()
void souffle::SignalHandler::set |
( |
| ) |
|
|
inline |
Definition at line 88 of file SignalHandler.h.
91 perror(
"Failed to set SIGSEGV signal handler.");
105 perror(
"Failed to reset SIGFPE signal handler.");
◆ setMsg()
void souffle::SignalHandler::setMsg |
( |
const char * |
m | ) |
|
|
inline |
Definition at line 60 of file SignalHandler.h.
63 if (c ==
'\n' || c ==
'\t') {
67 std::cout <<
"Starting work on " << outputMessage << std::endl;
77 if (!
isSet && std::getenv(
"SOUFFLE_ALLOW_SIGNALS") ==
nullptr) {
81 perror(
"Failed to set SIGFPE signal handler.");
◆ isSet
bool souffle::SignalHandler::isSet = false |
|
private |
◆ logMessages
bool souffle::SignalHandler::logMessages = false |
|
private |
◆ msg
std::atomic<const char*> souffle::SignalHandler::msg |
|
private |
◆ prevFpeHandler
void(* souffle::SignalHandler::prevFpeHandler) (int) = nullptr |
|
private |
◆ prevIntHandler
void(* souffle::SignalHandler::prevIntHandler) (int) = nullptr |
|
private |
◆ prevSegVHandler
void(* souffle::SignalHandler::prevSegVHandler) (int) = nullptr |
|
private |
The documentation for this class was generated from the following file: