VBOX: Make sure the startup banner and feature dump happen after the boinc_init_options call so that stderr is redirected.

This commit is contained in:
Rom Walton 2013-09-20 10:09:14 -04:00
parent 72f795b521
commit 4820cb5436
1 changed files with 14 additions and 11 deletions

View File

@ -399,12 +399,26 @@ int main(int argc, char** argv) {
} }
} }
memset(&boinc_options, 0, sizeof(boinc_options));
boinc_options.main_program = true;
boinc_options.check_heartbeat = true;
boinc_options.handle_process_control = true;
boinc_init_options(&boinc_options);
// Prepare environment for detecting system conditions
//
boinc_get_init_data_p(&aid);
// Log banner
//
fprintf( fprintf(
stderr, stderr,
"%s vboxwrapper: starting\n", "%s vboxwrapper: starting\n",
vboxwrapper_msg_prefix(buf, sizeof(buf)) vboxwrapper_msg_prefix(buf, sizeof(buf))
); );
// Log important information
//
#if defined(_WIN32) && defined(USE_WINSOCK) #if defined(_WIN32) && defined(USE_WINSOCK)
WSADATA wsdata; WSADATA wsdata;
retval = WSAStartup( MAKEWORD( 1, 1 ), &wsdata); retval = WSAStartup( MAKEWORD( 1, 1 ), &wsdata);
@ -419,11 +433,6 @@ int main(int argc, char** argv) {
} }
#endif #endif
memset(&boinc_options, 0, sizeof(boinc_options));
boinc_options.main_program = true;
boinc_options.check_heartbeat = true;
boinc_options.handle_process_control = true;
if (trickle_period > 0.0) { if (trickle_period > 0.0) {
fprintf( fprintf(
stderr, stderr,
@ -433,12 +442,6 @@ int main(int argc, char** argv) {
boinc_options.handle_trickle_ups = true; boinc_options.handle_trickle_ups = true;
} }
boinc_init_options(&boinc_options);
// Prepare environment for detecting system conditions
//
boinc_get_init_data_p(&aid);
// Check for architecture incompatibilities // Check for architecture incompatibilities
// //
#if defined(_WIN32) && defined(_M_IX86) #if defined(_WIN32) && defined(_M_IX86)