summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <teythoon@avior.uberspace.de>2017-10-26 17:59:40 +0200
committerJustus Winter <teythoon@avior.uberspace.de>2017-10-26 18:25:12 +0200
commit06766c2bd372b95b78d960fec33531a279175758 (patch)
tree6a05a3797cfebfe098d641dc41a63604533555ed
parent10ebf9565f69760e46a8f271e22c5367d54e10ff (diff)
kern: Fix new task notifications.
* kern/task.c (task_create_kernel): Handle NULL parent tasks.
-rw-r--r--kern/task.c4
1 files changed, 3 insertions, 1 deletions
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);