From: Jay Freeman (saurik) Date: Wed, 23 Mar 2011 02:49:27 +0000 (-0700) Subject: Use double-ExecFork() rather than system() double-subshell. X-Git-Tag: v1.1.0%rc1~21 X-Git-Url: https://git.saurik.com/cydia.git/commitdiff_plain/1b120913b3664e7171c2c3fe991aba0b634a0c73 Use double-ExecFork() rather than system() double-subshell. --- diff --git a/MobileCydia.mm b/MobileCydia.mm index 17b6b126..a1433db0 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -5226,8 +5226,21 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { } - (void) reloadSpringBoard { - system("(/usr/bin/sbreload &)"); - sleep(60); + pid_t pid(ExecFork()); + if (pid == 0) { + pid_t pid(ExecFork()); + if (pid == 0) { + execl("/usr/bin/sbreload", "sbreload", NULL); + perror("sbreload"); + exit(0); + } + + exit(0); + } + + ReapZombie(pid); + + sleep(15); system("/usr/bin/killall SpringBoard"); }