]> git.saurik.com Git - uikittools.git/commitdiff
Stop SpringBoard while we are messing with lsd.
authorJay Freeman (saurik) <saurik@saurik.com>
Fri, 1 Jun 2012 05:32:37 +0000 (05:32 +0000)
committerJay Freeman (saurik) <saurik@saurik.com>
Fri, 1 Jun 2012 05:32:45 +0000 (05:32 +0000)
uicache.mm

index 91609b7f3b4eea58654391d56754995ba872d296..71ee52335297fb2a35bc1b0d662950e2227f39df 100644 (file)
@@ -81,6 +81,11 @@ int main(int argc, const char *argv[]) {
     NSString *home(NSHomeDirectory());
     NSString *path([NSString stringWithFormat:@"%@/Library/Caches/com.apple.mobile.installation.plist", home]);
 
+    system("killall -SIGSTOP SpringBoard");
+    sleep(1);
+
+    @try {
+
     Class $LSApplicationWorkspace(objc_getClass("LSApplicationWorkspace"));
     LSApplicationWorkspace *workspace($LSApplicationWorkspace == nil ? nil : [$LSApplicationWorkspace defaultWorkspace]);
 
@@ -151,6 +156,10 @@ int main(int argc, const char *argv[]) {
 
     system("killall installd");
 
+    } @finally {
+        system("killall -SIGCONT SpringBoard");
+    }
+
     if (respring)
         system("launchctl stop com.apple.SpringBoard");
     else