Commit 6d43e70a authored by Max Kellermann's avatar Max Kellermann

event/SignalMonitor: throw exception instead of raising fatal error

parent e8333316
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "SocketMonitor.hxx" #include "SocketMonitor.hxx"
#include "util/Manual.hxx" #include "util/Manual.hxx"
#include "system/FatalError.hxx" #include "system/Error.hxx"
#ifdef USE_SIGNALFD #ifdef USE_SIGNALFD
#include "system/SignalFD.hxx" #include "system/SignalFD.hxx"
...@@ -141,7 +141,7 @@ static void ...@@ -141,7 +141,7 @@ static void
x_sigaction(int signum, const struct sigaction &act) x_sigaction(int signum, const struct sigaction &act)
{ {
if (sigaction(signum, &act, nullptr) < 0) if (sigaction(signum, &act, nullptr) < 0)
FatalSystemError("sigaction() failed"); throw MakeErrno("sigaction() failed");
} }
#endif #endif
...@@ -184,7 +184,7 @@ SignalMonitorRegister(int signo, SignalHandler handler) ...@@ -184,7 +184,7 @@ SignalMonitorRegister(int signo, SignalHandler handler)
sigaddset(&signal_mask, signo); sigaddset(&signal_mask, signo);
if (sigprocmask(SIG_BLOCK, &signal_mask, nullptr) < 0) if (sigprocmask(SIG_BLOCK, &signal_mask, nullptr) < 0)
FatalSystemError("sigprocmask() failed"); throw MakeErrno("sigprocmask() failed");
monitor->Update(signal_mask); monitor->Update(signal_mask);
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment