pub enum LauncherRequest {
Launch {
info: LaunchInfo,
responder: LauncherLaunchResponder,
},
CreateWithoutStarting {
info: LaunchInfo,
responder: LauncherCreateWithoutStartingResponder,
},
AddArgs {
args: Vec<Vec<u8>>,
control_handle: LauncherControlHandle,
},
AddEnvirons {
environ: Vec<Vec<u8>>,
control_handle: LauncherControlHandle,
},
AddNames {
names: Vec<NameInfo>,
control_handle: LauncherControlHandle,
},
AddHandles {
handles: Vec<HandleInfo>,
control_handle: LauncherControlHandle,
},
SetOptions {
options: u32,
control_handle: LauncherControlHandle,
},
}
Expand description
A low-level interface for launching processes.
This interface is used for manually assembling a process. The caller supplies all the capabilities for the newly created process.
That create processes typically use fdio_spawn
or fdio_spawn_etc
rather
than using this interface directly. The fdio_spawn
and fdio_spawn_etc
functions are implemented using this interface.
Debuggers and other clients that need to create processes in a suspended
state often use this interface directly. These clients use the
CreateWithoutStarting
method to create the process without actually
starting it.
Variants§
Launch
Creates and starts the process described by info
.
After processing this message, the Launcher
is reset to its initial
state and is ready to launch another process.
process
is present if, and only if, status
is ZX_OK
.
CreateWithoutStarting
Creates the process described by info
but does not start it.
After processing this message, the Launcher
is reset to its initial
state and is ready to launch another process.
The caller is responsible for calling zx_process_start
using the data
in ProcessStartData
to actually start the process.
data
is present if, and only if, status
is ZX_OK
.
AddArgs
Adds the given arguments to the command-line for the process.
Calling this method multiple times concatenates the arguments.
AddEnvirons
Adds the given variables to the environment variables for the process.
Calling this method multiple times concatenates the variables.
AddNames
Adds the given names to the namespace for the process.
The paths in the namespace must be non-overlapping. See https://fuchsia.dev/fuchsia-src/concepts/process/namespaces for details.
Calling this method multiple times concatenates the names.
AddHandles
Adds the given handles to the startup handles for the process.
Calling this method multiple times concatenates the handles.
SetOptions
Sets the options with which the process is created.
Calling this method multiple times will overwrite the current options.
Implementations§
Source§impl LauncherRequest
impl LauncherRequest
pub fn into_launch(self) -> Option<(LaunchInfo, LauncherLaunchResponder)>
pub fn into_create_without_starting( self, ) -> Option<(LaunchInfo, LauncherCreateWithoutStartingResponder)>
pub fn into_add_args(self) -> Option<(Vec<Vec<u8>>, LauncherControlHandle)>
pub fn into_add_environs(self) -> Option<(Vec<Vec<u8>>, LauncherControlHandle)>
pub fn into_add_names(self) -> Option<(Vec<NameInfo>, LauncherControlHandle)>
pub fn into_add_handles( self, ) -> Option<(Vec<HandleInfo>, LauncherControlHandle)>
pub fn into_set_options(self) -> Option<(u32, LauncherControlHandle)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL