bootstrap_environment


Function - Return to the bootstrap task an array of strings specifying the task's environment.

SYNOPSIS

kern_return_t   bootstrap_environment
                (mach_port_t                          bootstrap,
                 task_t                                    task,
                 pointer_t                            pointer_t,
                 mach_msg_type_number_t  mach_msg_type_number_t);

PARAMETERS

bootstrap
[in bootstrap send right] The bootstrap port for the task, obtained from task_get_special_ports.

task
[in task send right] The task port for the task whose argument strings are requested.

environment
[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.

environmentCnt
[out pointer to scalar] Number of bytes contained in _environment_.

DESCRIPTION

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 bootstrap_arguments and bootstrap_environment to initialize argc, argv, and envp for main.

RETURN VALUES

Only generic errors apply.

RELATED INFORMATION

Functions: bootstrap_ports, bootstrap_arguments.