summaryrefslogtreecommitdiff
path: root/Cydia.mm
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2008-07-19 23:57:19 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:08:11 +0000
commitdc548dd13fc3f1ce1cdfc4b71783c127399898f2 (patch)
treed7b677e3563fbf50b332f533b443a81cd2ed7c14 /Cydia.mm
parent717d8c858e632b9f27f6f1c300ec36820f32b13a (diff)
Fixed exit launchctl on 2.0.
Diffstat (limited to 'Cydia.mm')
-rw-r--r--Cydia.mm12
1 files changed, 9 insertions, 3 deletions
diff --git a/Cydia.mm b/Cydia.mm
index 26a9275..0382a7e 100644
--- 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);
}
}