Commit 8f1c7675 authored by Rom Walton's avatar Rom Walton
Browse files

Revert "VBOX: Fix a crashing bug on Windows. If we fail to acquire a machine...

Revert "VBOX: Fix a crashing bug on Windows.  If we fail to acquire a machine state lock, just report a VM start failure instead of crashing."

This reverts commit 7efd4b47.
parent 4dbc6081
...@@ -1394,28 +1394,25 @@ int VBOX_VM::start() { ...@@ -1394,28 +1394,25 @@ int VBOX_VM::start() {
// We should now own what goes on with the VM. // We should now own what goes on with the VM.
// //
rc = pMachineRO->LockMachine(m_pPrivate->m_pSession, LockType_Write); pMachineRO->LockMachine(m_pPrivate->m_pSession, LockType_Write);
if (CHECK_ERROR(rc)) goto CLEANUP; m_pPrivate->m_pSession->get_Machine(&m_pPrivate->m_pMachine);
rc = m_pPrivate->m_pSession->get_Machine(&m_pPrivate->m_pMachine);
if (CHECK_ERROR(rc)) goto CLEANUP;
rc = m_pPrivate->m_pMachine->get_SessionPID((ULONG*)&vm_pid); rc = m_pPrivate->m_pMachine->get_SessionPID((ULONG*)&vm_pid);
if (CHECK_ERROR(rc)) goto CLEANUP; if (CHECK_ERROR(rc)) goto CLEANUP;
vm_pid_handle = OpenProcess( vm_pid_handle = OpenProcess(
PROCESS_QUERY_INFORMATION | PROCESS_SET_INFORMATION, PROCESS_QUERY_INFORMATION | PROCESS_SET_INFORMATION,
FALSE, FALSE,
vm_pid vm_pid
); );
// Make sure we are in a running state before proceeding // Make sure we are in a running state before proceeding
// //
timeout = dtime() + 300; timeout = dtime() + 300;
do { do {
poll(false); poll(false);
if (online) break; if (online) break;
boinc_sleep(1.0); boinc_sleep(1.0);
} while (timeout >= dtime()); } while (timeout >= dtime());
vboxlog_msg("Successfully started VM. (PID = '%d')", vm_pid); vboxlog_msg("Successfully started VM. (PID = '%d')", vm_pid);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment