blob: 12318f4d0c35fd25ad5bddb61d07bdcecd99018d [file] [log] [blame] [view]
<link rel="stylesheet" href="../style.css" />
[TOC]
# fuchsia.sys
<div class="fidl-version-div"><span class="fidl-attribute fidl-version">Added: 7</span></div>
## **PROTOCOLS**
## ComponentController {#ComponentController}
*Defined in [fuchsia.sys/component_controller.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/component_controller.fidl;l=39)*
<p>An interface for controlling components.</p>
<p>Closing this interface implicitly kills the controlled component unless
the <code>Detach</code> method has been called.</p>
<p>If the component exits, this interface will be closed.</p>
<p>Typically obtained via <code>Launcher.CreateComponent</code>.</p>
### Detach {#ComponentController.Detach}
<p>Decouples the lifetime of the component from this controller.</p>
<p>After calling <code>Detach</code>, the component will not be implicitly killed when
this interface is closed.</p>
#### Request {#ComponentController.Detach_Request}
&lt;EMPTY&gt;
### Kill {#ComponentController.Kill}
<p>Terminates the component.</p>
<p>This ComponentController connection is closed when the component has
terminated.</p>
#### Request {#ComponentController.Kill_Request}
&lt;EMPTY&gt;
### OnDirectoryReady {#ComponentController.OnDirectoryReady}
<p>Event that is triggered when the component's output directory is mounted.</p>
<p>This event will not be triggered for every component, only those that
serve a directory over their <code>PA_DIRECTORY_REQUEST</code> handle.</p>
#### Response {#ComponentController.OnDirectoryReady_Response}
&lt;EMPTY&gt;
### OnTerminated {#ComponentController.OnTerminated}
<p>Event that is triggered when the component is terminated.</p>
<p>This event provides the return code of the process and reason for
its termination. The return_code is only valid if the termination
reason is EXITED. If the termination reason is not EXITED, the
return code is guaranteed not to be 0.</p>
#### Response {#ComponentController.OnTerminated_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>return_code</code></td>
<td>
<code>int64</code>
</td>
</tr>
<tr>
<td><code>termination_reason</code></td>
<td>
<code><a class='link' href='#TerminationReason'>TerminationReason</a></code>
</td>
</tr>
</table>
## Environment {#Environment}
*Defined in [fuchsia.sys/environment.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/environment.fidl;l=33)*
<p>An interface for managing a set of applications.</p>
<p>Applications run inside environments, which provide ambient services and
support for their lifecycle.</p>
### CreateNestedEnvironment {#Environment.CreateNestedEnvironment}
<p>Creates a new environment nested inside this environment.</p>
<p>When applications are created inside the nested environment using the
environment's <code>Launcher</code>, the environment requests the
environment services from <code>host_directory</code> before passing those services to
the newly created application in its <code>StartupInfo</code>.</p>
<p>The <code>controller</code> can be used to control the lifecycle of the created
environment. Note that by default the environment will be killed
automatically when the <code>EnvironmentController</code>'s interface is closed. You
can use <code>EnvironmentController.Detach</code> to disable this behavior.</p>
<p><code>label</code> defines the new environment's label/name. It must be unique within
the parent environment (though not globally) and is used for isolating
separate environments. It can also be used for diagnostic purposes. The
label will be truncated if it is longer than <code>kLabelMaxLength</code>.</p>
<p><code>additional_services</code>, which may be empty, contains a list of services
that the environment provides, which are hosted by
<code>additional_services.host_directory</code>. If <code>options.inherit_parent_services</code>
is false, <code>host_directory</code> must provide a <code>Loader</code> service if it wishes to
allow new components to be loaded in the new environment.</p>
<p><code>options</code> provides additional options, see <code>EnvironmentOptions</code> for
details.</p>
#### Request {#Environment.CreateNestedEnvironment_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>environment</code></td>
<td>
<code>request&lt;<a class='link' href='#Environment'>Environment</a>&gt;</code>
</td>
</tr>
<tr>
<td><code>controller</code></td>
<td>
<code>request&lt;<a class='link' href='#EnvironmentController'>EnvironmentController</a>&gt;</code>
</td>
</tr>
<tr>
<td><code>label</code></td>
<td>
<code>string</code>
</td>
</tr>
<tr>
<td><code>additional_services</code></td>
<td>
<code><a class='link' href='#ServiceList'>ServiceList</a>?</code>
</td>
</tr>
<tr>
<td><code>options</code></td>
<td>
<code><a class='link' href='#EnvironmentOptions'>EnvironmentOptions</a></code>
</td>
</tr>
</table>
### GetDirectory {#Environment.GetDirectory}
<p>Gets a superset of services provided by this environment's
<code>host_directory</code>.</p>
#### Request {#Environment.GetDirectory_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>directory_request</code></td>
<td>
<code>handle&lt;channel&gt;</code>
</td>
</tr>
</table>
### GetLauncher {#Environment.GetLauncher}
<p>Gets the Launcher associated with this environment.</p>
<p>Applications created using this application launcher will be given the
environment services provided by this environment's <code>host_directory</code>.</p>
#### Request {#Environment.GetLauncher_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>launcher</code></td>
<td>
<code>request&lt;<a class='link' href='#Launcher'>Launcher</a>&gt;</code>
</td>
</tr>
</table>
### GetServices {#Environment.GetServices}
<p>Gets a superset of services provided by this environment's
<code>host_directory</code>.</p>
#### Request {#Environment.GetServices_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>services</code></td>
<td>
<code>request&lt;<a class='link' href='#ServiceProvider'>ServiceProvider</a>&gt;</code>
</td>
</tr>
</table>
## EnvironmentController {#EnvironmentController}
*Defined in [fuchsia.sys/environment_controller.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/environment_controller.fidl;l=14)*
<p>An interface for controlling an environment.</p>
<p>Closing this interface implicitly kills the controlled environment unless
the <code>Detach</code> method has been called.</p>
<p>If the environment is destroyed, this interface will be closed.</p>
<p>Typically obtained via <code>Environment.CreateNestedEnvironment</code>.</p>
### Detach {#EnvironmentController.Detach}
<p>Decouples the lifetime of the environment from this controller.</p>
<p>After calling <code>Detach</code>, the environment will not be implicitly killed when
this interface is closed.</p>
#### Request {#EnvironmentController.Detach_Request}
&lt;EMPTY&gt;
### Kill {#EnvironmentController.Kill}
<p>Terminates the environment.</p>
<p>When an <code>Environment</code> is terminated, all applications launched
in the environment (and in all transitively nested environments) are also
killed.</p>
#### Request {#EnvironmentController.Kill_Request}
&lt;EMPTY&gt;
#### Response {#EnvironmentController.Kill_Response}
&lt;EMPTY&gt;
### OnCreated {#EnvironmentController.OnCreated}
<p>Event that is triggered when the environment is created.</p>
#### Response {#EnvironmentController.OnCreated_Response}
&lt;EMPTY&gt;
## JobProvider {#JobProvider}
*Defined in [fuchsia.sys/job_provider.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/job_provider.fidl;l=12)*
<p>An interface for providing a job handle. Instances of this interface are
created in the context of an already-identified realm, so there is no need
to explicitly identify the realm below.</p>
### GetJob {#JobProvider.GetJob}
<p>Gets the root job associated with the realm.</p>
#### Request {#JobProvider.GetJob_Request}
&lt;EMPTY&gt;
#### Response {#JobProvider.GetJob_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>job</code></td>
<td>
<code>handle&lt;job&gt;</code>
</td>
</tr>
</table>
## Launcher {#Launcher}
*Defined in [fuchsia.sys/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/launcher.fidl;l=80)*
<p>An interface for creating component instances.</p>
<p>Typically obtained via <code>Environment.GetLauncher</code>.</p>
### CreateComponent {#Launcher.CreateComponent}
<p>Creates a new instance of the component described by <code>launch_info</code>.</p>
<p>The component instance is created in the <code>Environment</code>
associated with this <code>Launcher</code>. When creating the component,
the environment requests the environment services for this component from
its <code>EnvironmentHost</code>.</p>
<p>The <code>controller</code> can be used to control the lifecycle of the created
component instance. If an <code>ComponentController</code>'s interface is
requested, the component instance is killed when the interface is closed.</p>
#### Request {#Launcher.CreateComponent_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>launch_info</code></td>
<td>
<code><a class='link' href='#LaunchInfo'>LaunchInfo</a></code>
</td>
</tr>
<tr>
<td><code>controller</code></td>
<td>
<code>request&lt;<a class='link' href='#ComponentController'>ComponentController</a>&gt;?</code>
</td>
</tr>
</table>
## Loader {#Loader}
*Defined in [fuchsia.sys/loader.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/loader.fidl;l=8)*
<p>An interface for loading from packages.</p>
### LoadUrl {#Loader.LoadUrl}
<p>Load a package by url. The returned <code>package</code>'s <code>data</code> VMO handle will
not have <code>ZX_RIGHT_EXECUTE</code>, but the <code>directory</code> field, if present, will
have both the <code>READABLE</code> and <code>EXECUTABLE</code> rights.</p>
#### Request {#Loader.LoadUrl_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>url</code></td>
<td>
<code><a class='link' href='#component_url'>component_url</a></code>
</td>
</tr>
</table>
#### Response {#Loader.LoadUrl_Response}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>package</code></td>
<td>
<code><a class='link' href='#Package'>Package</a>?</code>
</td>
</tr>
</table>
## Runner {#Runner}
*Defined in [fuchsia.sys/runner.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/runner.fidl;l=64)*
<p>An interface for running components.</p>
<p>Typically exposed by components that provide execution environments for
particular classes of programs. For example, the Dart virtual machine
exposes this interface to run Dart programs.</p>
### StartComponent {#Runner.StartComponent}
<p>Execute the given component.</p>
<p>Upon startup, the component is to be given the information in
<code>startup_info</code>, but the mechanism by which the component receives that
information is up to the component runner.</p>
<p>The <code>controller</code> interface request typically originates from the
<code>Launcher.CreateComponent</code> message that caused this component to be
started.</p>
#### Request {#Runner.StartComponent_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>package</code></td>
<td>
<code><a class='link' href='#Package'>Package</a></code>
</td>
</tr>
<tr>
<td><code>startup_info</code></td>
<td>
<code><a class='link' href='#StartupInfo'>StartupInfo</a></code>
</td>
</tr>
<tr>
<td><code>controller</code></td>
<td>
<code>request&lt;<a class='link' href='#ComponentController'>ComponentController</a>&gt;?</code>
</td>
</tr>
</table>
## ServiceProvider {#ServiceProvider}
*Defined in [fuchsia.sys/service_provider.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/service_provider.fidl;l=16)*
<p>An interface through which a client may request services from a host.
Instances of this interface are created within the context of an
already-identified client and host pair, so there is no need to explicitly
identify the client or host in the methods below.</p>
<p>This interface is deprecated. Services should be published as directory
entries instead, just like files.</p>
### ConnectToService {#ServiceProvider.ConnectToService}
<p>Asks the host to provide the service identified by <code>service_name</code> through
the <code>channel</code> endpoint supplied by the caller. If the host is not willing
or able to provide the requested service, it should close the <code>channel</code>.</p>
#### Request {#ServiceProvider.ConnectToService_Request}
<table>
<tr><th>Name</th><th>Type</th></tr>
<tr>
<td><code>service_name</code></td>
<td>
<code>string</code>
</td>
</tr>
<tr>
<td><code>channel</code></td>
<td>
<code>handle&lt;channel&gt;</code>
</td>
</tr>
</table>
## **STRUCTS**
### EnvironmentOptions {#EnvironmentOptions data-text="EnvironmentOptions"}
*Defined in [fuchsia.sys/environment.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/environment.fidl;l=11)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="EnvironmentOptions.inherit_parent_services">
<td><code>inherit_parent_services</code></td>
<td>
<code>bool</code>
</td>
<td><p>True if this environment should inherit services provided by the
parent environment.</p>
</td>
<td>No default</td>
</tr>
<tr id="EnvironmentOptions.use_parent_runners">
<td><code>use_parent_runners</code></td>
<td>
<code>bool</code>
</td>
<td><p>True if components in this environment will share a runner provided
by the parent environment. If false, a new runner will be started
in this environment for components.</p>
</td>
<td>No default</td>
</tr>
<tr id="EnvironmentOptions.kill_on_oom">
<td><code>kill_on_oom</code></td>
<td>
<code>bool</code>
</td>
<td><p>True if this environment should be killed first in out of memory
situations by setting the <code>ZX_PROP_JOB_KILL_ON_OOM</code> property on this
environment's job.</p>
</td>
<td>No default</td>
</tr>
<tr id="EnvironmentOptions.delete_storage_on_death">
<td><code>delete_storage_on_death</code></td>
<td>
<code>bool</code>
</td>
<td><p>True if &quot;persistent&quot; storage requested by components in this environment should not actually
be persistent, and instead be deleted when this environment is killed.</p>
</td>
<td>No default</td>
</tr>
</table>
### FileDescriptor [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#FileDescriptor data-text="FileDescriptor"}
*Defined in [fuchsia.sys/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/launcher.fidl;l=10)*
<p>An FDIO file descriptor.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="FileDescriptor.type0">
<td><code>type0</code></td>
<td>
<code>int32</code>
</td>
<td><p>The FDIO types of the handle (e.g., <code>FA_FDIO_REMOTE</code>).</p>
</td>
<td>No default</td>
</tr>
<tr id="FileDescriptor.type1">
<td><code>type1</code></td>
<td>
<code>int32</code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="FileDescriptor.type2">
<td><code>type2</code></td>
<td>
<code>int32</code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="FileDescriptor.handle0">
<td><code>handle0</code></td>
<td>
<code>handle&lt;handle&gt;?</code>
</td>
<td><p>The handles for the file descriptor (e.g., a channel).</p>
</td>
<td>No default</td>
</tr>
<tr id="FileDescriptor.handle1">
<td><code>handle1</code></td>
<td>
<code>handle&lt;handle&gt;?</code>
</td>
<td></td>
<td>No default</td>
</tr>
<tr id="FileDescriptor.handle2">
<td><code>handle2</code></td>
<td>
<code>handle&lt;handle&gt;?</code>
</td>
<td></td>
<td>No default</td>
</tr>
</table>
### FlatNamespace [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#FlatNamespace data-text="FlatNamespace"}
*Defined in [fuchsia.sys/flat_namespace.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/flat_namespace.fidl;l=8)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="FlatNamespace.paths">
<td><code>paths</code></td>
<td>
<code>vector&lt;string&gt;</code>
</td>
<td><p>The mount point for each of the directories below.</p>
<p>For example, [&quot;/pkg&quot;, &quot;/svc&quot;].</p>
</td>
<td>No default</td>
</tr>
<tr id="FlatNamespace.directories">
<td><code>directories</code></td>
<td>
<code>vector&lt;channel&gt;</code>
</td>
<td><p>The directories mounted at each path in the namespace.</p>
</td>
<td>No default</td>
</tr>
</table>
### LaunchInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#LaunchInfo data-text="LaunchInfo"}
*Defined in [fuchsia.sys/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/launcher.fidl;l=24)*
<p>Information used to create an instance of a component and obtain
services from it.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="LaunchInfo.url">
<td><code>url</code></td>
<td>
<code><a class='link' href='#component_url'>component_url</a></code>
</td>
<td><p>The location from which to retrieve this component.</p>
<p>This field will probably be replaced with a stronger notion of identity,
such as an unforgeable token. This field is included in this iteration to
ease the transition from the previous component interfaces.</p>
</td>
<td>No default</td>
</tr>
<tr id="LaunchInfo.arguments">
<td><code>arguments</code></td>
<td>
<code>vector&lt;string&gt;?</code>
</td>
<td><p>The arguments to be provided to the component.</p>
</td>
<td>No default</td>
</tr>
<tr id="LaunchInfo.out">
<td><code>out</code></td>
<td>
<code><a class='link' href='#FileDescriptor'>FileDescriptor</a>?</code>
</td>
<td><p>The file descriptor to use for stdout.</p>
<p>If null, the component will use the default stdout for the environment.</p>
</td>
<td>No default</td>
</tr>
<tr id="LaunchInfo.err">
<td><code>err</code></td>
<td>
<code><a class='link' href='#FileDescriptor'>FileDescriptor</a>?</code>
</td>
<td><p>The file descriptor to use for stderr.</p>
<p>If null, the component will use the default stderr for the environment.</p>
</td>
<td>No default</td>
</tr>
<tr id="LaunchInfo.directory_request">
<td><code>directory_request</code></td>
<td>
<code>handle&lt;channel&gt;?</code>
</td>
<td><p>The interface request for a Directory that points at the &quot;svc/&quot; subdirectory
of the component's outgoing directory channel. The channel CANNOT be used
to connect to other directories (such as &quot;debug/&quot; or &quot;diagnostics/&quot;) the component
publishes in their outgoing directory.</p>
</td>
<td>No default</td>
</tr>
<tr id="LaunchInfo.flat_namespace">
<td><code>flat_namespace</code></td>
<td>
<code><a class='link' href='#FlatNamespace'>FlatNamespace</a>?</code>
</td>
<td><p>A custom namespace that can be appended to the namespace generated by
appmgr and provided to this component.
Adding a mount point at standard paths like 'pkg' or 'svc' will be ignored.
HACK(alhaad): Adding mount points for deprecated default directories like
'/data' will override the default.</p>
</td>
<td>No default</td>
</tr>
<tr id="LaunchInfo.additional_services">
<td><code>additional_services</code></td>
<td>
<code><a class='link' href='#ServiceList'>ServiceList</a>?</code>
</td>
<td><p>A list of services to be added to this component's svc namespace. These
services are in addition to those coming from Environment.</p>
</td>
<td>No default</td>
</tr>
</table>
### Package [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#Package data-text="Package"}
*Defined in [fuchsia.sys/runner.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/runner.fidl;l=42)*
<p>A binary representation of a component.</p>
<p>Typically provided to <code>Runner.StartComponent</code> when starting a component.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="Package.data">
<td><code>data</code></td>
<td>
<code><a class='link' href='../fuchsia.mem/'>fuchsia.mem</a>/<a class='link' href='../fuchsia.mem/#Buffer'>Buffer</a>?</code>
</td>
<td><p>A read-only binary representation of the component. For example, if the
component is intended to run in the Dart virtual machine, this data
might contain a dartx package.</p>
</td>
<td>No default</td>
</tr>
<tr id="Package.directory">
<td><code>directory</code></td>
<td>
<code>handle&lt;channel&gt;?</code>
</td>
<td><p>A directory containing the contents of the package. For example, if the
component is stored in pkgfs, this directory will be the pkgfs
directory containing the package.</p>
</td>
<td>No default</td>
</tr>
<tr id="Package.resolved_url">
<td><code>resolved_url</code></td>
<td>
<code><a class='link' href='#component_url'>component_url</a></code>
</td>
<td><p>Resolved URL of the component. This is the url specified in
<code>startup_info</code> after following redirects and resolving relative paths.</p>
</td>
<td>No default</td>
</tr>
</table>
### ProgramMetadata {#ProgramMetadata data-text="ProgramMetadata"}
*Defined in [fuchsia.sys/runner.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/runner.fidl;l=29)*
<p>Program information about a component.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="ProgramMetadata.key">
<td><code>key</code></td>
<td>
<code>string</code>
</td>
<td><p>Key for program metadata pair. E.g. &quot;binary&quot; for an ELF binary
component, or &quot;data&quot; for a flutter/dart component.</p>
</td>
<td>No default</td>
</tr>
<tr id="ProgramMetadata.value">
<td><code>value</code></td>
<td>
<code>string</code>
</td>
<td><p>Value for program metadata pair. E.g. &quot;bin/app&quot; for a &quot;binary&quot; key, or
&quot;data/foo&quot; for a flutter/dart component.</p>
</td>
<td>No default</td>
</tr>
</table>
### ServiceList [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#ServiceList data-text="ServiceList"}
*Defined in [fuchsia.sys/launcher.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/launcher.fidl;l=63)*
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="ServiceList.names">
<td><code>names</code></td>
<td>
<code>vector&lt;string&gt;</code>
</td>
<td><p>A list of services that can be requested from <code>provider</code>.</p>
</td>
<td>No default</td>
</tr>
<tr id="ServiceList.provider">
<td><code>provider</code></td>
<td>
<code><a class='link' href='#ServiceProvider'>ServiceProvider</a>?</code>
</td>
<td><p>A service provider to get the services listed in <code>names</code> from.</p>
</td>
<td>No default</td>
</tr>
<tr id="ServiceList.host_directory">
<td><code>host_directory</code></td>
<td>
<code>handle&lt;channel&gt;?</code>
</td>
<td><p>A channel to the directory hosting the services in <code>names</code>.</p>
</td>
<td>No default</td>
</tr>
</table>
### StartupInfo [resource](/fuchsia-src/reference/fidl/language/language.md#value-vs-resource){:.fidl-attribute} {#StartupInfo data-text="StartupInfo"}
*Defined in [fuchsia.sys/runner.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/runner.fidl;l=13)*
<p>Information given to components at startup.</p>
<p>For ELF binaries, this information is provided in the initialization
message given to <code>libc</code> by <code>fuchsia.process.Launcher</code>.</p>
<table>
<tr><th>Field</th><th>Type</th><th>Description</th><th>Default</th></tr>
<tr id="StartupInfo.launch_info">
<td><code>launch_info</code></td>
<td>
<code><a class='link' href='#LaunchInfo'>LaunchInfo</a></code>
</td>
<td><p>The launch info for the component to start.</p>
</td>
<td>No default</td>
</tr>
<tr id="StartupInfo.flat_namespace">
<td><code>flat_namespace</code></td>
<td>
<code><a class='link' href='#FlatNamespace'>FlatNamespace</a></code>
</td>
<td><p>The namespace in which to run the component.</p>
</td>
<td>No default</td>
</tr>
<tr id="StartupInfo.program_metadata">
<td><code>program_metadata</code></td>
<td>
<code>vector&lt;<a class='link' href='#ProgramMetadata'>ProgramMetadata</a>&gt;?</code>
</td>
<td><p>Key string value string map of the component's program metadata,
obtained from its component manifest.</p>
</td>
<td>No default</td>
</tr>
</table>
## **ENUMS**
### TerminationReason [strict](/fuchsia-src/reference/fidl/language/language.md#strict-vs-flexible){:.fidl-attribute} {#TerminationReason data-text="TerminationReason"}
Type: <code>uint32</code>
*Defined in [fuchsia.sys/component_controller.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/component_controller.fidl;l=6)*
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="TerminationReason.UNKNOWN">
<td><h3 id="TerminationReason.UNKNOWN" class="add-link hide-from-toc">UNKNOWN</h3></td>
<td><code>0</code></td>
<td><p>The channel closed without giving a termination reason.</p>
</td>
</tr>
<tr id="TerminationReason.EXITED">
<td><h3 id="TerminationReason.EXITED" class="add-link hide-from-toc">EXITED</h3></td>
<td><code>1</code></td>
<td><p>Component ran and exited with a given return_code.</p>
</td>
</tr>
<tr id="TerminationReason.URL_INVALID">
<td><h3 id="TerminationReason.URL_INVALID" class="add-link hide-from-toc">URL_INVALID</h3></td>
<td><code>2</code></td>
<td><p>The given URL given to launch was invalid.</p>
</td>
</tr>
<tr id="TerminationReason.PACKAGE_NOT_FOUND">
<td><h3 id="TerminationReason.PACKAGE_NOT_FOUND" class="add-link hide-from-toc">PACKAGE_NOT_FOUND</h3></td>
<td><code>3</code></td>
<td><p>The requested package could not be found.</p>
</td>
</tr>
<tr id="TerminationReason.INTERNAL_ERROR">
<td><h3 id="TerminationReason.INTERNAL_ERROR" class="add-link hide-from-toc">INTERNAL_ERROR</h3></td>
<td><code>4</code></td>
<td><p>An internal error happened during the launch process.</p>
</td>
</tr>
<tr id="TerminationReason.PROCESS_CREATION_ERROR">
<td><h3 id="TerminationReason.PROCESS_CREATION_ERROR" class="add-link hide-from-toc">PROCESS_CREATION_ERROR</h3></td>
<td><code>5</code></td>
<td><p>Process creation failed.</p>
</td>
</tr>
<tr id="TerminationReason.RUNNER_FAILED">
<td><h3 id="TerminationReason.RUNNER_FAILED" class="add-link hide-from-toc">RUNNER_FAILED</h3></td>
<td><code>6</code></td>
<td><p>A Runner failed to start.</p>
</td>
</tr>
<tr id="TerminationReason.RUNNER_TERMINATED">
<td><h3 id="TerminationReason.RUNNER_TERMINATED" class="add-link hide-from-toc">RUNNER_TERMINATED</h3></td>
<td><code>7</code></td>
<td><p>A Runner terminated while attempting to run a component.</p>
</td>
</tr>
<tr id="TerminationReason.UNSUPPORTED">
<td><h3 id="TerminationReason.UNSUPPORTED" class="add-link hide-from-toc">UNSUPPORTED</h3></td>
<td><code>8</code></td>
<td><p>Attempted to use an unsupported feature.</p>
</td>
</tr>
<tr id="TerminationReason.REALM_SHUTTING_DOWN">
<td><h3 id="TerminationReason.REALM_SHUTTING_DOWN" class="add-link hide-from-toc">REALM_SHUTTING_DOWN</h3></td>
<td><code>9</code></td>
<td><p>Attempted to create a component in a realm which is shutting down.</p>
</td>
</tr>
<tr id="TerminationReason.ACCESS_DENIED">
<td><h3 id="TerminationReason.ACCESS_DENIED" class="add-link hide-from-toc">ACCESS_DENIED</h3></td>
<td><code>10</code></td>
<td><p>Insufficient privilege to start the component.</p>
</td>
</tr>
</table>
## **CONSTANTS**
<table>
<tr><th>Name</th><th>Value</th><th>Type</th><th>Description</th></tr>
<tr id="MAX_URL_LENGTH">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/types.fidl;l=10">MAX_URL_LENGTH</a></td>
<td>
<code>2083</code>
</td>
<td><code>uint16</code></td>
<td></td>
</tr>
<tr id="kLabelMaxLength">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/environment.fidl;l=9">kLabelMaxLength</a></td>
<td>
<code>32</code>
</td>
<td><code>uint32</code></td>
<td><p>Maximum length for an environment label.</p>
</td>
</tr>
</table>
## **TYPE ALIASES**
<table>
<tr><th>Name</th><th>Value</th><th>Description</th></tr>
<tr id="component_url">
<td><a href="https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.sys/types.fidl;l=8">component_url</a></td>
<td>
<code>string</code>[<code><a class='link' href='#MAX_URL_LENGTH'>MAX_URL_LENGTH</a></code>]</td>
<td><p>A URL used to retrieve, launch, and load a component from a specified network
location, or to identify a component when connecting to it.</p>
</td>
</tr>
</table>