From 06766c2bd372b95b78d960fec33531a279175758 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 26 Oct 2017 17:59:40 +0200 Subject: kern: Fix new task notifications. * kern/task.c (task_create_kernel): Handle NULL parent tasks. --- kern/task.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kern/task.c b/kern/task.c index 681ce872..a71cca85 100644 --- a/kern/task.c +++ b/kern/task.c @@ -222,7 +222,9 @@ task_create_kernel( task_reference (parent_task); mach_notify_new_task (new_task_notification, convert_task_to_port (new_task), - convert_task_to_port (parent_task)); + parent_task + ? convert_task_to_port (parent_task) + : IP_NULL); } ipc_task_enable(new_task); -- cgit v1.2.3