event/InotifyEvent: new class wrapping inotify
Replaces class InotifySource.
This commit is contained in:
@@ -44,7 +44,6 @@
|
||||
#ifdef __linux__
|
||||
#include <sys/eventfd.h>
|
||||
#include <sys/signalfd.h>
|
||||
#include <sys/inotify.h>
|
||||
#endif
|
||||
|
||||
#ifndef O_NOCTTY
|
||||
@@ -283,17 +282,6 @@ FileDescriptor::CreateSignalFD(const sigset_t *mask) noexcept
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
FileDescriptor::CreateInotify() noexcept
|
||||
{
|
||||
int new_fd = inotify_init1(IN_CLOEXEC|IN_NONBLOCK);
|
||||
if (new_fd < 0)
|
||||
return false;
|
||||
|
||||
fd = new_fd;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool
|
||||
|
||||
@@ -209,7 +209,6 @@ public:
|
||||
#ifdef __linux__
|
||||
bool CreateEventFD(unsigned initval=0) noexcept;
|
||||
bool CreateSignalFD(const sigset_t *mask) noexcept;
|
||||
bool CreateInotify() noexcept;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user