From a2dbc3b1149ad0df72a0252b019a1c490907eb87 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 9 Nov 1995 19:35:01 +0000 Subject: (S_proc_setmsgport): Only do the RPC reply by hand for proc. Also, return the correct port in that by-hand reply. --- proc/msg.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'proc') diff --git a/proc/msg.c b/proc/msg.c index ea5490a4..a84418f6 100644 --- a/proc/msg.c +++ b/proc/msg.c @@ -53,15 +53,18 @@ S_proc_setmsgport (struct proc *p, prociterate (check_message_return, p); p->p_checkmsghangs = 0; - /* init is single-threaded. Reply to it before we expect it - to service requests. */ - proc_setmsgport_reply (reply, replytype, 0, p->p_msgport); - if (p == startup_proc) - startup_essential_task (msgport, mach_task_self (), MACH_PORT_NULL, - "proc", master_host_port); - - return MIG_NO_REPLY; + { + /* init is single-threaded. Reply to it before we expect it + to service requests. */ + proc_setmsgport_reply (reply, replytype, 0, *oldmsgport); + mach_port_deallocate (mach_task_self (), *oldmsgport); + startup_essential_task (msgport, mach_task_self (), MACH_PORT_NULL, + "proc", master_host_port); + return MIG_NO_REPLY; + } + else + return 0; } /* Check to see if process P is blocked trying to get the message port of -- cgit v1.2.3