Revision: 23098 http://trac.macosforge.org/projects/launchd/changeset/23098 Author: zarzycki@apple.com Date: 2007-02-22 14:41:38 -0800 (Thu, 22 Feb 2007) Log Message: ----------- I shot myself in the foot with the 'bootstrap' subcommand. This makes it possible to run from single user mode again. Modified Paths: -------------- trunk/launchd/src/launchctl.c Modified: trunk/launchd/src/launchctl.c =================================================================== --- trunk/launchd/src/launchctl.c 2007-02-22 18:22:46 UTC (rev 23097) +++ trunk/launchd/src/launchctl.c 2007-02-22 22:41:38 UTC (rev 23098) @@ -1345,9 +1345,10 @@ if (!path_check("/System/Library/LoginPlugins/BootCache.loginPlugin")) { int remaining_sec = 60 - tvd.tv_sec; + if (remaining_sec > 0) { sleep(remaining_sec); - } + } const char *bcc_stop_tool[] = { "BootCacheControl", "stop", NULL }; assumes(fwexec(bcc_stop_tool, true) != -1); @@ -1357,9 +1358,9 @@ int bootstrap_cmd(int argc, char *const argv[] __attribute__((unused))) { - if (getpid() == 2 && getuid() == 0) { + if (getuid() == 0) { very_pid2_specific_bootstrap(argc == 2); - } else if (getuid() != 0) { + } else { char *load_launchd_items[] = { "load", "-D", "all", "-S", "Background", NULL }; if (is_safeboot()) {