Parcourir la source

Respring after finishing

Sticktron il y a 8 ans
Parent
commit
0aa3f753e5
1 fichiers modifiés avec 6 ajouts et 1 suppressions
  1. 6 1
      g0blin/ViewController.m

+ 6 - 1
g0blin/ViewController.m

@@ -190,7 +190,12 @@ static uint64_t kbase;
     LOG("reloading...");
     LOG("reloading...");
     pid_t pid;
     pid_t pid;
     posix_spawn(&pid, "/bin/launchctl", 0, 0, (char**)&(const char*[]){"/bin/launchctl", "load", "/Library/LaunchDaemons/0.reload.plist", NULL}, NULL);
     posix_spawn(&pid, "/bin/launchctl", 0, 0, (char**)&(const char*[]){"/bin/launchctl", "load", "/Library/LaunchDaemons/0.reload.plist", NULL}, NULL);
-//    waitpid(pid, 0, 0);
+    waitpid(pid, 0, 0);
+    
+    // respring
+    LOG("respringing...");
+    pid_t pid2;
+    posix_spawn(&pid2, "/usr/bin/killall", 0, 0, (char**)&(const char*[]){"/usr/bin/killall", "-9", "SpringBoard", NULL}, NULL);
 }
 }
 
 
 @end
 @end