event/SignalMonitor: make SignalMonitorFinish() noexcept

This commit is contained in:
Max Kellermann 2018-08-06 11:48:25 +02:00
parent fdd101c4c5
commit 7df0d3b7fc
2 changed files with 3 additions and 3 deletions

View File

@ -147,7 +147,7 @@ x_sigaction(int signum, const struct sigaction &act)
#endif #endif
void void
SignalMonitorFinish() SignalMonitorFinish() noexcept
{ {
#ifdef USE_SIGNALFD #ifdef USE_SIGNALFD
std::fill_n(signal_handlers, MAX_SIGNAL, nullptr); std::fill_n(signal_handlers, MAX_SIGNAL, nullptr);
@ -159,7 +159,7 @@ SignalMonitorFinish()
for (unsigned i = 0; i < MAX_SIGNAL; ++i) { for (unsigned i = 0; i < MAX_SIGNAL; ++i) {
if (signal_handlers[i]) { if (signal_handlers[i]) {
x_sigaction(i, sa); sigaction(i, &sa, nullptr);
signal_handlers[i] = nullptr; signal_handlers[i] = nullptr;
} }
} }

View File

@ -42,7 +42,7 @@ SignalMonitorInit(EventLoop &loop);
* Deinitialise the signal monitor subsystem. * Deinitialise the signal monitor subsystem.
*/ */
void void
SignalMonitorFinish(); SignalMonitorFinish() noexcept;
/** /**
* Register a handler for the specified signal. The handler will be * Register a handler for the specified signal. The handler will be