io/FileDescriptor: fold CreateSignalFD() into the SignalFD constructor
This commit is contained in:
@@ -236,21 +236,6 @@ FileDescriptor::CheckDuplicate(FileDescriptor new_fd) const noexcept
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
bool
|
||||
FileDescriptor::CreateSignalFD(const sigset_t *mask) noexcept
|
||||
{
|
||||
int new_fd = ::signalfd(fd, mask, SFD_NONBLOCK|SFD_CLOEXEC);
|
||||
if (new_fd < 0)
|
||||
return false;
|
||||
|
||||
fd = new_fd;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool
|
||||
FileDescriptor::Rewind() const noexcept
|
||||
{
|
||||
|
||||
@@ -9,10 +9,6 @@
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <csignal>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <wchar.h>
|
||||
#endif
|
||||
@@ -180,10 +176,6 @@ public:
|
||||
bool CheckDuplicate(FileDescriptor new_fd) const noexcept;
|
||||
#endif
|
||||
|
||||
#ifdef __linux__
|
||||
bool CreateSignalFD(const sigset_t *mask) noexcept;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Close the file descriptor. It should not be called on an
|
||||
* "undefined" object. After this call, IsDefined() is guaranteed
|
||||
|
||||
Reference in New Issue
Block a user