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,
prog
);
chdir(dataDir);
if (retval) {
@ -498,16 +499,12 @@ 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);
}
for (;;) {
if (process_exists(prog)) break;
boinc_sleep(0.01);
retval = get_exit_status(prog);
if (retval) {
msg_printf(0, MSG_INFO,
"GPU detection failed. error code %d",
retval
);
}
return 0;