client: wait as long as necessary for the GPU detection child process to exit: eliminate the 3-second limit.

This commit is contained in:
Charlie Fenton 2013-07-15 14:43:29 -07:00
parent 2bdd559c04
commit 88135a7000
1 changed files with 4 additions and 7 deletions

View File

@ -437,7 +437,7 @@ int COPROCS::launch_child_process_to_detect_gpus() {
int retval = 0; int retval = 0;
boinc_delete_file(COPROC_INFO_FILENAME); boinc_delete_file(COPROC_INFO_FILENAME);
for (i=0; i<300; ++i) { for (;;) {
if (!boinc_file_exists(COPROC_INFO_FILENAME)) break; if (!boinc_file_exists(COPROC_INFO_FILENAME)) break;
boinc_sleep(0.01); boinc_sleep(0.01);
} }
@ -501,15 +501,12 @@ int COPROCS::launch_child_process_to_detect_gpus() {
// Wait for child to run and exit // Wait for child to run and exit
for (i=0; i<300; ++i) { for (i=0; i<300; ++i) {
if (process_exists(prog)) break; if (process_exists(prog)) break;
if (boinc_file_exists(COPROC_INFO_FILENAME)) break; // if (boinc_file_exists(COPROC_INFO_FILENAME)) break;
boinc_sleep(0.01); boinc_sleep(0.01);
} }
for (i=0; i<300; ++i) { for (;;) {
if (boinc_file_exists(COPROC_INFO_FILENAME) && if (process_exists(prog)) break;
!process_exists(prog)) {
break;
}
boinc_sleep(0.01); boinc_sleep(0.01);
} }