summaryrefslogtreecommitdiff
path: root/proc/msg.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-07-19 22:25:40 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-07-19 22:25:40 +0000
commite8b08b2719b30c513da3ab7f9e76a6d1c420ea70 (patch)
treea9979b202e42e41aa9764de5a943209d047d8a3d /proc/msg.c
parent2cb13424b9b8a216a5e9d53358dba3934baa4873 (diff)
*** empty log message ***
Diffstat (limited to 'proc/msg.c')
-rw-r--r--proc/msg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/proc/msg.c b/proc/msg.c
index 701fa149..be40e1f5 100644
--- a/proc/msg.c
+++ b/proc/msg.c
@@ -50,6 +50,7 @@ S_proc_setmsgport (struct proc *p,
mach_port_t *oldmsgport,
mach_msg_type_name_t *oldmsgport_type)
{
+ mach_port_t foo;
if (!p)
return EOPNOTSUPP;
@@ -62,6 +63,12 @@ S_proc_setmsgport (struct proc *p,
prociterate (check_message_return, p);
p->p_checkmsghangs = 0;
+ mach_port_request_notification (mach_task_self (), msgport,
+ MACH_NOTIFY_DEAD_NAME, 1, p->p_pi.port_right,
+ MACH_MSG_TYPE_MAKE_SEND_ONCE, &foo);
+ if (foo)
+ mach_port_deallocate (mach_task_self (), foo);
+
if (p == startup_proc)
/* Init is single threaded, so we can't delay our reply for
the essential task RPC; spawn a thread to do it. */