aboutsummaryrefslogtreecommitdiffstats
path: root/src/system/EventFD.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/system/EventFD.hxx')
-rw-r--r--src/system/EventFD.hxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/system/EventFD.hxx b/src/system/EventFD.hxx
index 2a70461d9..616877f4a 100644
--- a/src/system/EventFD.hxx
+++ b/src/system/EventFD.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -21,6 +21,7 @@
#define MPD_EVENT_FD_HXX
#include "check.h"
+#include "FileDescriptor.hxx"
/**
* A class that wraps eventfd().
@@ -28,17 +29,19 @@
* Errors in the constructor are fatal.
*/
class EventFD {
- int fd;
+ FileDescriptor fd;
public:
EventFD();
- ~EventFD();
+ ~EventFD() {
+ fd.Close();
+ }
EventFD(const EventFD &other) = delete;
EventFD &operator=(const EventFD &other) = delete;
int Get() const {
- return fd;
+ return fd.Get();
}
/**