From 85e8f97a33412885ec42a987eca7b56245df2fae Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Tue, 1 Nov 2016 17:48:57 +0100 Subject: include: Fix new task notifications. Instead of copying the send right, move it. This fixes a send-right leak. * include/mach/task_notify.defs (task_move_t): New type. (mach_notify_new_task): Use the new type. --- include/mach/task_notify.defs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/mach/task_notify.defs b/include/mach/task_notify.defs index 53b3da4e..a4aff675 100644 --- a/include/mach/task_notify.defs +++ b/include/mach/task_notify.defs @@ -47,10 +47,13 @@ type task_notify_port_t = mach_port_t TASK_NOTIFY_IMPORTS #endif +type task_move_t = MACH_MSG_TYPE_MOVE_SEND + ctype: mach_port_t; + /* These notifications are sent to the port registered via `register_new_task_notification' and provide a robust parental relation between tasks. */ simpleroutine mach_notify_new_task( notify : task_notify_port_t; - task : task_t; - parent : task_t); + task : task_move_t; + parent : task_move_t); -- cgit v1.2.3