event/SignalMonitor: make SignalMonitorFinish() noexcept
This commit is contained in:
parent
fdd101c4c5
commit
7df0d3b7fc
@ -147,7 +147,7 @@ x_sigaction(int signum, const struct sigaction &act)
|
||||
#endif
|
||||
|
||||
void
|
||||
SignalMonitorFinish()
|
||||
SignalMonitorFinish() noexcept
|
||||
{
|
||||
#ifdef USE_SIGNALFD
|
||||
std::fill_n(signal_handlers, MAX_SIGNAL, nullptr);
|
||||
@ -159,7 +159,7 @@ SignalMonitorFinish()
|
||||
|
||||
for (unsigned i = 0; i < MAX_SIGNAL; ++i) {
|
||||
if (signal_handlers[i]) {
|
||||
x_sigaction(i, sa);
|
||||
sigaction(i, &sa, nullptr);
|
||||
signal_handlers[i] = nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ SignalMonitorInit(EventLoop &loop);
|
||||
* Deinitialise the signal monitor subsystem.
|
||||
*/
|
||||
void
|
||||
SignalMonitorFinish();
|
||||
SignalMonitorFinish() noexcept;
|
||||
|
||||
/**
|
||||
* Register a handler for the specified signal. The handler will be
|
||||
|
Loading…
Reference in New Issue
Block a user