diff options
author | stakanviski <stakanviski@yandex-team.ru> | 2022-02-10 16:50:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:01 +0300 |
commit | 95ab23a39b5482a434361566cabdd5b0a433cb43 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system/shellcommand.cpp | |
parent | da8356a5535e6177965cba3bbae73c5fb28f6ccc (diff) | |
download | ydb-95ab23a39b5482a434361566cabdd5b0a433cb43.tar.gz |
Restoring authorship annotation for <stakanviski@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/shellcommand.cpp')
-rw-r--r-- | util/system/shellcommand.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/system/shellcommand.cpp b/util/system/shellcommand.cpp index 35aa721657..b1989b5c8c 100644 --- a/util/system/shellcommand.cpp +++ b/util/system/shellcommand.cpp @@ -299,7 +299,7 @@ public: , QuoteArguments(options.QuoteArguments) , DetachSession(options.DetachSession) , CloseStreams(options.CloseStreams) - , ShouldCloseInput(options.ShouldCloseInput) + , ShouldCloseInput(options.ShouldCloseInput) , InputMode(options.InputMode) , OutputMode(options.OutputMode) , ErrorMode(options.ErrorMode) @@ -414,10 +414,10 @@ public: } } - inline void CloseInput() { + inline void CloseInput() { AtomicSet(ShouldCloseInput, true); - } - + } + inline static bool TerminateIsRequired(void* processInfo) { TProcessInfo* pi = reinterpret_cast<TProcessInfo*>(processInfo); if (!pi->Parent->TerminateFlag) { @@ -1036,8 +1036,8 @@ void TShellCommand::TImpl::Communicate(TProcessInfo* pi) { bytesToWrite = input->Read(inputBuffer.Data(), inputBuffer.Capacity()); if (bytesToWrite == 0) { if (AtomicGet(pi->Parent->ShouldCloseInput)) { - input = nullptr; - } + input = nullptr; + } continue; } bufPos = inputBuffer.Data(); @@ -1189,11 +1189,11 @@ TShellCommand& TShellCommand::Wait() { Impl->Wait(); return *this; } - -TShellCommand& TShellCommand::CloseInput() { - Impl->CloseInput(); - return *this; -} + +TShellCommand& TShellCommand::CloseInput() { + Impl->CloseInput(); + return *this; +} TString TShellCommand::GetQuotedCommand() const { return Impl->GetQuotedCommand(); |