return [[NSString stringWithUTF8String:page] stringByAppendingString:path];
}
-static void ReapZombie(pid_t pid) {
- int status;
- wait:
- if (waitpid(pid, &status, 0) == -1)
- if (errno == EINTR)
- goto wait;
- else _assert(false);
-}
-
static _finline void UpdateExternalStatus(uint64_t newStatus) {
int notify_token;
if (notify_register_check("com.saurik.Cydia.status", ¬ify_token) == NOTIFY_STATUS_OK) {
[super viewWillAppear:animated];
}
-- (void) reloadSpringBoard {
- if (kCFCoreFoundationVersionNumber >= 700) // XXX: iOS 6.x
- system("/bin/launchctl stop com.apple.backboardd");
- else
- system("/bin/launchctl stop com.apple.SpringBoard");
- sleep(15);
- system("/usr/bin/killall backboardd SpringBoard");
-}
-
- (void) close {
UpdateExternalStatus(0);
reload: {
UIProgressHUD *hud([delegate_ addProgressHUD]);
[hud setText:UCLocalize("LOADING")];
- [self performSelector:@selector(reloadSpringBoard) withObject:nil afterDelay:0.5];
+ [delegate_ performSelector:@selector(reloadSpringBoard) withObject:nil afterDelay:0.5];
return;
}
[self _loaded];
}
+- (void) reloadSpringBoard {
+ if (kCFCoreFoundationVersionNumber >= 700) // XXX: iOS 6.x
+ system("/bin/launchctl stop com.apple.backboardd");
+ else
+ system("/bin/launchctl stop com.apple.SpringBoard");
+ sleep(15);
+ system("/usr/bin/killall backboardd SpringBoard");
+}
+
- (void) _saveConfig {
SaveConfig(database_);
}
UpdateExternalStatus(0);
[self removeStashController];
-
- pid_t pid(ExecFork());
- if (pid == 0) {
- execlp("launchctl", "launchctl", "stop", "com.apple.SpringBoard", NULL);
- perror("launchctl stop");
-
- exit(0);
- } ReapZombie(pid);
+ [self reloadSpringBoard];
}
- (void) setupViewControllers {