VBOX: If we fail to terminate vboxmanage on a TIMEOUT, log the reason why.

This commit is contained in:
Rom Walton 2014-02-04 15:13:49 -05:00
parent c7db808abd
commit ab9f75c155
1 changed files with 8 additions and 1 deletions

View File

@ -2821,7 +2821,14 @@ int VBOX_VM::vbm_popen_raw(string& command, string& output, unsigned int timeout
// Timeout?
if (ulExitTimeout >= (timeout * 1000)) {
TerminateProcess(pi.hProcess, EXIT_FAILURE);
if (!TerminateProcess(pi.hProcess, EXIT_FAILURE)) {
fprintf(
stderr,
"%s TerminateProcess failed! (%d).\n",
vboxwrapper_msg_prefix(buf, sizeof(buf)),
GetLastError()
);
}
ulExitCode = 0;
retval = ERR_TIMEOUT;
Sleep(1000);