Back to Darwin Xnu

Bootstrap Environment

osfmk/man/bootstrap_environment.html

latest1.4 KB
Original Source

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.

Functions: bootstrap_ports, bootstrap_arguments.