Crate shell_process
source ·Expand description
Some methods to help run command line processes.
Usage: let mut fs = ServiceFs::new(); let (svc_client_end, svc_server_end) = zx::Channel::create().expect(“create channel”); let svc_proxy = fidl_fuchsia_io::DirectoryProxy::from_channel( fuchsia_async::Channel::from_channel(svc_client_end).unwrap(), ); let env = fs.serve_connection(svc_server_end); … let output = shell_process::run_process( “someprocess”, [“–arg”, “foo”], [(“/svc”, &svc_proxy)], ); assert!(output.is_ok());
Structs
A struct to contain the results of a shell process.
Functions
Runs a binary with some arguments synchronously; returns a struct with exit
code, stdout, and stderr.
Runs a binary with some arguments asynchronously; returns a delayed exit
code and two sockets with stdout and stderr. For a simpler API, use
run_process().