Improve error message

This commit is contained in:
Peter Sunde 2013-02-27 06:48:35 +01:00
parent 857ed8934b
commit 7091af176a

View File

@ -229,8 +229,11 @@ int Agent::handleStartProcessPacket(ReadBuffer &packet)
int ret = success ? 0 : GetLastError();
trace("CreateProcess: %s %d",
(success ? "success" : "fail"),
(success == ERROR_SUCCESS ? "success" : "fail"),
(int)pi.dwProcessId);
if(ret != ERROR_SUCCESS) {
trace("Create process error code: %d", GetLastError());
}
if (success) {
CloseHandle(pi.hThread);