1 <h2>bootstrap_environment
</h2>
4 <strong>Function
</strong> - Return to the bootstrap task an array of strings specifying the task's environment.
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>
16 <dt> <var>bootstrap
</var>
18 [in bootstrap send right]
19 The bootstrap port for the task, obtained from
20 <strong>task_get_special_ports
</strong>.
25 The task port for the task whose argument strings are requested.
27 <dt> <var>environment
</var>
29 [pointer to dynamic out array of characters]
30 The environment strings for the task. This is an array of
31 \*V*_environmentCnt_\*O bytes, containing NUL characters
32 separating the strings.
34 <dt> <var>environmentCnt
</var>
36 [out pointer to scalar]
37 Number of bytes contained in
<var>_environment_
</var>.
40 The kernel will respond to the bootstrap task (task
1) with the
41 arguments and environment specified to the boot loader. The bootstrap
42 task can act as a server on this interface for the tasks that it
43 creates in order to pass an environment to them. The \*Llibsa_mach.a\*O
44 standalone Mach C runtime startup code uses
<strong>bootstrap_arguments
</strong> and
45 <strong>bootstrap_environment
</strong> to initialize
<var>argc
</var>,
<var>argv
</var>,
46 and
<var>envp
</var> for
<strong>main
</strong>.
47 <h3>RETURN VALUES
</h3>
49 Only generic errors apply.
50 <h3>RELATED INFORMATION
</h3>
53 <a href=
"bootstrap_ports.html"><strong>bootstrap_ports
</strong></a>,
54 <a href=
"bootstrap_arguments.html"><strong>bootstrap_arguments
</strong></a>.