xref: /xnu-8019.80.24/osfmk/man/task_terminate.html (revision a325d9c4a84054e40bbe985afedcb50ab80993ea)
1<h2>task_terminate</h2>
2<hr>
3<p>
4<strong>Function</strong> - Terminate the target task and deallocate its resources.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t   task_terminate</strong>
8                <strong>(task_t</strong>            <var>task</var><strong>);</strong>
9</pre>
10<h3>PARAMETERS</h3>
11<dl>
12<p>
13<dt> <var>task</var>
14<dd>
15[in task send right]
16The port for the task to be destroyed.
17</dl>
18<h3>DESCRIPTION</h3>
19<p>
20The <strong>task_terminate</strong> function kills task and all its
21threads, if any.  The kernel
22frees all resources that are in use by the task.  The kernel
23destroys any port for
24which the task holds the receive right.
25<h3>RETURN VALUES</h3>
26<p>
27Only generic errors apply.
28<h3>RELATED INFORMATION</h3>
29<p>
30Functions:
31<a href="task_create.html"><strong>task_create</strong></a>,
32<a href="task_suspend.html"><strong>task_suspend</strong></a>,
33<a href="task_resume.html"><strong>task_resume</strong></a>,
34<a href="thread_terminate.html"><strong>thread_terminate</strong></a>,
35<a href="thread_suspend.html"><strong>thread_suspend</strong></a>.
36