mirror of https://github.com/BOINC/boinc.git
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 7efd4b474b
.
This commit is contained in:
parent
4dbc60811f
commit
8f1c767593
|
@ -1394,28 +1394,25 @@ int VBOX_VM::start() {
|
|||
|
||||
// We should now own what goes on with the VM.
|
||||
//
|
||||
rc = pMachineRO->LockMachine(m_pPrivate->m_pSession, LockType_Write);
|
||||
if (CHECK_ERROR(rc)) goto CLEANUP;
|
||||
|
||||
rc = m_pPrivate->m_pSession->get_Machine(&m_pPrivate->m_pMachine);
|
||||
if (CHECK_ERROR(rc)) goto CLEANUP;
|
||||
pMachineRO->LockMachine(m_pPrivate->m_pSession, LockType_Write);
|
||||
m_pPrivate->m_pSession->get_Machine(&m_pPrivate->m_pMachine);
|
||||
|
||||
rc = m_pPrivate->m_pMachine->get_SessionPID((ULONG*)&vm_pid);
|
||||
if (CHECK_ERROR(rc)) goto CLEANUP;
|
||||
|
||||
vm_pid_handle = OpenProcess(
|
||||
PROCESS_QUERY_INFORMATION | PROCESS_SET_INFORMATION,
|
||||
FALSE,
|
||||
vm_pid
|
||||
PROCESS_QUERY_INFORMATION | PROCESS_SET_INFORMATION,
|
||||
FALSE,
|
||||
vm_pid
|
||||
);
|
||||
|
||||
// Make sure we are in a running state before proceeding
|
||||
//
|
||||
timeout = dtime() + 300;
|
||||
do {
|
||||
poll(false);
|
||||
if (online) break;
|
||||
boinc_sleep(1.0);
|
||||
poll(false);
|
||||
if (online) break;
|
||||
boinc_sleep(1.0);
|
||||
} while (timeout >= dtime());
|
||||
|
||||
vboxlog_msg("Successfully started VM. (PID = '%d')", vm_pid);
|
||||
|
|
Loading…
Reference in New Issue