aboutsummaryrefslogtreecommitdiff
path: root/proc/mgt.c
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2017-03-06 00:18:21 +0100
committerJustus Winter <justus@gnupg.org>2017-03-09 23:55:41 +0100
commit40c752c4e5e3c8c20cee345790954511e9f3825b (patch)
treef0f36672a9a53ff1c45e7642ebd6460b89856b88 /proc/mgt.c
parent83457a27885a177908718839e8a4f356b649f72f (diff)
downloadhurd-40c752c4e5e3c8c20cee345790954511e9f3825b.tar.gz
hurd-40c752c4e5e3c8c20cee345790954511e9f3825b.tar.bz2
hurd-40c752c4e5e3c8c20cee345790954511e9f3825b.zip
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.
Diffstat (limited to 'proc/mgt.c')
-rw-r--r--proc/mgt.c4
1 files changed, 3 insertions, 1 deletions
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);