diff options
author | sereglond <sereglond@yandex-team.ru> | 2022-02-10 16:47:47 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:47:47 +0300 |
commit | 73bb02f2495181e0719a800f979df508924f4b71 (patch) | |
tree | c0748b5dcbade83af788c0abfa89c0383d6b779c /util/stream/pipe.cpp | |
parent | eb3d925534734c808602b31b38b953677f0a279f (diff) | |
download | ydb-73bb02f2495181e0719a800f979df508924f4b71.tar.gz |
Restoring authorship annotation for <sereglond@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/stream/pipe.cpp')
-rw-r--r-- | util/stream/pipe.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/stream/pipe.cpp b/util/stream/pipe.cpp index b2a30144df..51be1934a7 100644 --- a/util/stream/pipe.cpp +++ b/util/stream/pipe.cpp @@ -40,9 +40,9 @@ TPipeBase::~TPipeBase() = default; TPipeInput::TPipeInput(const TString& command) : TPipeBase(command, "r") -{ -} - +{ +} + size_t TPipeInput::DoRead(void* buf, size_t len) { if (Impl_->Pipe_ == nullptr) { return 0; @@ -63,15 +63,15 @@ size_t TPipeInput::DoRead(void* buf, size_t len) { TPipeOutput::TPipeOutput(const TString& command) : TPipeBase(command, "w") -{ -} - -void TPipeOutput::DoWrite(const void* buf, size_t len) { +{ +} + +void TPipeOutput::DoWrite(const void* buf, size_t len) { if (Impl_->Pipe_ == nullptr || len != ::fwrite(buf, 1, len, Impl_->Pipe_)) { ythrow TSystemError() << "fwrite failed"; } -} - +} + void TPipeOutput::Close() { int exitStatus = ::pclose(Impl_->Pipe_); Impl_->Pipe_ = nullptr; |