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

View File

@@ -25,13 +25,14 @@
/**
* A class that wraps eventfd().
*
* Errors in the constructor are fatal.
*/
class EventFD {
UniqueFileDescriptor fd;
public:
/**
* Throws on error.
*/
EventFD();
int Get() const {