diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-11-09 19:35:01 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-11-09 19:35:01 +0000 |
commit | a2dbc3b1149ad0df72a0252b019a1c490907eb87 (patch) | |
tree | e237207da0d0dfdeebc026c6924d4580303f5d52 /proc/msg.c | |
parent | 58771e1e72e34b3f04f7b721b140792225b57ebd (diff) |
(S_proc_setmsgport): Only do the RPC reply by hand for proc. Also,
return the correct port in that by-hand reply.
Diffstat (limited to 'proc/msg.c')
-rw-r--r-- | proc/msg.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -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 |