Skip to content

Commit

Permalink
fix: pass through exit code
Browse files Browse the repository at this point in the history
  • Loading branch information
Neo23x0 committed Mar 23, 2021
1 parent 8c99e8f commit 6679e3e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion source/Raccine/raccine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
int wmain(int argc, WCHAR* argv[])
{
setlocale(LC_ALL, "");
DWORD threadExitcode = 0;

std::vector<std::wstring> command_line;
std::wstring sCommandLine;
Expand Down Expand Up @@ -122,6 +123,12 @@ int wmain(int argc, WCHAR* argv[])

ResumeThread(hThread);
WaitForSingleObject(hProcess, INFINITE);
if (GetExitCodeThread(hThread, &threadExitcode) == false)
{
if (configuration.is_debug_mode()) {
wprintf(L"can't get return code. error number: %d\n", GetLastError());
}
}
}
}
else {
Expand All @@ -130,8 +137,11 @@ int wmain(int argc, WCHAR* argv[])
}
}

//if (configuration.is_debug_mode()) {
// wprintf(L"return code: %d\n", threadExitcode);
//}
// Log events
logSend(sListLogs);

return 0;
return threadExitcode;
}

0 comments on commit 6679e3e

Please sign in to comment.