system/FileDescriptor: new wrapper class for a file descriptor

This commit is contained in:
Max Kellermann
2015-03-03 17:03:21 +01:00
parent 818d729d8b
commit 40a587bbaf
14 changed files with 443 additions and 124 deletions

View File

@@ -21,6 +21,7 @@
#define MPD_SIGNAL_FD_HXX
#include "check.h"
#include "FileDescriptor.hxx"
#include <signal.h>
@@ -28,7 +29,7 @@
* A class that wraps signalfd().
*/
class SignalFD {
int fd;
FileDescriptor fd;
public:
SignalFD():fd(-1) {}
@@ -48,7 +49,7 @@ public:
void Close();
int Get() const {
return fd;
return fd.Get();
}
/**