From 40c752c4e5e3c8c20cee345790954511e9f3825b Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Mon, 6 Mar 2017 00:18:21 +0100 Subject: proc: Receive new-task notifications on kernel's process port. * proc/main.c (main): Initialize 'kernel_proc' and use it to register for new-task notifications. * proc/mgt.c (S_mach_notify_new_task): Adapt receiver check. * proc/proc.h (kernel_proc): New variable. --- proc/mgt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'proc/mgt.c') diff --git a/proc/mgt.c b/proc/mgt.c index 8dc82f11..dc3a19ee 100644 --- a/proc/mgt.c +++ b/proc/mgt.c @@ -1055,7 +1055,9 @@ S_mach_notify_new_task (struct port_info *notify, { struct proc *parentp, *childp; - if (! notify || notify->class != generic_port_class) + if (! notify + || (kernel_proc == NULL && notify->class != generic_port_class) + || (kernel_proc != NULL && notify != (struct port_info *) kernel_proc)) return EOPNOTSUPP; parentp = task_find_nocreate (parent); -- cgit v1.2.3