client: Use get_exit_status to wait until the GPU detection process completes and log any error code.

This commit is contained in:
Rom Walton 2013-07-15 19:42:21 -04:00
parent 9d726ba0fc
commit 8321ef0430
1 changed files with 9 additions and 12 deletions

View File

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