Commit dd18fe34 authored by Max Kellermann's avatar Max Kellermann

system/SignalFD: throw exception on error

parent 5b09504a
......@@ -32,6 +32,8 @@ typedef BoundMethod<void()> SignalHandler;
/**
* Initialise the signal monitor subsystem.
*
* Throws on error.
*/
void
SignalMonitorInit(EventLoop &loop);
......
......@@ -20,7 +20,7 @@
#include "config.h"
#ifdef USE_SIGNALFD
#include "SignalFD.hxx"
#include "FatalError.hxx"
#include "Error.hxx"
#include <assert.h>
#include <sys/signalfd.h>
......@@ -29,7 +29,7 @@ void
SignalFD::Create(const sigset_t &mask)
{
if (!fd.CreateSignalFD(&mask))
FatalSystemError("signalfd() failed");
throw MakeErrno("signalfd() failed");
}
int
......
......@@ -35,9 +35,10 @@ public:
/**
* Create the signalfd or update its mask.
*
* All errors are fatal.
* Throws on error.
*/
void Create(const sigset_t &mask);
void Close() {
fd.Close();
}
......
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