Mac installer: Minor fix to debugging print statement; add a comment

This commit is contained in:
Charlie Fenton 2021-07-02 04:34:00 -07:00
parent 247b05ca74
commit dd09773e60
1 changed files with 4 additions and 2 deletions

View File

@ -2269,14 +2269,16 @@ int optionally_install_rosetta2() {
fflush(stdout); fflush(stdout);
if (err) return err; if (err) return err;
// Wait up to 20 seconds for system to install Rosetta 2 // Wait up to 20 seconds for system to install Rosetta 2.
// My tests seem to show that callPosixSpawn() does not return until after
// installaton of Rosetta 2 is complete, but do this anyway to be sure.
for (;;) { for (;;) {
err = check_rosetta2_installed(); err = check_rosetta2_installed();
if (err == 0) break; if (err == 0) break;
if (++i > 20) break; if (++i > 20) break;
boinc_sleep(1); boinc_sleep(1);
} }
printf("check_rosetta2_installed() returned %d after %d seconds.\n", err, i+1); printf("check_rosetta2_installed() returned %d after %d seconds.\n", err, i);
fflush(stdout); fflush(stdout);
} }
return err; return err;