| 47 | } |
| 48 | |
| 49 | void 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 | |
| 58 | void disableHandler() noexcept { |
| 59 | std::signal(SIGFPE, SIG_DFL); |
no test coverage detected