Modified: branches/PR-5039559/launchd/src/launchd.c (23663 => 23664)
--- branches/PR-5039559/launchd/src/launchd.c 2008-08-15 02:20:45 UTC (rev 23663)
+++ branches/PR-5039559/launchd/src/launchd.c 2008-08-15 03:51:47 UTC (rev 23664)
@@ -168,18 +168,13 @@
}
//#if TARGET_OS_EMBEDDED
- if( getpid() == 1 ) {
+ if( pid1_magic ) {
/* Start the update thread -- rdar://problem/5039559 */
pthread_t t = NULL;
int freq = 30;
int err = pthread_create(&t, NULL, (void (*)(void *))update_thread, (void *)freq);
- if( err != 0 ) {
- /* If we hit this condition, there's something horribly wrong.
- * We're the first process; we shouldn't be running out of threads or anything
- * whacky like that.
- */
- fprintf(stderr, "%s: Dude, your system is seriously messed up (%d - %s). I'm guessing you'll crash very soon.\n", getprogname(), err, strerror(err));
- }
+ launchd_assumes(err == 0);
+ /* FIXME: Figure out what to do if we fail ... */
}
//#endif