From e0a0365383a3baf1a13b68c476421a85d29a244b Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Mon, 20 Oct 2025 22:07:49 +0200 Subject: signals: Replace pipe with eventfd Simplify code. --- src/unique_pipe.hh | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 src/unique_pipe.hh (limited to 'src/unique_pipe.hh') diff --git a/src/unique_pipe.hh b/src/unique_pipe.hh deleted file mode 100644 index c133018..0000000 --- a/src/unique_pipe.hh +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef UNIQUE_PIPE_HH -#define UNIQUE_PIPE_HH - -#include "unique_fd.hh" - -#include - -class unique_pipe { - public: - unique_pipe(); - unique_pipe(unique_pipe&& fd); - unique_pipe(unique_pipe const&) = delete; - unique_pipe& operator=(unique_pipe const&) = delete; - - ~unique_pipe() = default; - - unique_pipe& operator=(unique_pipe&& fd); - - [[nodiscard]] - int reader() const { - return fd_[0].get(); - } - [[nodiscard]] - int writer() const { - return fd_[1].get(); - } - - [[nodiscard]] - explicit operator bool() const { - return fd_[0] || fd_[1]; - } - - void reset(); - - unique_fd release_reader(); - unique_fd release_writer(); - - private: - unique_fd fd_[2]; -}; - -#endif // UNIQUE_PIPE_HH -- cgit v1.2.3-70-g09d2