summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-05-24 04:05:40 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-05-24 04:05:40 +0000
commit22d178a550adbb3bae0685c6ee41be71c6683e3a (patch)
tree8000311d215d72633e95cc4b99c9e4949a8bc1a4 /init
parent4aaa0b5ba9c8a2ab14f213f2f87b28be26ce7181 (diff)
Formerly init.c.~25~
Diffstat (limited to 'init')
-rw-r--r--init/init.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/init/init.c b/init/init.c
index 8d435a70..389c5c9e 100644
--- a/init/init.c
+++ b/init/init.c
@@ -446,6 +446,17 @@ launch_system (void)
/* Give the bootstrap FS its proc and auth ports. */
proc_task2proc (procserver, fstask, &fsproc);
+
+ /* Tell the proc server our msgport. Be sure to do this after we
+ are all done making requests of proc. Once we have done this
+ RPC, proc assumes it can send us requests, so we cannot block on
+ proc again before accepting more RPC requests! However, we must
+ do this befory calling fsys_init, because fsys_init causes the
+ exec server to block waiting on our message yort.*/
+ proc_setmsgport (procserver, startup, &old);
+ if (old)
+ mach_port_deallocate (mach_task_self (), old);
+
if (errno = fsys_init (bootport, fsproc, MACH_MSG_TYPE_MOVE_SEND,
authserver))
perror ("fsys_init");
@@ -453,13 +464,6 @@ launch_system (void)
run_for_real ("/bin/sh");
printf ("Init has completed.\n");
fflush (stdout);
-
- /* Tell the proc server our msgport. Be sure to do this last. Once we
- have done this RPC, proc assumes it can send us requests, so we cannot
- block on proc again before accepting more RPC requests! */
- proc_setmsgport (procserver, startup, &old);
- if (old)
- mach_port_deallocate (mach_task_self (), old);
}