diff options
author | dvshkurko <dvshkurko@yandex-team.ru> | 2022-02-10 16:45:51 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:51 +0300 |
commit | 321ee9bce31ec6e238be26dbcbe539cffa2c3309 (patch) | |
tree | 14407a2757cbf29eb97e266b7f07e851f971000c /util/system/shellcommand.cpp | |
parent | 2f6ca198245aeffd5e2d82b65927c2465b68b4f5 (diff) | |
download | ydb-321ee9bce31ec6e238be26dbcbe539cffa2c3309.tar.gz |
Restoring authorship annotation for <dvshkurko@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/shellcommand.cpp')
-rw-r--r-- | util/system/shellcommand.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/util/system/shellcommand.cpp b/util/system/shellcommand.cpp index b1989b5c8c3..099840f6841 100644 --- a/util/system/shellcommand.cpp +++ b/util/system/shellcommand.cpp @@ -168,10 +168,10 @@ public: return doneBytes; } - static void Pipe(TRealPipeHandle& reader, TRealPipeHandle& writer, EOpenMode mode) { - (void)mode; + static void Pipe(TRealPipeHandle& reader, TRealPipeHandle& writer, EOpenMode mode) { + (void)mode; REALPIPEHANDLE fds[2]; - if (!CreatePipe(&fds[0], &fds[1], nullptr /* handles are not inherited */, 0)) + if (!CreatePipe(&fds[0], &fds[1], nullptr /* handles are not inherited */, 0)) ythrow TFileError() << "failed to create a pipe"; TRealPipeHandle(fds[0]).Swap(reader); TRealPipeHandle(fds[1]).Swap(writer); @@ -254,9 +254,9 @@ private: if (ErrorPipeFd[1].IsOpen()) { ErrorPipeFd[1].Close(); } - if (InputPipeFd[1].IsOpen()) { + if (InputPipeFd[1].IsOpen()) { InputPipeFd[0].Close(); - } + } } void ReleaseParents() { InputPipeFd[1].Release(); @@ -763,13 +763,13 @@ void TShellCommand::TImpl::Run() { TPipes pipes; if (OutputMode != TShellCommandOptions::HANDLE_INHERIT) { - TRealPipeHandle::Pipe(pipes.OutputPipeFd[0], pipes.OutputPipeFd[1], CloseOnExec); + TRealPipeHandle::Pipe(pipes.OutputPipeFd[0], pipes.OutputPipeFd[1], CloseOnExec); } if (ErrorMode != TShellCommandOptions::HANDLE_INHERIT) { - TRealPipeHandle::Pipe(pipes.ErrorPipeFd[0], pipes.ErrorPipeFd[1], CloseOnExec); + TRealPipeHandle::Pipe(pipes.ErrorPipeFd[0], pipes.ErrorPipeFd[1], CloseOnExec); } if (InputMode != TShellCommandOptions::HANDLE_INHERIT) { - TRealPipeHandle::Pipe(pipes.InputPipeFd[0], pipes.InputPipeFd[1], CloseOnExec); + TRealPipeHandle::Pipe(pipes.InputPipeFd[0], pipes.InputPipeFd[1], CloseOnExec); } AtomicSet(ExecutionStatus, SHELL_RUNNING); |