summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-03-21 16:59:26 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-03-21 16:59:26 +0000
commit57e5a70fa8f5d3202a265936c2db1e7bccdfac6f (patch)
treec196c164e05961145ed254960a5f5fda2874a904
parent22f881a22dfd7ae2eafebafd1c6174f20eadc737 (diff)
(new_proc): Oops, reinstall code to request dead name notification on
the task port.
-rw-r--r--proc/mgt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/proc/mgt.c b/proc/mgt.c
index a9d24c5b..135f448e 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -467,6 +467,7 @@ struct proc *
new_proc (task_t task)
{
struct proc *p;
+ mach_port_t foo;
/* Because these have a reference count of one before starting,
they can never be freed, so we're safe. */
@@ -489,6 +490,12 @@ new_proc (task_t task)
p->p_pid = genpid ();
p->p_task = task;
+ mach_port_request_notification (mach_task_self (), p->p_task,
+ MACH_NOTIFY_DEAD_NAME, 1, p->p_pi.port_right,
+ MACH_MSG_TYPE_MAKE_SEND_ONCE, &foo);
+ if (foo != MACH_PORT_NULL)
+ mach_port_deallocate (mach_task_self (), foo);
+
switch (p->p_pid)
{
case 0:
@@ -636,6 +643,8 @@ process_has_exited (struct proc *p)
p->p_ochild->p_prevsib = &startup_proc->p_ochild;
}
+ /* If an operation is in progress for this process, cause it
+ to wakeup and return now. */
if (p->p_waiting || p->p_msgportwait)
condition_broadcast (&p->p_wakeup);