bootstrap_environment.html   [plain text]

<strong>Function</strong> - Return to the bootstrap task an array of strings specifying the task's environment.
<strong>kern_return_t   bootstrap_environment</strong>
                <strong>(mach_port_t</strong>                          <var>bootstrap</var>,
                 <strong>task_t</strong>                                    <var>task</var>,
                 <strong>pointer_t</strong>                            <var>pointer_t</var>,
                 <strong>mach_msg_type_number_t</strong>  <var>mach_msg_type_number_t</var><strong>);</strong>
<dt> <var>bootstrap</var> 
[in bootstrap send right]
The bootstrap port for the task, obtained from 
<dt> <var>task</var> 
[in task send right]
The task port for the task whose argument strings are requested.
<dt> <var>environment</var> 
[pointer to dynamic out array of characters]
The environment strings for the task. This is an array of 
\*V*_environmentCnt_\*O bytes, containing NUL characters
separating the strings.
<dt> <var>environmentCnt</var> 
[out pointer to scalar]
Number of bytes contained in <var>_environment_</var>.
The kernel will respond to the bootstrap task (task 1) with the
arguments and environment specified to the boot loader. The bootstrap
task can act as a server on this interface for the tasks that it
creates in order to pass an environment to them. The \*Llibsa_mach.a\*O
standalone Mach C runtime startup code uses <strong>bootstrap_arguments</strong> and
<strong>bootstrap_environment</strong> to initialize <var>argc</var>, <var>argv</var>, 
and <var>envp</var> for <strong>main</strong>.
Only generic errors apply.
<a href="bootstrap_ports.html"><strong>bootstrap_ports</strong></a>,
<a href="bootstrap_arguments.html"><strong>bootstrap_arguments</strong></a>.