From d14748b5888d697583b6dc9df2feed1f09f92a4c Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Tue, 11 Nov 2014 21:23:42 +0100 Subject: proc: implement `proc_make_task_namespace' * proc/proc.h (struct proc): Add field `p_task_namespace'. * proc/mgt.c (S_proc_child): Propagate `p_task_namespace' to child. (allocate_proc): Initialize `p_task_namespace'. (namespace_terminate): New function. (process_has_exited): Reparent children of dead tasks in the namespace to the root process. Terminate all tasks if the root process dies. Reap dead tasks. (S_mach_notify_new_task): For newly created tasks thats parent is in a namespace, call S_proc_child and forward the `mach_notify_new_task' message. (S_proc_make_task_namespace): New function. --- proc/proc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'proc/proc.h') diff --git a/proc/proc.h b/proc/proc.h index 61966971..a056d18c 100644 --- a/proc/proc.h +++ b/proc/proc.h @@ -58,6 +58,10 @@ struct proc /* Process group structure */ struct pgrp *p_pgrp; + /* Processes may live in a task namespace identified by the + notification port registered by proc_make_task_namespace. */ + mach_port_t p_task_namespace; /* send right */ + /* Communication */ mach_port_t p_msgport; /* send right */ -- cgit v1.2.3