aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/pipe.h
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:17 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:17 +0300
commitd3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch)
treedd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/system/pipe.h
parent72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff)
downloadydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/pipe.h')
-rw-r--r--util/system/pipe.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/util/system/pipe.h b/util/system/pipe.h
index 435e635724..75d0360049 100644
--- a/util/system/pipe.h
+++ b/util/system/pipe.h
@@ -1,29 +1,29 @@
#pragma once
#ifdef __GNUC__
- #pragma GCC diagnostic push
- #pragma GCC diagnostic ignored "-Warray-bounds" //need because of bug in gcc4.9.2
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Warray-bounds" //need because of bug in gcc4.9.2
#endif
-#include "defaults.h"
+#include "defaults.h"
#include "file.h"
#include <util/generic/ptr.h>
-#include <util/network/pair.h>
-#include <util/generic/noncopyable.h>
+#include <util/network/pair.h>
+#include <util/generic/noncopyable.h>
using PIPEHANDLE = SOCKET;
-#define INVALID_PIPEHANDLE INVALID_SOCKET
-
+#define INVALID_PIPEHANDLE INVALID_SOCKET
+
/// Pipe-like object: pipe on POSIX and socket on windows
-class TPipeHandle: public TNonCopyable {
+class TPipeHandle: public TNonCopyable {
public:
inline TPipeHandle() noexcept
- : Fd_(INVALID_PIPEHANDLE)
- {
- }
-
+ : Fd_(INVALID_PIPEHANDLE)
+ {
+ }
+
inline TPipeHandle(PIPEHANDLE fd) noexcept
- : Fd_(fd)
+ : Fd_(fd)
{
}
@@ -34,21 +34,21 @@ public:
bool Close() noexcept;
inline PIPEHANDLE Release() noexcept {
- PIPEHANDLE ret = Fd_;
- Fd_ = INVALID_PIPEHANDLE;
+ PIPEHANDLE ret = Fd_;
+ Fd_ = INVALID_PIPEHANDLE;
return ret;
}
inline void Swap(TPipeHandle& r) noexcept {
- DoSwap(Fd_, r.Fd_);
+ DoSwap(Fd_, r.Fd_);
}
inline operator PIPEHANDLE() const noexcept {
- return Fd_;
+ return Fd_;
}
inline bool IsOpen() const noexcept {
- return Fd_ != INVALID_PIPEHANDLE;
+ return Fd_ != INVALID_PIPEHANDLE;
}
ssize_t Read(void* buffer, size_t byteCount) const noexcept;
@@ -56,9 +56,9 @@ public:
// Only CloseOnExec is supported
static void Pipe(TPipeHandle& reader, TPipeHandle& writer, EOpenMode mode = 0);
-
+
private:
- PIPEHANDLE Fd_;
+ PIPEHANDLE Fd_;
};
class TPipe {
@@ -82,9 +82,9 @@ public:
private:
class TImpl;
using TImplRef = TSimpleIntrusivePtr<TImpl>;
- TImplRef Impl_;
+ TImplRef Impl_;
};
#ifdef __GNUC__
- #pragma GCC diagnostic pop
+ #pragma GCC diagnostic pop
#endif