From c63204bf08a03664e2c02f72e51d1fd4ae0fb857 Mon Sep 17 00:00:00 2001 From: Charlie Fenton Date: Fri, 14 Aug 2015 06:20:49 -0700 Subject: [PATCH] Mac uninstaller: Fix a hang bug on some older versions of OS X (including 10.6.8.) --- mac_installer/uninstall.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mac_installer/uninstall.cpp b/mac_installer/uninstall.cpp index fe2f319caf..0ccb3bc1a1 100644 --- a/mac_installer/uninstall.cpp +++ b/mac_installer/uninstall.cpp @@ -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);