From source_changes at macosforge.org Fri Feb 1 10:43:33 2008 From: source_changes at macosforge.org (source_changes@macosforge.org) Date: Fri Feb 1 10:46:34 2008 Subject: [launchd-changes] [23506] branches/SULeopard/launchd/src/launchd.c Message-ID: <20080201184333.61392EEF5E8@beta.macosforge.org> Revision: 23506 http://trac.macosforge.org/projects/launchd/changeset/23506 Author: zarzycki@apple.com Date: 2008-02-01 10:43:05 -0800 (Fri, 01 Feb 2008) Log Message: ----------- reference to undefined HAVE_SECURITY_FRAMEWORK Modified Paths: -------------- branches/SULeopard/launchd/src/launchd.c Modified: branches/SULeopard/launchd/src/launchd.c =================================================================== --- branches/SULeopard/launchd/src/launchd.c 2008-01-29 00:31:31 UTC (rev 23505) +++ branches/SULeopard/launchd/src/launchd.c 2008-02-01 18:43:05 UTC (rev 23506) @@ -23,7 +23,7 @@ #include "config.h" #include "launchd.h" -#if HAVE_SECURITY_FRAMEWORK +#if HAVE_SECURITY #include #include #include @@ -285,7 +285,7 @@ void launchd_SessionCreate(void) { -#if HAVE_SECURITY_FRAMEWORK +#if HAVE_SECURITY OSStatus (*sescr)(SessionCreationFlags flags, SessionAttributeBits attributes); void *seclib; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080201/ceb2e0bb/attachment.html From source_changes at macosforge.org Fri Feb 1 10:44:50 2008 From: source_changes at macosforge.org (source_changes@macosforge.org) Date: Fri Feb 1 10:47:51 2008 Subject: [launchd-changes] [23507] trunk/launchd/src/launchd.c Message-ID: <20080201184450.6E669EEF6B7@beta.macosforge.org> Revision: 23507 http://trac.macosforge.org/projects/launchd/changeset/23507 Author: zarzycki@apple.com Date: 2008-02-01 10:44:28 -0800 (Fri, 01 Feb 2008) Log Message: ----------- reference to undefined HAVE_SECURITY_FRAMEWORK Modified Paths: -------------- trunk/launchd/src/launchd.c Modified: trunk/launchd/src/launchd.c =================================================================== --- trunk/launchd/src/launchd.c 2008-02-01 18:43:05 UTC (rev 23506) +++ trunk/launchd/src/launchd.c 2008-02-01 18:44:28 UTC (rev 23507) @@ -23,7 +23,7 @@ #include "config.h" #include "launchd.h" -#if HAVE_SECURITY_FRAMEWORK +#if HAVE_SECURITY #include #include #include @@ -283,7 +283,7 @@ INTERNAL_ABI void launchd_SessionCreate(void) { -#if HAVE_SECURITY_FRAMEWORK +#if HAVE_SECURITY OSStatus (*sescr)(SessionCreationFlags flags, SessionAttributeBits attributes); void *seclib; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080201/a5be06ac/attachment.html From source_changes at macosforge.org Fri Feb 1 10:46:15 2008 From: source_changes at macosforge.org (source_changes@macosforge.org) Date: Fri Feb 1 10:48:44 2008 Subject: [launchd-changes] [23508] tags/launchd-258.5/ Message-ID: <20080201184615.CFCA0EEF7F3@beta.macosforge.org> Revision: 23508 http://trac.macosforge.org/projects/launchd/changeset/23508 Author: zarzycki@apple.com Date: 2008-02-01 10:46:10 -0800 (Fri, 01 Feb 2008) Log Message: ----------- "Tagging launchd-258.5 from https://svn.macosforge.org/repository/launchd/branches/SULeopard" Added Paths: ----------- tags/launchd-258.5/ Copied: tags/launchd-258.5 (from rev 23507, branches/SULeopard) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080201/4b84e385/attachment.html From source_changes at macosforge.org Sat Feb 2 11:45:21 2008 From: source_changes at macosforge.org (source_changes@macosforge.org) Date: Sat Feb 2 11:48:22 2008 Subject: [launchd-changes] [23509] trunk/launchd/src/launchd_runtime.c Message-ID: <20080202194521.47706F20A91@beta.macosforge.org> Revision: 23509 http://trac.macosforge.org/projects/launchd/changeset/23509 Author: zarzycki@apple.com Date: 2008-02-02 11:45:19 -0800 (Sat, 02 Feb 2008) Log Message: ----------- Note to self. Modified Paths: -------------- trunk/launchd/src/launchd_runtime.c Modified: trunk/launchd/src/launchd_runtime.c =================================================================== --- trunk/launchd/src/launchd_runtime.c 2008-02-01 18:46:10 UTC (rev 23508) +++ trunk/launchd/src/launchd_runtime.c 2008-02-02 19:45:19 UTC (rev 23509) @@ -131,6 +131,8 @@ return launchd_internal_port; } +// static const char *__crashreporter_info__ = ""; + static int internal_mask_pri = LOG_UPTO(LOG_NOTICE); //static int internal_mask_pri = LOG_UPTO(LOG_DEBUG); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080202/807aec5c/attachment.html From source_changes at macosforge.org Wed Feb 6 09:35:25 2008 From: source_changes at macosforge.org (source_changes@macosforge.org) Date: Wed Feb 6 09:38:10 2008 Subject: [launchd-changes] [23510] trunk/launchd/src Message-ID: <20080206173525.4F77CFD9367@beta.macosforge.org> Revision: 23510 http://trac.macosforge.org/projects/launchd/changeset/23510 Author: zarzycki@apple.com Date: 2008-02-06 09:34:27 -0800 (Wed, 06 Feb 2008) Log Message: ----------- We're not ready for GCC 4.2 yet. Modified Paths: -------------- trunk/launchd/src/Makefile.am trunk/launchd/src/Makefile.in trunk/launchd/src/libvproc.c Modified: trunk/launchd/src/Makefile.am =================================================================== --- trunk/launchd/src/Makefile.am 2008-02-02 19:45:19 UTC (rev 23509) +++ trunk/launchd/src/Makefile.am 2008-02-06 17:34:27 UTC (rev 23510) @@ -1,5 +1,5 @@ -CWARN = -Wall -Wextra -Waggregate-return -Wfloat-equal -Wshadow -Wpacked -Wpadded -Wstrict-overflow=4 -Wmissing-prototypes -Wmissing-declarations -Werror # -Wconversion -Wstrict-aliasing=2 -CTUNE = -fvisibility=hidden -fdiagnostics-show-option # -fstrict-aliasing +CWARN = -Wall -Wextra -Waggregate-return -Wfloat-equal -Wshadow -Wpacked -Wmissing-prototypes -Wmissing-declarations -Werror # gcc4.2: -Wstrict-overflow=4 # -Wpadded -Wconversion -Wstrict-aliasing=2 +CTUNE = -fvisibility=hidden # gcc4.2: -fdiagnostics-show-option # -fstrict-aliasing CMISC = -isysroot $(SDKROOT) -F$(SDKROOT)/System/Library/PrivateFrameworks -D__MigTypeCheck=1 -Dmig_external=__private_extern__ AM_CFLAGS = $(CTUNE) $(CMISC) $(CWARN) AM_LDFLAGS = -Wl,-syslibroot,$(SDKROOT) Modified: trunk/launchd/src/Makefile.in =================================================================== --- trunk/launchd/src/Makefile.in 2008-02-02 19:45:19 UTC (rev 23509) +++ trunk/launchd/src/Makefile.in 2008-02-06 17:34:27 UTC (rev 23510) @@ -242,8 +242,8 @@ target_alias = @target_alias@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -CWARN = -Wall -Wextra -Waggregate-return -Wfloat-equal -Wshadow -Wpacked -Wpadded -Wstrict-overflow=4 -Wmissing-prototypes -Wmissing-declarations -Werror # -Wconversion -Wstrict-aliasing=2 -CTUNE = -fvisibility=hidden -fdiagnostics-show-option # -fstrict-aliasing +CWARN = -Wall -Wextra -Waggregate-return -Wfloat-equal -Wshadow -Wpacked -Wmissing-prototypes -Wmissing-declarations -Werror # gcc4.2: -Wstrict-overflow=4 # -Wpadded -Wconversion -Wstrict-aliasing=2 +CTUNE = -fvisibility=hidden # gcc4.2: -fdiagnostics-show-option # -fstrict-aliasing CMISC = -isysroot $(SDKROOT) -F$(SDKROOT)/System/Library/PrivateFrameworks -D__MigTypeCheck=1 -Dmig_external=__private_extern__ AM_CFLAGS = $(CTUNE) $(CMISC) $(CWARN) AM_LDFLAGS = -Wl,-syslibroot,$(SDKROOT) Modified: trunk/launchd/src/libvproc.c =================================================================== --- trunk/launchd/src/libvproc.c 2008-02-02 19:45:19 UTC (rev 23509) +++ trunk/launchd/src/libvproc.c 2008-02-06 17:34:27 UTC (rev 23510) @@ -32,6 +32,9 @@ #include #include #include +#if HAVE_QUARANTINE +#include +#endif #include "liblaunch_public.h" #include "liblaunch_private.h" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080206/ba9ad367/attachment-0001.html From source_changes at macosforge.org Wed Feb 6 09:35:51 2008 From: source_changes at macosforge.org (source_changes@macosforge.org) Date: Wed Feb 6 09:38:40 2008 Subject: [launchd-changes] [23511] tags/launchd-260/ Message-ID: <20080206173551.4E649FD9366@beta.macosforge.org> Revision: 23511 http://trac.macosforge.org/projects/launchd/changeset/23511 Author: zarzycki@apple.com Date: 2008-02-06 09:34:55 -0800 (Wed, 06 Feb 2008) Log Message: ----------- "Tagging launchd-260 from https://svn.macosforge.org/repository/launchd/trunk" Added Paths: ----------- tags/launchd-260/ Copied: tags/launchd-260 (from rev 23510, trunk) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080206/a761b5bf/attachment.html From source_changes at macosforge.org Wed Feb 6 18:15:20 2008 From: source_changes at macosforge.org (source_changes@macosforge.org) Date: Wed Feb 6 18:18:22 2008 Subject: [launchd-changes] [23512] branches/SULeopard/launchd/src/launchd_core_logic.c Message-ID: <20080207021520.5D5F2101014F@beta.macosforge.org> Revision: 23512 http://trac.macosforge.org/projects/launchd/changeset/23512 Author: zarzycki@apple.com Date: 2008-02-06 18:15:19 -0800 (Wed, 06 Feb 2008) Log Message: ----------- Device hung on "slide to unlock" screen Modified Paths: -------------- branches/SULeopard/launchd/src/launchd_core_logic.c Modified: branches/SULeopard/launchd/src/launchd_core_logic.c =================================================================== --- branches/SULeopard/launchd/src/launchd_core_logic.c 2008-02-06 17:34:55 UTC (rev 23511) +++ branches/SULeopard/launchd/src/launchd_core_logic.c 2008-02-07 02:15:19 UTC (rev 23512) @@ -462,9 +462,11 @@ 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 size_t get_kern_max_proc(void); static void do_file_init(void) __attribute__((constructor)); /* file local globals */ +static bool do_apple_internal_magic; static size_t total_children; static size_t total_anon_children; static mach_port_t the_exception_server; @@ -2046,9 +2048,15 @@ job_log_stray_pg(job_t j) { int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PGRP, j->p }; - size_t i, kp_cnt, len = 10*1024*1024; + size_t i, kp_cnt, len = sizeof(struct kinfo_proc) * get_kern_max_proc(); struct kinfo_proc *kp; +#if TARGET_OS_EMBEDDED + if (!do_apple_internal_magic) { + return; + } +#endif + if (!job_assumes(j, (kp = malloc(len)) != NULL)) { return; } @@ -2821,10 +2829,17 @@ job_find_and_blame_pids_with_weird_uids(job_t j) { int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL }; - size_t i, kp_cnt, len = 10*1024*1024; - struct kinfo_proc *kp = malloc(len); + size_t i, kp_cnt, len = sizeof(struct kinfo_proc) * get_kern_max_proc(); + struct kinfo_proc *kp; uid_t u = j->mach_uid; +#if TARGET_OS_EMBEDDED + if (!do_apple_internal_magic) { + return; + } +#endif + kp = malloc(len); + if (!job_assumes(j, kp != NULL)) { return; } @@ -4302,9 +4317,14 @@ jobmgr_log_stray_children(jobmgr_t jm) { int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL }; - size_t i, kp_cnt, len = 10*1024*1024; + size_t i, kp_cnt, len = sizeof(struct kinfo_proc) * get_kern_max_proc(); struct kinfo_proc *kp; +#if TARGET_OS_EMBEDDED + if (!do_apple_internal_magic) { + return; + } +#endif if (jm->parentmgr || getpid() != 1) { return; } @@ -6778,9 +6798,26 @@ free(w4r); } +size_t +get_kern_max_proc(void) +{ + int mib[] = { CTL_KERN, KERN_MAXPROC }; + int max = 100; + size_t max_sz = sizeof(max); + + launchd_assumes(sysctl(mib, 2, &max, &max_sz, NULL, 0) != -1); + + return max; +} + void do_file_init(void) { + struct stat sb; + launchd_assert(mach_timebase_info(&tbi) == 0); + if (stat("/AppleInternal", &sb) == 0) { + do_apple_internal_magic = true; + } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080206/f37047c8/attachment.html From source_changes at macosforge.org Wed Feb 6 18:24:33 2008 From: source_changes at macosforge.org (source_changes@macosforge.org) Date: Wed Feb 6 18:27:33 2008 Subject: [launchd-changes] [23513] trunk/launchd/src/launchd_core_logic.c Message-ID: <20080207022433.6807E101040D@beta.macosforge.org> Revision: 23513 http://trac.macosforge.org/projects/launchd/changeset/23513 Author: zarzycki@apple.com Date: 2008-02-06 18:24:32 -0800 (Wed, 06 Feb 2008) Log Message: ----------- Device hung on "slide to unlock" screen Modified Paths: -------------- trunk/launchd/src/launchd_core_logic.c Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- trunk/launchd/src/launchd_core_logic.c 2008-02-07 02:15:19 UTC (rev 23512) +++ trunk/launchd/src/launchd_core_logic.c 2008-02-07 02:24:32 UTC (rev 23513) @@ -461,6 +461,7 @@ static bool cronemu_min(struct tm *wtm, int min); /* miscellaneous file local functions */ +static size_t get_kern_max_proc(void); static void ensure_root_bkgd_setup(void); static int dir_has_files(job_t j, const char *path); static char **mach_cmd2argv(const char *string); @@ -2104,9 +2105,15 @@ job_log_stray_pg(job_t j) { int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PGRP, j->p }; - size_t i, kp_cnt, len = 10*1024*1024; + size_t i, kp_cnt, len = sizeof(struct kinfo_proc) * get_kern_max_proc(); struct kinfo_proc *kp; +#if TARGET_OS_EMBEDDED + if (!do_apple_internal_logging) { + return; + } +#endif + runtime_ktrace(RTKT_LAUNCHD_FINDING_STRAY_PG, j->p, 0, 0); if (!job_assumes(j, (kp = malloc(len)) != NULL)) { @@ -2417,7 +2424,7 @@ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL }; #endif int mib_sz = sizeof(mib) / sizeof(mib[0]); - size_t i, kp_cnt, len = 10*1024*1024; + size_t i, kp_cnt, len = sizeof(struct kinfo_proc) * get_kern_max_proc(); struct kinfo_proc *kp; if (!do_apple_internal_logging || j->anonymous || j->per_user) { @@ -2958,10 +2965,17 @@ job_log_pids_with_weird_uids(job_t j) { int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL }; - size_t i, kp_cnt, len = 10*1024*1024; - struct kinfo_proc *kp = malloc(len); + size_t i, kp_cnt, len = sizeof(struct kinfo_proc) * get_kern_max_proc(); + struct kinfo_proc *kp; uid_t u = j->mach_uid; +#if TARGET_OS_EMBEDDED + if (!do_apple_internal_logging) { + return; + } +#endif + kp = malloc(len); + if (!job_assumes(j, kp != NULL)) { return; } @@ -4464,9 +4478,15 @@ jobmgr_log_stray_children(jobmgr_t jm) { int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ALL }; - size_t i, kp_cnt = 0, kp_skipped = 0, len = 10*1024*1024; + size_t i, kp_cnt = 0, kp_skipped = 0, len = sizeof(struct kinfo_proc) * get_kern_max_proc(); struct kinfo_proc *kp; +#if TARGET_OS_EMBEDDED + if (!do_apple_internal_logging) { + return; + } +#endif + if (likely(jm->parentmgr || !pid1_magic)) { return; } @@ -6965,3 +6985,15 @@ } } while ((returned == (sizeof(buf) / sizeof(buf[0]))) && (found > 0)); } + +size_t +get_kern_max_proc(void) +{ + int mib[] = { CTL_KERN, KERN_MAXPROC }; + int max = 100; + size_t max_sz = sizeof(max); + + launchd_assumes(sysctl(mib, 2, &max, &max_sz, NULL, 0) != -1); + + return max; +} -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080206/bf69c1cb/attachment-0001.html From source_changes at macosforge.org Fri Feb 8 10:22:32 2008 From: source_changes at macosforge.org (source_changes@macosforge.org) Date: Fri Feb 8 10:24:10 2008 Subject: [launchd-changes] [23514] tags/launchd-258.6/ Message-ID: <20080208182232.B1C05107BF30@beta.macosforge.org> Revision: 23514 http://trac.macosforge.org/projects/launchd/changeset/23514 Author: zarzycki@apple.com Date: 2008-02-08 10:22:08 -0800 (Fri, 08 Feb 2008) Log Message: ----------- "Tagging launchd-258.6 from https://svn.macosforge.org/repository/launchd/branches/SULeopard" Added Paths: ----------- tags/launchd-258.6/ Copied: tags/launchd-258.6 (from rev 23513, branches/SULeopard) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080208/27ad92cd/attachment.html From source_changes at macosforge.org Fri Feb 15 14:14:49 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Fri, 15 Feb 2008 14:14:49 -0800 (PST) Subject: [launchd-changes] [23515] branches/SULeopard/launchd/src/launchctl.c Message-ID: <20080215221449.BEC86124FBDE@beta.macosforge.org> Revision: 23515 http://trac.macosforge.org/projects/launchd/changeset/23515 Author: zarzycki at apple.com Date: 2008-02-15 14:14:48 -0800 (Fri, 15 Feb 2008) Log Message: ----------- We need mobile user applications to be registered at boot time Modified Paths: -------------- branches/SULeopard/launchd/src/launchctl.c Modified: branches/SULeopard/launchd/src/launchctl.c =================================================================== --- branches/SULeopard/launchd/src/launchctl.c 2008-02-08 18:22:08 UTC (rev 23514) +++ branches/SULeopard/launchd/src/launchctl.c 2008-02-15 22:14:48 UTC (rev 23515) @@ -1466,7 +1466,11 @@ _vproc_set_global_on_demand(true); - char *load_launchd_items[] = { "load", "-D", "all", "/etc/mach_init.d", NULL }; + char *load_launchd_items[] = { "load", "-D", "all", "/etc/mach_init.d", +#if TARGET_OS_EMBEDDED + "/var/mobile/Library/LaunchAgents", +#endif + NULL }; if (is_safeboot()) { load_launchd_items[2] = "system"; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080215/dd59ec15/attachment.html From source_changes at macosforge.org Fri Feb 15 14:14:57 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Fri, 15 Feb 2008 14:14:57 -0800 (PST) Subject: [launchd-changes] [23516] tags/launchd-258.7/ Message-ID: <20080215221457.8F9ED124FC03@beta.macosforge.org> Revision: 23516 http://trac.macosforge.org/projects/launchd/changeset/23516 Author: zarzycki at apple.com Date: 2008-02-15 14:14:57 -0800 (Fri, 15 Feb 2008) Log Message: ----------- "Tagging launchd-258.7 from https://svn.macosforge.org/repository/launchd/branches/SULeopard" Added Paths: ----------- tags/launchd-258.7/ Copied: tags/launchd-258.7 (from rev 23515, branches/SULeopard) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080215/54a9bad1/attachment.html From source_changes at macosforge.org Fri Feb 15 14:18:10 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Fri, 15 Feb 2008 14:18:10 -0800 (PST) Subject: [launchd-changes] [23517] trunk/launchd/src/launchctl.c Message-ID: <20080215221810.C424012507B5@beta.macosforge.org> Revision: 23517 http://trac.macosforge.org/projects/launchd/changeset/23517 Author: zarzycki at apple.com Date: 2008-02-15 14:18:10 -0800 (Fri, 15 Feb 2008) Log Message: ----------- We need mobile user applications to be registered at boot time Modified Paths: -------------- trunk/launchd/src/launchctl.c Modified: trunk/launchd/src/launchctl.c =================================================================== --- trunk/launchd/src/launchctl.c 2008-02-15 22:14:57 UTC (rev 23516) +++ trunk/launchd/src/launchctl.c 2008-02-15 22:18:10 UTC (rev 23517) @@ -1469,7 +1469,11 @@ _vproc_set_global_on_demand(true); - char *load_launchd_items[] = { "load", "-D", "all", "/etc/mach_init.d", NULL }; + char *load_launchd_items[] = { "load", "-D", "all", "/etc/mach_init.d", +#if TARGET_OS_EMBEDDED + "/var/mobile/Library/LaunchAgents", +#endif + NULL }; if (is_safeboot()) { load_launchd_items[2] = "system"; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080215/2f3b7d37/attachment.html From source_changes at macosforge.org Fri Feb 15 14:18:21 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Fri, 15 Feb 2008 14:18:21 -0800 (PST) Subject: [launchd-changes] [23518] trunk/launchd/src/launchd_core_logic.c Message-ID: <20080215221821.67EF912507EC@beta.macosforge.org> Revision: 23518 http://trac.macosforge.org/projects/launchd/changeset/23518 Author: zarzycki at apple.com Date: 2008-02-15 14:18:20 -0800 (Fri, 15 Feb 2008) Log Message: ----------- Better logging. Modified Paths: -------------- trunk/launchd/src/launchd_core_logic.c Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- trunk/launchd/src/launchd_core_logic.c 2008-02-15 22:18:10 UTC (rev 23517) +++ trunk/launchd/src/launchd_core_logic.c 2008-02-15 22:18:20 UTC (rev 23518) @@ -1149,7 +1149,8 @@ } if (jp && !jp->anonymous && unlikely(!(kp.kp_proc.p_flag & P_EXEC))) { - job_log(jp, LOG_APPLEONLY, "Performance and sanity: fork() without exec*(). Please switch to posix_spawn()"); + job_log(jp, LOG_APPLEONLY, "Performance and sanity: fork() without exec*(). Please switch to posix_spawn(). Child PID %u", + kp.kp_proc.p_pid); } @@ -2450,8 +2451,8 @@ continue; } - job_log(j, LOG_APPLEONLY, "Performance and sanity: fork() without exec*(). Please switch to posix_spawn()"); - break; + job_log(j, LOG_APPLEONLY, "Performance and sanity: fork() without exec*(). Please switch to posix_spawn(). Child PID %u", + kp[i].kp_proc.p_pid); } out: @@ -6051,7 +6052,7 @@ job_log(j, LOG_DEBUG, "%sMach service lookup: %s", flags & BOOTSTRAP_PER_PID_SERVICE ? "Per PID " : "", servicename); if (unlikely(j->lastlookup == ms && j->lastlookup_gennum == ms->gen_num && !j->per_user)) { - job_log(ms->job, LOG_APPLEONLY, "Performance: Please fix the framework to cache the Mach port for service: %s", servicename); + job_log(j, LOG_APPLEONLY, "Performance: Please fix the framework that talks to \"%s\" to cache the Mach port for service: %s", ms->job->label, servicename); } j->lastlookup = ms; -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080215/7bc065ef/attachment-0001.html From source_changes at macosforge.org Wed Feb 20 12:36:40 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Wed, 20 Feb 2008 12:36:40 -0800 (PST) Subject: [launchd-changes] [23519] trunk/launchd/src Message-ID: <20080220203640.7F8A6133E43F@beta.macosforge.org> Revision: 23519 http://trac.macosforge.org/projects/launchd/changeset/23519 Author: zarzycki at apple.com Date: 2008-02-20 12:36:39 -0800 (Wed, 20 Feb 2008) Log Message: ----------- Make launchd compile 64-bit. It still doesn't work. What remains is malloc()/free() problems (in launchd_unix_ipc.c???). Modified Paths: -------------- trunk/launchd/src/launchd_core_logic.c trunk/launchd/src/launchd_runtime.c trunk/launchd/src/launchd_runtime.h trunk/launchd/src/launchd_runtime_kill.c Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- trunk/launchd/src/launchd_core_logic.c 2008-02-15 22:18:20 UTC (rev 23518) +++ trunk/launchd/src/launchd_core_logic.c 2008-02-20 20:36:39 UTC (rev 23519) @@ -4286,9 +4286,9 @@ return; } -#if defined (__ppc__) +#if defined (__ppc__) || defined(__ppc64__) f = PPC_THREAD_STATE64; -#elif defined(__i386__) +#elif defined(__i386__) || defined(__x86_64__) f = x86_THREAD_STATE; #elif defined(__arm__) f = ARM_THREAD_STATE; Modified: trunk/launchd/src/launchd_runtime.c =================================================================== --- trunk/launchd/src/launchd_runtime.c 2008-02-15 22:18:20 UTC (rev 23518) +++ trunk/launchd/src/launchd_runtime.c 2008-02-20 20:36:39 UTC (rev 23519) @@ -113,6 +113,7 @@ static void do_file_init(void) __attribute__((constructor)); static mach_timebase_info_data_t tbi; +static uint64_t tbi_safe_math_max; static double tbi_float_val; static const int sigigns[] = { SIGHUP, SIGINT, SIGPIPE, SIGALRM, SIGTERM, @@ -1078,7 +1079,7 @@ no_hang_fd = _fd(open("/dev/autofs_nowait", 0)); } - runtime_ktrace(RTKT_LAUNCHD_MACH_IPC|DBG_FUNC_START, bufRequest->Head.msgh_local_port, bufRequest->Head.msgh_id, (int)the_demux); + runtime_ktrace(RTKT_LAUNCHD_MACH_IPC|DBG_FUNC_START, bufRequest->Head.msgh_local_port, bufRequest->Head.msgh_id, (long)the_demux); if (the_demux(&bufRequest->Head, &bufReply->Head) == FALSE) { /* XXX - also gross */ @@ -1327,7 +1328,7 @@ /* This syscall returns EINVAL when the trace isn't enabled. */ if (do_apple_internal_logging) { - syscall(180, code, 0, 0, 0, (int)ra); + syscall(180, code, 0, 0, 0, (long)ra); } } @@ -1338,18 +1339,18 @@ /* This syscall returns EINVAL when the trace isn't enabled. */ if (do_apple_internal_logging) { - syscall(180, code, 0, 0, 0, (int)ra); + syscall(180, code, 0, 0, 0, (long)ra); } } INTERNAL_ABI void -runtime_ktrace(runtime_ktrace_code_t code, int a, int b, int c) +runtime_ktrace(runtime_ktrace_code_t code, long a, long b, long c) { void *ra = __builtin_extract_return_addr(__builtin_return_address(0)); /* This syscall returns EINVAL when the trace isn't enabled. */ if (do_apple_internal_logging) { - syscall(180, code, a, b, c, (int)ra); + syscall(180, code, a, b, c, (long)ra); } } @@ -1612,7 +1613,13 @@ #else if (tbi.numer != tbi.denom) { #endif - if (o < INT32_MAX) { +#ifdef __LP64__ + __uint128_t tmp = o; + tmp *= tbi.numer; + tmp /= tbi.denom; + o = tmp; +#else + if (o <= tbi_safe_math_max) { o *= tbi.numer; o /= tbi.denom; } else { @@ -1620,6 +1627,7 @@ d *= tbi_float_val; o = d; } +#endif } return o; @@ -1633,6 +1641,7 @@ launchd_assert(mach_timebase_info(&tbi) == 0); tbi_float_val = tbi.numer; tbi_float_val /= tbi.denom; + tbi_safe_math_max = UINT64_MAX / tbi.numer; if (getpid() == 1) { pid1_magic = true; Modified: trunk/launchd/src/launchd_runtime.h =================================================================== --- trunk/launchd/src/launchd_runtime.h 2008-02-15 22:18:20 UTC (rev 23518) +++ trunk/launchd/src/launchd_runtime.h 2008-02-20 20:36:39 UTC (rev 23519) @@ -163,7 +163,7 @@ /* All of these log the return address as "arg4" */ INTERNAL_ABI void runtime_ktrace1(runtime_ktrace_code_t code); INTERNAL_ABI void runtime_ktrace0(runtime_ktrace_code_t code); -INTERNAL_ABI void runtime_ktrace(runtime_ktrace_code_t code, int a, int b, int c); +INTERNAL_ABI void runtime_ktrace(runtime_ktrace_code_t code, long a, long b, long c); #define LOG_APPLEONLY 0x4141504c /* AAPL in hex */ Modified: trunk/launchd/src/launchd_runtime_kill.c =================================================================== --- trunk/launchd/src/launchd_runtime_kill.c 2008-02-15 22:18:20 UTC (rev 23518) +++ trunk/launchd/src/launchd_runtime_kill.c 2008-02-20 20:36:39 UTC (rev 23519) @@ -18,15 +18,19 @@ * @APPLE_APACHE_LICENSE_HEADER_END@ */ -#if !defined(__LP64__) && !defined(__arm__) -#define _NONSTD_SOURCE 1 +#if defined(__LP64__) +/* ??? No way to get the old behavior */ #define old_kill(x, y) kill(x, y) -#define old_killpg(x, y) killpg(x, y) -#else +#define old_killpg(x, y) kill(-(x), y) +#elif defined(__arm__) /* ??? No blessed way to get the old behavior */ extern int __kill(int, int, int); #define old_kill(x, y) __kill(x, y, 0) #define old_killpg(x, y) __kill(-(x), y, 0) +#else +#define _NONSTD_SOURCE 1 +#define old_kill(x, y) kill(x, y) +#define old_killpg(x, y) killpg(x, y) #endif #include -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080220/75574aa5/attachment.html From source_changes at macosforge.org Fri Feb 22 13:22:30 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Fri, 22 Feb 2008 13:22:30 -0800 (PST) Subject: [launchd-changes] [23520] trunk/launchd/src/libvproc_public.h Message-ID: <20080222212230.5DA2413C2CCB@beta.macosforge.org> Revision: 23520 http://trac.macosforge.org/projects/launchd/changeset/23520 Author: zarzycki at apple.com Date: 2008-02-22 13:22:29 -0800 (Fri, 22 Feb 2008) Log Message: ----------- Note to self. A design we are considering. Modified Paths: -------------- trunk/launchd/src/libvproc_public.h Modified: trunk/launchd/src/libvproc_public.h =================================================================== --- trunk/launchd/src/libvproc_public.h 2008-02-20 20:36:39 UTC (rev 23519) +++ trunk/launchd/src/libvproc_public.h 2008-02-22 21:22:29 UTC (rev 23520) @@ -34,6 +34,101 @@ const char *vproc_strerror(vproc_err_t r); +/*! + * @header vproc + * + * Processes have two reference counts associated with them: + * + * Dirty Tracks dirty data that needs to be flushed later. + * Standby Tracks any case where future work is expected. + * + * Processes that have no dirty data are called "clean." + * Processes that are not standing by are called "idle." + * + * These two reference counts are used to prevent the application from + * prematurely exiting. + * + * Sometimes, the operating system needs processes to exit. Unix has two + * primary signals to kill applications: + * + * SIGKILL Not catchable by the application. + * SIGTERM Catchable by the application. + * + * If a process is clean, the operating system is free to SIGKILL it at + * shutdown or logout. + * + * If a process is clean and idle, the operating system may send SIGKILL after + * a application specified timeout. + * + * If a process is dirty and idle, the operating system may send SIGTERM after + * a application specified timeout. + * + * + * launchd jobs should update their property lists accordingly. + * + * LaunchServicese uses private API to coordinate whether GUI applications + * have opted into this design. + */ + +/*! + * @function vproc_dirty_retain + * + * @abstract + * Call this API before creating data that needs to be saved via I/O later. + */ +void +vproc_dirty_retain(void); + +/*! + * @function vproc_dirty_release + * + * @abstract + * Call this API after the dirty data has either been flushed or otherwise resolved. + */ +void +vproc_dirty_release(void); + +/*! + * @function vproc_dirty_count + * + * @result + * Zero if the program is clean. Non-zero if the program contains dirty data. + * + * @abstract + * A simple API to discover whether the program is dirty or not. + */ +size_t +vproc_dirty_count(void); + +/*! + * @function vproc_standby_retain + * + * @abstract + * Call this API when registering notfications. For example: timers network + * state change, or when monitoring keyboard/mouse events. + */ +void vproc_standby_retain(void); + +/*! + * @function vproc_standby_release + * + * @abstract + * Call this API when deregistering notfications. + */ +void vproc_standby_release(void); + +/*! + * @function vproc_standby_count + * + * @result + * Zero if the program is idle. Non-zero if the program contains outstanding event sources registered. + * + * @abstract + * A simple API to discover whether the program is idle or not. + */ +size_t +size_t vproc_standby_count(void); + #pragma GCC visibility pop __END_DECLS -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080222/7fe562dd/attachment.html From source_changes at macosforge.org Fri Feb 22 13:27:25 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Fri, 22 Feb 2008 13:27:25 -0800 (PST) Subject: [launchd-changes] [23521] trunk/launchd/src/libvproc_public.h Message-ID: <20080222212725.EED0E13C30EE@beta.macosforge.org> Revision: 23521 http://trac.macosforge.org/projects/launchd/changeset/23521 Author: zarzycki at apple.com Date: 2008-02-22 13:27:25 -0800 (Fri, 22 Feb 2008) Log Message: ----------- Typo. Modified Paths: -------------- trunk/launchd/src/libvproc_public.h Modified: trunk/launchd/src/libvproc_public.h =================================================================== --- trunk/launchd/src/libvproc_public.h 2008-02-22 21:22:29 UTC (rev 23520) +++ trunk/launchd/src/libvproc_public.h 2008-02-22 21:27:25 UTC (rev 23521) @@ -104,7 +104,7 @@ * @function vproc_standby_retain * * @abstract - * Call this API when registering notfications. For example: timers network + * Call this API when registering notifications. For example: timers network * state change, or when monitoring keyboard/mouse events. */ void vproc_standby_retain(void); @@ -113,7 +113,7 @@ * @function vproc_standby_release * * @abstract - * Call this API when deregistering notfications. + * Call this API when deregistering notifications. */ void vproc_standby_release(void); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080222/31f40b31/attachment-0001.html From source_changes at macosforge.org Mon Feb 25 11:42:05 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Mon, 25 Feb 2008 11:42:05 -0800 (PST) Subject: [launchd-changes] [23522] trunk/launchd/src/libvproc_public.h Message-ID: <20080225194205.04BCE141A491@beta.macosforge.org> Revision: 23522 http://trac.macosforge.org/projects/launchd/changeset/23522 Author: zarzycki at apple.com Date: 2008-02-25 11:42:03 -0800 (Mon, 25 Feb 2008) Log Message: ----------- Incorporated feedback. Modified Paths: -------------- trunk/launchd/src/libvproc_public.h Modified: trunk/launchd/src/libvproc_public.h =================================================================== --- trunk/launchd/src/libvproc_public.h 2008-02-22 21:27:25 UTC (rev 23521) +++ trunk/launchd/src/libvproc_public.h 2008-02-25 19:42:03 UTC (rev 23522) @@ -39,14 +39,15 @@ * * Processes have two reference counts associated with them: * - * Dirty Tracks dirty data that needs to be flushed later. - * Standby Tracks any case where future work is expected. + * Transactions Tracks unfinished work. For example: saving a modified + * document. + * Standby Tracks outstanding callbacks from external subsystems. * - * Processes that have no dirty data are called "clean." - * Processes that are not standing by are called "idle." + * Descriptive aliases: * - * These two reference counts are used to prevent the application from - * prematurely exiting. + * A process with no outstanding transactions is called "clean." + * A process with outstanding transactions is called "dirty." + * A process with no standby work is called "idle." * * Sometimes, the operating system needs processes to exit. Unix has two * primary signals to kill applications: @@ -55,79 +56,69 @@ * SIGTERM Catchable by the application. * * If a process is clean, the operating system is free to SIGKILL it at - * shutdown or logout. + * shutdown or logout. This behavior is opt in. * * If a process is clean and idle, the operating system may send SIGKILL after - * a application specified timeout. + * a application specified timeout. This behavior is opt in. * * If a process is dirty and idle, the operating system may send SIGTERM after - * a application specified timeout. + * a application specified timeout. This behavior is opt in. * * * launchd jobs should update their property lists accordingly. * - * LaunchServicese uses private API to coordinate whether GUI applications + * LaunchServices uses private API to coordinate whether GUI applications * have opted into this design. */ /*! - * @function vproc_dirty_retain + * @function vproc_transaction_prepare * + * @result + * Returns an opaque handle to be passed to vproc_transaction_complete(). + * * @abstract * Call this API before creating data that needs to be saved via I/O later. */ -void -vproc_dirty_retain(void); +void * +vproc_transaction_prepare(void); /*! - * @function vproc_dirty_release + * @function vproc_transaction_complete * + * @param + * The handle previously created with vproc_transaction_prepare(). + * * @abstract - * Call this API after the dirty data has either been flushed or otherwise resolved. + * Call this API after the data has either been flushed or otherwise resolved. + * + * @discussion + * Calling this API with the same handle more than once is undefined. */ void -vproc_dirty_release(void); +vproc_transaction_complete(void *handle); /*! - * @function vproc_dirty_count + * @function vproc_standby_prepare * - * @result - * Zero if the program is clean. Non-zero if the program contains dirty data. - * * @abstract - * A simple API to discover whether the program is dirty or not. - */ -size_t -vproc_dirty_count(void); - -/*! - * @function vproc_standby_retain - * - * @abstract - * Call this API when registering notifications. For example: timers network + * Call this API before registering notifications. For example: timers network * state change, or when monitoring keyboard/mouse events. */ -void vproc_standby_retain(void); +void * +vproc_standby_prepare(void); /*! - * @function vproc_standby_release + * @function vproc_standby_complete * * @abstract * Call this API when deregistering notifications. - */ -void vproc_standby_release(void); - -/*! - * @function vproc_standby_count * - * @result - * Zero if the program is idle. Non-zero if the program contains outstanding event sources registered. - * - * @abstract - * A simple API to discover whether the program is idle or not. + * @discussion + * Calling this API with the same handle more than once is undefined. */ -size_t -size_t vproc_standby_count(void); +void +vproc_standby_complete(void *handle); #pragma GCC visibility pop -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080225/431fb075/attachment.html From source_changes at macosforge.org Mon Feb 25 11:43:09 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Mon, 25 Feb 2008 11:43:09 -0800 (PST) Subject: [launchd-changes] [23523] trunk/launchd/src/libvproc_public.h Message-ID: <20080225194309.8ABFD141A4C0@beta.macosforge.org> Revision: 23523 http://trac.macosforge.org/projects/launchd/changeset/23523 Author: zarzycki at apple.com Date: 2008-02-25 11:43:09 -0800 (Mon, 25 Feb 2008) Log Message: ----------- Fix an oversight. Modified Paths: -------------- trunk/launchd/src/libvproc_public.h Modified: trunk/launchd/src/libvproc_public.h =================================================================== --- trunk/launchd/src/libvproc_public.h 2008-02-25 19:42:03 UTC (rev 23522) +++ trunk/launchd/src/libvproc_public.h 2008-02-25 19:43:09 UTC (rev 23523) @@ -101,6 +101,9 @@ /*! * @function vproc_standby_prepare * + * @result + * Returns an opaque handle to be passed to vproc_standby_complete(). + * * @abstract * Call this API before registering notifications. For example: timers network * state change, or when monitoring keyboard/mouse events. @@ -111,6 +114,9 @@ /*! * @function vproc_standby_complete * + * @param + * The handle previously created with vproc_standby_prepare(). + * * @abstract * Call this API when deregistering notifications. * -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080225/74859dd2/attachment.html From source_changes at macosforge.org Tue Feb 26 13:19:50 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Tue, 26 Feb 2008 13:19:50 -0800 (PST) Subject: [launchd-changes] [23524] trunk/launchd/src/libvproc_public.h Message-ID: <20080226211950.35EE61437D67@beta.macosforge.org> Revision: 23524 http://trac.macosforge.org/projects/launchd/changeset/23524 Author: zarzycki at apple.com Date: 2008-02-26 13:19:49 -0800 (Tue, 26 Feb 2008) Log Message: ----------- More feedback. Modified Paths: -------------- trunk/launchd/src/libvproc_public.h Modified: trunk/launchd/src/libvproc_public.h =================================================================== --- trunk/launchd/src/libvproc_public.h 2008-02-25 19:43:09 UTC (rev 23523) +++ trunk/launchd/src/libvproc_public.h 2008-02-26 21:19:49 UTC (rev 23524) @@ -67,11 +67,19 @@ * * launchd jobs should update their property lists accordingly. * - * LaunchServices uses private API to coordinate whether GUI applications + * LaunchServices uses private methods to coordinate whether GUI applications * have opted into this design. */ /*! + * @typedef vproc_transaction_t + * + * @abstract + * An opaque handle used to track outstanding transactions. + */ +typedef struct vproc_transaction_s *vproc_transaction_t; + +/*! * @function vproc_transaction_prepare * * @result @@ -80,7 +88,7 @@ * @abstract * Call this API before creating data that needs to be saved via I/O later. */ -void * +vproc_transaction_t vproc_transaction_prepare(void); /*! @@ -96,9 +104,17 @@ * Calling this API with the same handle more than once is undefined. */ void -vproc_transaction_complete(void *handle); +vproc_transaction_complete(vproc_transaction_t handle); /*! + * @typedef vproc_standby_t + * + * @abstract + * An opaque handle used to track outstanding standby requests. + */ +typedef struct vproc_standby_s *vproc_standby_t; + +/*! * @function vproc_standby_prepare * * @result @@ -108,7 +124,7 @@ * Call this API before registering notifications. For example: timers network * state change, or when monitoring keyboard/mouse events. */ -void * +vproc_standby_t vproc_standby_prepare(void); /*! @@ -124,7 +140,7 @@ * Calling this API with the same handle more than once is undefined. */ void -vproc_standby_complete(void *handle); +vproc_standby_complete(vproc_standby_t handle); #pragma GCC visibility pop -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080226/05e2b929/attachment-0001.html From source_changes at macosforge.org Tue Feb 26 13:39:34 2008 From: source_changes at macosforge.org (source_changes at macosforge.org) Date: Tue, 26 Feb 2008 13:39:34 -0800 (PST) Subject: [launchd-changes] [23525] trunk/launchd/src Message-ID: <20080226213934.0056D1437EAA@beta.macosforge.org> Revision: 23525 http://trac.macosforge.org/projects/launchd/changeset/23525 Author: zarzycki at apple.com Date: 2008-02-26 13:39:33 -0800 (Tue, 26 Feb 2008) Log Message: ----------- 10A14 vs. 10A12: 3-4 sec boot time regression (launchd) Modified Paths: -------------- trunk/launchd/src/launchctl.c trunk/launchd/src/launchd_core_logic.c Modified: trunk/launchd/src/launchctl.c =================================================================== --- trunk/launchd/src/launchctl.c 2008-02-26 21:19:49 UTC (rev 23524) +++ trunk/launchd/src/launchctl.c 2008-02-26 21:39:33 UTC (rev 23525) @@ -152,6 +152,7 @@ static void read_launchd_conf(void); static bool job_disabled_logic(launch_data_t obj); static void fix_bogus_file_metadata(void); +static void do_file_init(void) __attribute__((constructor)); typedef enum { BOOTCACHE_START = 1, @@ -220,6 +221,7 @@ static bool istty; static bool verbose; static bool is_managed; +static bool do_apple_internal_magic; int main(int argc, char *const argv[]) @@ -1481,7 +1483,6 @@ assumes(load_and_unload_cmd(4, load_launchd_items) == 0); -#ifdef __ppc__ /* * 5066316 * @@ -1524,9 +1525,10 @@ * fine. Remember: IPC is the preferred way to serialize operations. * */ - mach_timespec_t w = { 5, 0 }; - IOKitWaitQuiet(kIOMasterPortDefault, &w); -#endif + if (!do_apple_internal_magic) { + mach_timespec_t w = { 5, 0 }; + IOKitWaitQuiet(kIOMasterPortDefault, &w); + } do_BootCache_magic(BOOTCACHE_TAG); @@ -3182,3 +3184,13 @@ assumes(reboot(RB_AUTOBOOT) != -1); } } + +void +do_file_init(void) +{ + struct stat sb; + + if (stat("/AppleInternal", &sb) == 0) { + do_apple_internal_magic = true; + } +} Modified: trunk/launchd/src/launchd_core_logic.c =================================================================== --- trunk/launchd/src/launchd_core_logic.c 2008-02-26 21:19:49 UTC (rev 23524) +++ trunk/launchd/src/launchd_core_logic.c 2008-02-26 21:39:33 UTC (rev 23525) @@ -4028,22 +4028,17 @@ struct machservice *ms; struct stat sb; bool good_exit = (WIFEXITED(j->last_exit_status) && WEXITSTATUS(j->last_exit_status) == 0); + bool is_not_kextd = (do_apple_internal_logging || (strcmp(j->label, "com.apple.kextd") != 0)); -#ifdef __ppc__ /* * 5066316 * * We definitely need to revisit this after Leopard ships. Please see * launchctl.c for the other half of this hack. */ - if (unlikely(j->mgr->global_on_demand_cnt > 0 && strcmp(j->label, "com.apple.kextd") != 0)) { + if (unlikely(j->mgr->global_on_demand_cnt > 0 && is_not_kextd)) { return false; } -#else - if (unlikely(j->mgr->global_on_demand_cnt > 0)) { - return false; - } -#endif if (j->start_pending) { job_log(j, LOG_DEBUG, "KeepAlive check: Pent-up non-IPC launch criteria."); -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.macosforge.org/pipermail/launchd-changes/attachments/20080226/6706549d/attachment.html