From 6d43e70a9393d86fb75984fa33815e5d8ab0347f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 11 Aug 2017 09:36:22 +0200 Subject: [PATCH] event/SignalMonitor: throw exception instead of raising fatal error --- src/event/SignalMonitor.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/event/SignalMonitor.cxx b/src/event/SignalMonitor.cxx index 06b700118..b3ef41ecc 100644 --- a/src/event/SignalMonitor.cxx +++ b/src/event/SignalMonitor.cxx @@ -24,7 +24,7 @@ #include "SocketMonitor.hxx" #include "util/Manual.hxx" -#include "system/FatalError.hxx" +#include "system/Error.hxx" #ifdef USE_SIGNALFD #include "system/SignalFD.hxx" @@ -141,7 +141,7 @@ static void x_sigaction(int signum, const struct sigaction &act) { if (sigaction(signum, &act, nullptr) < 0) - FatalSystemError("sigaction() failed"); + throw MakeErrno("sigaction() failed"); } #endif @@ -184,7 +184,7 @@ SignalMonitorRegister(int signo, SignalHandler handler) sigaddset(&signal_mask, signo); if (sigprocmask(SIG_BLOCK, &signal_mask, nullptr) < 0) - FatalSystemError("sigprocmask() failed"); + throw MakeErrno("sigprocmask() failed"); monitor->Update(signal_mask); #else