diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-11-25 09:28:09 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-25 09:28:09 -0500 |
| commit | 36c6dfd5b8c6c87410c7c18fb67fd00a72c29491 (patch) | |
| tree | c795703d4a9103acf236e48fe9c5f810692a687f /src/loot.cpp | |
| parent | 7380747ca9adf7c9394c83aad39bd0f0707ab1f5 (diff) | |
| parent | bec112069344281cbf1c61ade2eb1b354780d074 (diff) | |
Merge pull request #903 from isanae/loot-w7-fix
Fixes for windows 7
Diffstat (limited to 'src/loot.cpp')
| -rw-r--r-- | src/loot.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/loot.cpp b/src/loot.cpp index a7251965..47a70596 100644 --- a/src/loot.cpp +++ b/src/loot.cpp @@ -159,7 +159,15 @@ private: { DWORD bytesRead = 0; - if (!::GetOverlappedResultEx(m_stdout.get(), &m_ov, &bytesRead, PipeTimeout, FALSE)) { + const auto r = WaitForSingleObject(m_readEvent.get(), PipeTimeout); + + if (r == WAIT_FAILED) { + const auto e = GetLastError(); + log::error("WaitForSingleObject in AsyncPipe failed, {}", formatSystemMessage(e)); + return {}; + } + + if (!::GetOverlappedResult(m_stdout.get(), &m_ov, &bytesRead, FALSE)) { const auto e = GetLastError(); switch (e) @@ -490,8 +498,6 @@ const Loot::Report& Loot::report() const void Loot::lootThread() { - ::SetThreadDescription(GetCurrentThread(), L"loot"); - try { m_result = false; |
