MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / enableHandler

Function enableHandler

lib/system/fault.cpp:49–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47}
48
49void enableHandler() noexcept {
50 struct sigaction Action{};
51 Action.sa_sigaction = &signalHandler;
52 Action.sa_flags = SA_SIGINFO;
53 sigaction(SIGFPE, &Action, nullptr);
54 sigaction(SIGBUS, &Action, nullptr);
55 sigaction(SIGSEGV, &Action, nullptr);
56}
57
58void disableHandler() noexcept {
59 std::signal(SIGFPE, SIG_DFL);

Callers 1

increaseHandlerFunction · 0.85

Calls 1

sigactionClass · 0.70

Tested by

no test coverage detected