fix(daemon): Use missing %s when logging XArchEvalWindows result

This commit is contained in:
Nick Bolton
2025-04-15 23:11:25 +01:00
committed by Chris Rizzitello
parent 8a2b6bd688
commit 4988196c47

View File

@ -152,7 +152,7 @@ void MSWindowsProcess::shutdown(HANDLE handle, DWORD pid, int timeout)
}
} else {
XArchEvalWindows error;
LOG_ERR("failed to get process exit code for process %d, error:", pid, error.eval().c_str());
LOG_ERR("failed to get process exit code for process %d, error: %s", pid, error.eval().c_str());
}
// Wait for process to exit gracefully.
@ -161,7 +161,7 @@ void MSWindowsProcess::shutdown(HANDLE handle, DWORD pid, int timeout)
if (waitResult == WAIT_OBJECT_0) { // NOSONAR - Readability
if (!GetExitCodeProcess(handle, &exitCode)) {
XArchEvalWindows error;
LOG_ERR("failed to retrieve exit code after process exit for process %d, error:", pid, error.eval().c_str());
LOG_ERR("failed to get exit code after process exit for process %d, error: %s", pid, error.eval().c_str());
}
LOG_DEBUG("process %d was shutdown gracefully with exit code %d", pid, exitCode);
@ -171,7 +171,7 @@ void MSWindowsProcess::shutdown(HANDLE handle, DWORD pid, int timeout)
LOG_WARN("process %d did not exit within the expected time", pid);
} else {
XArchEvalWindows error;
LOG_ERR("error waiting for process %d to exit, error:", pid, error.eval().c_str());
LOG_ERR("error waiting for process %d to exit, error: %s", pid, error.eval().c_str());
}
// Last resort, terminate the process forcefully.
@ -179,7 +179,7 @@ void MSWindowsProcess::shutdown(HANDLE handle, DWORD pid, int timeout)
LOG_WARN("forcefully terminated process %d", pid);
} else {
XArchEvalWindows error;
LOG_ERR("failed to terminate process %d, error:", pid, error.eval().c_str());
LOG_ERR("failed to terminate process %d, error: %s", pid, error.eval().c_str());
}
}