Mac uninstaller: Fix a hang bug on some older versions of OS X (including 10.6.8.)

This commit is contained in:
Charlie Fenton 2015-08-14 06:20:49 -07:00
parent 7c9a76bb70
commit c63204bf08
1 changed files with 4 additions and 0 deletions

View File

@ -141,6 +141,8 @@ int main(int argc, char *argv[])
err = DoUninstall();
BOINCTranslationCleanup();
printf("Done\n"); // Signal DoPrivilegedExec() that we finished
return err;
}
@ -936,6 +938,8 @@ static OSStatus DoPrivilegedExec(char *brandName, const char *pathToTool, char *
if (ioPipe) {
do {
p = fgets(junk, sizeof(junk), ioPipe);
// On some older versions of OS X, the pipe does not send EOF when our tool exits
if (!strcmp(p, "Done\n")) break;
} while (p);
fclose (ioPipe);