diff options
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); |
