fix(daemon): Only log XArchEvalWindows result when GetExitCodeProcess fails
This commit is contained in:
parent
4988196c47
commit
abc963f886
1 changed files with 4 additions and 1 deletions
|
|
@ -312,9 +312,12 @@ void MSWindowsWatchdog::startProcess()
|
||||||
|
|
||||||
if (!createRet) {
|
if (!createRet) {
|
||||||
DWORD exitCode = 0;
|
DWORD exitCode = 0;
|
||||||
GetExitCodeProcess(m_process->info().hProcess, &exitCode);
|
if (GetExitCodeProcess(m_process->info().hProcess, &exitCode)) {
|
||||||
LOG_ERR("daemon failed to run command, exit code: %d", exitCode);
|
LOG_ERR("daemon failed to run command, exit code: %d", exitCode);
|
||||||
|
} else {
|
||||||
|
LOG_ERR("daemon failed to run command, unknown exit code");
|
||||||
throw XArch(new XArchEvalWindows);
|
throw XArch(new XArchEvalWindows);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Wait for program to fail. This needs to be 1 second, as the process may take some time to fail.
|
// Wait for program to fail. This needs to be 1 second, as the process may take some time to fail.
|
||||||
LOG_DEBUG("watchdog waiting for process start result");
|
LOG_DEBUG("watchdog waiting for process start result");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue