[launchd-changes] [23815] trunk/launchd/src/launchd_core_logic.c

source_changes at macosforge.org source_changes at macosforge.org
Tue Feb 17 13:39:00 PST 2009


Revision: 23815
          http://trac.macosforge.org/projects/launchd/changeset/23815
Author:   dsorresso at apple.com
Date:     2009-02-17 13:38:59 -0800 (Tue, 17 Feb 2009)
Log Message:
-----------
<rdar://problem/6307603> Remove first per-user launchd hack

Forgot to commit this.

Modified Paths:
--------------
    trunk/launchd/src/launchd_core_logic.c

Modified: trunk/launchd/src/launchd_core_logic.c
===================================================================
--- trunk/launchd/src/launchd_core_logic.c	2009-02-17 21:00:17 UTC (rev 23814)
+++ trunk/launchd/src/launchd_core_logic.c	2009-02-17 21:38:59 UTC (rev 23815)
@@ -613,7 +613,6 @@
 static char **mach_cmd2argv(const char *string);
 static size_t our_strhash(const char *s) __attribute__((pure));
 static void extract_rcsid_substr(const char *i, char *o, size_t osz);
-static void do_first_per_user_launchd_hack(void);
 static void simulate_pid1_crash(void);
 static pid_t spawn_sync(job_t j);
 static pid_t basic_spawn(job_t j, void (*what_to_do)(job_t));
@@ -631,8 +630,6 @@
 static size_t total_children;
 static size_t total_anon_children;
 static mach_port_t the_exception_server;
-static bool did_first_per_user_launchd_BootCache_hack;
-#define JOB_BOOTCACHE_HACK_CHECK(j)	(unlikely(j->per_user && !did_first_per_user_launchd_BootCache_hack && (j->mach_uid >= 500) && (j->mach_uid != (uid_t)-2)))
 static job_t workaround_5477111;
 static pid_t s_update_pid = 0;
 
@@ -3510,10 +3507,6 @@
 		total_children++;
 		LIST_INSERT_HEAD(&j->mgr->active_jobs[ACTIVE_JOB_HASH(c)], j, pid_hash_sle);
 
-		if (JOB_BOOTCACHE_HACK_CHECK(j)) {
-			did_first_per_user_launchd_BootCache_hack = true;
-		}
-
 		if (likely(!j->legacy_mach_job)) {
 			job_assumes(j, runtime_close(oepair[1]) != -1);
 		}
@@ -3543,23 +3536,6 @@
 }
 
 void
-do_first_per_user_launchd_hack(void)
-{
-	char *bcct_tool[] = { "/usr/sbin/BootCacheControl", "tag", NULL };
-	int dummystatus;
-	pid_t bcp;
-
-	if (launchd_assumes((bcp = vfork()) != -1)) {
-		if (bcp == 0) {
-			execve(bcct_tool[0], bcct_tool, environ);
-			_exit(EXIT_FAILURE);
-		} else {
-			launchd_assumes(waitpid(bcp, &dummystatus, 0) != -1);
-		}
-	}
-}
-
-void
 job_start_child(job_t j)
 {
 	typeof(posix_spawn) *psf;
@@ -3572,10 +3548,6 @@
 	size_t binpref_out_cnt = 0;
 	size_t i;
 
-	if (JOB_BOOTCACHE_HACK_CHECK(j)) {
-		do_first_per_user_launchd_hack();
-	}
-
 	job_assumes(j, posix_spawnattr_init(&spattr) == 0);
 
 	job_setup_attributes(j);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/launchd-changes/attachments/20090217/bb7194c8/attachment-0001.html>


More information about the launchd-changes mailing list