summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2012-06-01 05:32:37 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2012-06-01 05:32:45 +0000
commit9972f38199626a8fd3783c35b246fa9132543aa5 (patch)
tree7cd944d868a01738d00652662af0154942dba593
parent37e55bd3ab15f915e0b7860ded1b6f6e5aefd249 (diff)
Stop SpringBoard while we are messing with lsd.
-rw-r--r--uicache.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/uicache.mm b/uicache.mm
index 91609b7..71ee523 100644
--- a/uicache.mm
+++ b/uicache.mm
@@ -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