From 4820cb5436cc98c15c39fac58e2220a1db8a8cc4 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 20 Sep 2013 10:09:14 -0400 Subject: [PATCH] VBOX: Make sure the startup banner and feature dump happen after the boinc_init_options call so that stderr is redirected. --- samples/vboxwrapper/vboxwrapper.cpp | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/samples/vboxwrapper/vboxwrapper.cpp b/samples/vboxwrapper/vboxwrapper.cpp index 764accaf48..890a67e9e3 100644 --- a/samples/vboxwrapper/vboxwrapper.cpp +++ b/samples/vboxwrapper/vboxwrapper.cpp @@ -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( stderr, "%s vboxwrapper: starting\n", vboxwrapper_msg_prefix(buf, sizeof(buf)) ); + // Log important information + // #if defined(_WIN32) && defined(USE_WINSOCK) WSADATA wsdata; retval = WSAStartup( MAKEWORD( 1, 1 ), &wsdata); @@ -419,11 +433,6 @@ int main(int argc, char** argv) { } #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) { fprintf( stderr, @@ -433,12 +442,6 @@ int main(int argc, char** argv) { 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 // #if defined(_WIN32) && defined(_M_IX86)