From 120dee489f4eefe691133e221172e1ef67fe91a1 Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Tue, 9 Mar 1999 18:14:58 +0000 Subject: Tue Mar 9 13:11:43 1999 Thomas Bushnell, BSG * mgt.c (S_proc_reassign): It's not necessary to re-request the task-death notification; we've moved both the task right and the proc port that gets the notification, so delete that. * mgt.c (S_proc_reassign): Use mach_port_destroy instead of mach_port_deallocate to release P->p_msgport, for the same reasons as the changes below. --- proc/mgt.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'proc/mgt.c') diff --git a/proc/mgt.c b/proc/mgt.c index 4a8aa510..f97c3984 100644 --- a/proc/mgt.c +++ b/proc/mgt.c @@ -225,19 +225,11 @@ S_proc_reassign (struct proc *p, /* For security, we need use the request port from STUBP */ ports_transfer_right (p, stubp); - /* Redirect the task-death notification to the new receive right. */ - 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_deallocate (mach_task_self (), foo); - /* Enqueued messages might refer to the old task port, so destroy them. */ if (p->p_msgport != MACH_PORT_NULL) { - mach_port_deallocate (mach_task_self (), p->p_msgport); + mach_port_destroy (mach_task_self (), p->p_msgport); p->p_msgport = MACH_PORT_NULL; p->p_deadmsg = 1; } -- cgit v1.2.3