···575575 fprintf(stderr, "Cannot set gid_map for the init process: %s\n", strerror(errno));
576576 }
577577 */
578578+579579+ // This is for development only!
580580+ if (getenv("TRY_LAUNCHD") != NULL)
581581+ {
582582+ int status = 0;
583583+ waitpid(pid, &status, 0);
584584+ }
578585579586 // Here's where we resume the child
580587 // if we enable user namespaces
···612619void darlingPreInit(void)
613620{
614621 // TODO: Run /usr/libexec/makewhatis
615615-622622+623623+ // This is for development only!
624624+ if (getenv("TRY_LAUNCHD") != NULL)
625625+ {
626626+ // putenv("KQUEUE_DEBUG=1");
627627+ execl("/bin/mldr", "mldr!/sbin/launchd", "launchd", NULL);
628628+629629+ fprintf(stderr, "Failed to exec launchd: %s\n", strerror(errno));
630630+ abort();
631631+ }
632632+616633 // TODO: this is where we will exec() launchd in future.
617634 // Instead, we just reap zombies.
618635 while (1)