From 57e5a70fa8f5d3202a265936c2db1e7bccdfac6f Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 21 Mar 1996 16:59:26 +0000 Subject: (new_proc): Oops, reinstall code to request dead name notification on the task port. --- proc/mgt.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); -- cgit v1.2.3