diff options
author | Alexander Fokin <apfokin@gmail.com> | 2022-02-10 16:45:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:38 +0300 |
commit | bf9e69a933f89af083d895185f01ed65e4d90766 (patch) | |
tree | b2cc84ee7850122e7ccf51d0ea21e4fa7e7a5685 /util/system/shellcommand.cpp | |
parent | 863a59a65247c24db7cb06789bc5cf79d04da32f (diff) | |
download | ydb-bf9e69a933f89af083d895185f01ed65e4d90766.tar.gz |
Restoring authorship annotation for Alexander Fokin <apfokin@gmail.com>. 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 1cebdec47b..b1989b5c8c 100644 --- a/util/system/shellcommand.cpp +++ b/util/system/shellcommand.cpp @@ -24,7 +24,7 @@ #include <grp.h> #include <sys/wait.h> -using TPid = pid_t; +using TPid = pid_t; using TWaitResult = pid_t; using TExitStatus = int; #define WAIT_PROCEED 0 @@ -39,7 +39,7 @@ using TGetGroupListGid = gid_t; #include "winint.h" -using TPid = HANDLE; +using TPid = HANDLE; using TWaitResult = DWORD; using TExitStatus = DWORD; #define WAIT_PROCEED WAIT_TIMEOUT @@ -190,7 +190,7 @@ using REALPIPEHANDLE = PIPEHANDLE; class TShellCommand::TImpl : public TAtomicRefCount<TShellCommand::TImpl> { private: - TPid Pid; + TPid Pid; TString Command; TList<TString> Arguments; TString WorkDir; @@ -367,11 +367,11 @@ public: } inline TProcessId GetPid() const { -#if defined(_win_) - return GetProcessId(Pid); -#else +#if defined(_win_) + return GetProcessId(Pid); +#else return Pid; -#endif +#endif } inline TFileHandle& GetInputHandle() { @@ -949,10 +949,10 @@ void TShellCommand::TImpl::Communicate(TProcessInfo* pi) { } /// @todo factor out (poll + wfmo) #if defined(_unix_) - bool haveIn = false; - bool haveOut = false; - bool haveErr = false; - + bool haveIn = false; + bool haveOut = false; + bool haveErr = false; + if (!input && pi->InputFd.IsOpen()) { DBG(Cerr << "closing input stream..." << Endl); pi->InputFd.Close(); |