1<h2>norma_task_clone</h2>
2<hr>
3<p>
4<strong>Function</strong> - Create a remote task that shares access to parent task's memory regardless of inheritance attributes.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t   norma_task_clone</strong>
8                <strong>(task_t</strong>                             <var>parent_task</var>,
9                 <strong>boolean_t</strong>                       <var>inherit_memory</var>,
10                 <strong>int</strong>                                 <var>child_node</var>,
11                 <strong>task_t</strong>                              <var>child_task</var><strong>);</strong>
12</pre>
13<h3>PARAMETERS</h3>
14<dl>
15<p>
16<dt> <var>parent_task</var> 
17<dd>
18[in task send right]
19The port for the task from which to draw the child 
20task's port rights, resource limits, and address space.
21<p>
22<dt> <var>inherit_memory</var> 
23<dd>
24[in scalar]
25Address space inheritance indicator.  If true, the child task
26inherits the address space of the parent task.  If false, the kernel assigns 
27the child task an empty address space.
28<p>
29<dt> <var>child_node</var> 
30<dd>
31[in scalar]
32The node index of the node on which to create the child.
33<p>
34<dt> <var>child_task</var> 
35<dd>
36[out task send right]
37The kernel-assigned port name for the new task.
38</dl>
39<h3>DESCRIPTION</h3>
40<p>
41The <strong>norma_task_clone</strong> function "clones" a new task from
42<var>parent_task</var> on the specified <var>node</var> and returns the name 
43of the new task in <var>child_task</var>.  The child 
44task acquires shared parts of the parent's 
45address space (see <strong>vm_inherit</strong>)
46regardless of the inheritance set for the parent's memory regions, although the
47inheritance for the child's regions will be set to that of the
48parent's regions.  The child 
49task initially contains no threads.
50<p>
51By way of comparison, tasks created by the standard <strong>task_create</strong>
52primitive are created on the same node as the parent.
53<p>
54Other than being created on a different node, the new task has the same
55properties as if created by <strong>task_create</strong>.
56<h3>NOTES</h3>
57<p>
58This call differs from <strong>norma_task_create</strong> in that the
59inheritance set for the
60parent's memory regions is ignored; the child always shares memory with the
61parent.
62<p>
63This call is intended to support process migration, where the inheritance
64semantics of <strong>norma_task_create</strong> would break migrated
65programs that depended upon 
66sharing relationships remaining after migration.
67<p>
68This call is not a true task migration call, in that it does
69not migrate the port 
70space, threads, and other non-address-space attributes of the task.
71<h3>RETURN VALUES</h3>
72<p>
73Only generic errors apply.
74<h3>RELATED INFORMATION</h3>
75<p>
76Functions:
77<a href="task_create.html"><strong>task_create</strong></a>,
78<a href="norma_task_create.html"><strong>norma_task_create</strong></a>.
79