diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-11-11 21:23:42 +0100 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2014-12-10 13:35:17 +0100 |
commit | d14748b5888d697583b6dc9df2feed1f09f92a4c (patch) | |
tree | cf84e1681f9c39bd0f94b5aac3529c32ed004417 /proc/proc.h | |
parent | 46b2c2b071f31893c9ce9548537e34747b2941d6 (diff) |
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.
Diffstat (limited to 'proc/proc.h')
-rw-r--r-- | proc/proc.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 */ |