summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-11-01 17:48:57 +0100
committerJustus Winter <justus@gnupg.org>2016-11-01 19:03:25 +0100
commit85e8f97a33412885ec42a987eca7b56245df2fae (patch)
treecad248c56dd3842adfd8c099c90daa76aecaf8f6
parent65553178d1222b3291143bdddfef9478e0b09021 (diff)
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.
-rw-r--r--include/mach/task_notify.defs7
1 files changed, 5 insertions, 2 deletions
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);