VBOX: Try and prevent vboxwrapper from starting the VM if BOINC has signaled boinc_status.quit_requit or boinc_status.no_heartbeat.

This commit is contained in:
Rom Walton 2014-09-30 09:34:16 +02:00
parent 6c73f71cee
commit 91cbe26810
1 changed files with 9 additions and 0 deletions

View File

@ -1266,6 +1266,15 @@ int VBOX_VM::run(bool do_restore_snapshot) {
if (retval) return retval; if (retval) return retval;
} }
// Has BOINC signaled that we should quit?
// Try to prevent starting the VM in an environment where we might be terminated any
// second. This can happen if BOINC has been told to shutdown or the volunteer has
// told BOINC to switch to a different project.
//
if (boinc_status.no_heartbeat || boinc_status.quit_request) {
return VBOXWRAPPER_ERR_RECOVERABLE;
}
// Start the VM // Start the VM
retval = start(); retval = start();
if (retval) return retval; if (retval) return retval;