mirror of https://github.com/BOINC/boinc.git
client: Use get_exit_status to wait until the GPU detection process completes and log any error code.
This commit is contained in:
parent
9d726ba0fc
commit
8321ef0430
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue