]> git.saurik.com Git - apple/xnu.git/blame - osfmk/man/bootstrap_environment.html
xnu-7195.101.1.tar.gz
[apple/xnu.git] / osfmk / man / bootstrap_environment.html
CommitLineData
13fec989
A
1<h2>bootstrap_environment</h2>
2<hr>
3<p>
4<strong>Function</strong> - Return to the bootstrap task an array of strings specifying the task's environment.
5<h3>SYNOPSIS</h3>
6<pre>
7<strong>kern_return_t bootstrap_environment</strong>
8 <strong>(mach_port_t</strong> <var>bootstrap</var>,
9 <strong>task_t</strong> <var>task</var>,
10 <strong>pointer_t</strong> <var>pointer_t</var>,
11 <strong>mach_msg_type_number_t</strong> <var>mach_msg_type_number_t</var><strong>);</strong>
12</pre>
13<h3>PARAMETERS</h3>
14<dl>
15<p>
16<dt> <var>bootstrap</var>
17<dd>
18[in bootstrap send right]
19The bootstrap port for the task, obtained from
20<strong>task_get_special_ports</strong>.
21<p>
22<dt> <var>task</var>
23<dd>
24[in task send right]
25The task port for the task whose argument strings are requested.
26<p>
27<dt> <var>environment</var>
28<dd>
29[pointer to dynamic out array of characters]
30The environment strings for the task. This is an array of
31\*V*_environmentCnt_\*O bytes, containing NUL characters
32separating the strings.
33<p>
34<dt> <var>environmentCnt</var>
35<dd>
36[out pointer to scalar]
37Number of bytes contained in <var>_environment_</var>.
38</dl>
39<h3>DESCRIPTION</h3>
40The kernel will respond to the bootstrap task (task 1) with the
41arguments and environment specified to the boot loader. The bootstrap
42task can act as a server on this interface for the tasks that it
43creates in order to pass an environment to them. The \*Llibsa_mach.a\*O
44standalone Mach C runtime startup code uses <strong>bootstrap_arguments</strong> and
45<strong>bootstrap_environment</strong> to initialize <var>argc</var>, <var>argv</var>,
46and <var>envp</var> for <strong>main</strong>.
47<h3>RETURN VALUES</h3>
48<p>
49Only generic errors apply.
50<h3>RELATED INFORMATION</h3>
51<p>
52Functions:
53<a href="bootstrap_ports.html"><strong>bootstrap_ports</strong></a>,
54<a href="bootstrap_arguments.html"><strong>bootstrap_arguments</strong></a>.
55
56