<br />

Added: HEAD

## **PROTOCOLS**

## Launcher

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=123)*

### Launch

Launches a process providing it the namespace available to the developer
console.

Returns when the launched process exits, informing its return code.

#### Request

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.developer.console#LaunchOptions` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.developer.console#Launcher_Launch_Result` |

## **STRUCTS**

### Empty

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=29)*

\<EMPTY\>

### Launcher_Launch_Response

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=128)*

| Field | Type | Description | Default |
|---|---|---|---|
| `return_code` | `int64` |   | No default |

### PackageProgram [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=60)*

| Field | Type | Description | Default |
|---|---|---|---|
| `package` | `https://fuchsia.dev/reference/fuchsia.component.resolution//https://fuchsia.dev/reference/fuchsia.component.resolution#Package` | The resolved package where the launcher looks for the program. | No default |
| `path` | `string` | The path, relative to the package's directory, where the program to be launched is found. | No default |

### RawHandles [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=73)*

| Field | Type | Description | Default |
|---|---|---|---|
| `stdin` | `handle<handle>?` |   | No default |
| `stdout` | `handle<handle>?` |   | No default |
| `stderr` | `handle<handle>?` |   | No default |

## **ENUMS**

### LauncherError [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

Type: `uint32`

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=12)*

Standard errors for the Launcher protocol

<br />

| Name | Value | Description |
|---|---|---|
| ### INTERNAL | `1` | Launcher encountered an unspecified, unexpected error. |
| ### NOT_SUPPORTED | `2` | Received unknown interaction or configuration variant. |
| ### INVALID_NAMESPACE_PATH | `3` | An invalid path was provided for the namespace. |
| ### DUPLICATE_NAMESPACE_PATH | `4` | Duplicate namespace paths were provided for the namespace. |
| ### PROGRAM_LOAD_FAILED | `5` | Failed to load executable VMO from provided program information. |
| ### PROCESS_LAUNCH_FAILED | `6` | The process could be built, but launching it failed. |
| ### PTY_FAILED | `7` | Launcher failed to set up the PTY proxying mechanism. |

## **TABLES**

### LaunchOptions [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=32)*

Options given to [Launcher.Launch](https://fuchsia.dev/reference/fidl/fuchsia.developer.console#Launcher.Launch).

<br />

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `name` | `string:32` | The launched process name. Generated automatically if absent. |
| ### 2 | `args` | `vector<string>` | Additional arguments to pass to the launched process. The server computes argv0 automatically from `program`. Interpreted as empty vector if absent. |
| ### 3 | `program` | `https://fuchsia.dev/reference/fidl/fuchsia.developer.console#Program` | The program to run. Interpreted as `Program.default_shell` if absent. |
| ### 4 | `io_handles` | `https://fuchsia.dev/reference/fidl/fuchsia.developer.console#IoHandles` | The standard input/output handles given to the program. No standard IO handles are given if absent. |
| ### 7 | `env` | `vector<string>` | Environment variables to set for the launched process. Interpreted as empty vector if absent. |
| ### 8 | `namespace_entries` | `vector<https://fuchsia.dev/reference/fuchsia.process//https://fuchsia.dev/reference/fuchsia.process#NameInfo>` | Extra namespace entries to give to the launched process. Entries that collide with the default entries provided by the developer console override the defaults. All namespace entry paths *MUST* start with a `/`, `INVALID_NAMESPACE_PATH` is returned otherwise. Interpreted as empty vector if absent. |
| ### 9 | `stopper` | `handle<eventpair>` | An event pair that must be kept alive for the created process to be maintained. Optional. If provided, the container job for the launched process is destroyed when the peer handle for `stopper` is closed. |
| ### 10 | `directories_fixup` | `bool` | Enables fixing up the launch namespace for the conventional shell namespace. When using the /toolbox namespace for launching programs, it may be necessary to organize the directories given to toolbox so that they look like a "standardized" directory layout. This is a built-in feature that allows the server to provide this fix up which consists of walking `/directories` in the namespace and applying the following renaming rules: - `/directories/root-ssl-certificates` =\> `/config/ssl`. - `/directories/build-info` =\> `/config/build_info`. - `/directories/[any]` =\> `/[any]`. Interpreted as false if absent. |

## **UNIONS**

### IoHandles [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=71)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `raw_handles` | `https://fuchsia.dev/reference/fidl/fuchsia.developer.console#RawHandles` | Raw handles are provided to the program. |
| ### 2 | `pty_socket` | `handle<socket>` | A zircon socket is used as data source and the data is forwarded to the program via a PTY device. Both stderr and stdout end up in the same socket. |

<br />

### Launcher_Launch_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=128)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.developer.console#Launcher_Launch_Response` |   |
| ### 2 | `err` | `https://fuchsia.dev/reference/fidl/fuchsia.developer.console#LauncherError` |   |

<br />

### Program [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible) [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.developer.console/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.developer.console/launcher.fidl;l=46)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `default_shell` | `https://fuchsia.dev/reference/fidl/fuchsia.developer.console#Empty` | The default developer shell is launched. The default shell is controlled by product configuration. Thus, when selecting this program the server automatically fills: - environment PATH variable. - arguments for interactive vs not interactive sessions based on arguments given to `LaunchOptions`. |
| ### 2 | `from_package` | `https://fuchsia.dev/reference/fidl/fuchsia.developer.console#PackageProgram` | The provided program from some package is launched. When `from_package` is used the provided `package` is automatically added to the namespace under `/pkg`. |

<br />