From 9862af3d781069fe897d256a6f48bbb5732149d9 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 24 May 1994 06:18:14 +0000 Subject: Formerly init.c.~26~ --- init/init.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/init/init.c b/init/init.c index 389c5c9e..9e9db6ec 100644 --- a/init/init.c +++ b/init/init.c @@ -444,26 +444,30 @@ launch_system (void) proc_register_version (procserver, host_priv, "init", HURD_RELEASE, init_version); - /* Give the bootstrap FS its proc and auth ports. */ + /* Get the bootstrap filesystem's proc server port. + We must do this before calling proc_setmsgport below. */ 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.*/ + /* Run the shell. We must do this before calling proc_setmsgport below, + because run_for_real does proc server operations. */ + run_for_real ("/bin/sh"); + printf ("Init has completed.\n"); + fflush (stdout); + + /* 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 before + calling fsys_init, because fsys_init blocks on exec_init, and + exec_init to block waiting on our message port. */ proc_setmsgport (procserver, startup, &old); if (old) mach_port_deallocate (mach_task_self (), old); + /* Give the bootstrap FS its proc and auth ports. */ if (errno = fsys_init (bootport, fsproc, MACH_MSG_TYPE_MOVE_SEND, authserver)) perror ("fsys_init"); - - run_for_real ("/bin/sh"); - printf ("Init has completed.\n"); - fflush (stdout); } -- cgit v1.2.3