]> git.saurik.com Git - cydia.git/commitdiff
Fixed exit launchctl on 2.0.
authorJay Freeman (saurik) <saurik@saurk.com>
Sat, 19 Jul 2008 23:57:19 +0000 (23:57 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Thu, 30 Sep 2010 07:08:11 +0000 (07:08 +0000)
Cydia.mm

index 26a92759c9539124c8514e1c78a6ee5c778bb0d0..0382a7eedf969e3d351249d715f7d9c7b58b4f4f 100644 (file)
--- a/Cydia.mm
+++ b/Cydia.mm
@@ -5219,17 +5219,23 @@ Pcre conffile_r("^'(.*)' '(.*)' ([01]) ([01])$");
 
     [database_ clean];
 
-    if (reload_) {
+    if (true) {
         pid_t pid = ExecFork();
         if (pid == 0) {
+#ifndef __OBJC2__
             sleep(1);
-            if (pid_t child = fork())
+#endif
+
+            if (pid_t child = fork()) {
                 waitpid(child, NULL, 0);
-            else {
+            else {
                 execlp("launchctl", "launchctl", "unload", SpringBoard_, NULL);
+                perror("launchctl unload");
                 exit(0);
             }
+
             execlp("launchctl", "launchctl", "load", SpringBoard_, NULL);
+            perror("launchctl load");
             exit(0);
         }
     }