diff --git a/client/gpu_detect.cpp b/client/gpu_detect.cpp index 5a5f8332e2..b7e7f52f00 100644 --- a/client/gpu_detect.cpp +++ b/client/gpu_detect.cpp @@ -486,6 +486,7 @@ int COPROCS::launch_child_process_to_detect_gpus() { 0, prog ); + chdir(dataDir); if (retval) { @@ -497,18 +498,14 @@ int COPROCS::launch_child_process_to_detect_gpus() { } return retval; } - - // Wait for child to run and exit - for (i=0; i<300; ++i) { - if (process_exists(prog)) break; -// if (boinc_file_exists(COPROC_INFO_FILENAME)) break; - boinc_sleep(0.01); + + retval = get_exit_status(prog); + if (retval) { + msg_printf(0, MSG_INFO, + "GPU detection failed. error code %d", + retval + ); } - - for (;;) { - if (process_exists(prog)) break; - boinc_sleep(0.01); - } - + return 0; }