system/Event{FD,Pipe}: throw exception on error

This commit is contained in:
Max Kellermann
2018-08-06 11:49:38 +02:00
parent 148c38fbb9
commit 0c1a001622
4 changed files with 13 additions and 4 deletions
+2 -2
View File
@@ -20,7 +20,7 @@
#include "config.h"
#ifdef USE_EVENTFD
#include "EventFD.hxx"
#include "system/FatalError.hxx"
#include "system/Error.hxx"
#include "Compiler.h"
#include <assert.h>
@@ -29,7 +29,7 @@
EventFD::EventFD()
{
if (!fd.CreateEventFD(0))
FatalSystemError("eventfd() failed");
throw MakeErrno("eventfd() failed");
}
bool