Struct bitflags::__core::process::Command
[−]
[src]
pub struct Command { // some fields omitted }1.0.0
The Command
type acts as a process builder, providing fine-grained control
over how a new process should be spawned. A default configuration can be
generated using Command::new(program)
, where program
gives a path to the
program to be executed. Additional builder methods allow the configuration
to be changed (for example, by adding arguments) prior to spawning:
use std::process::Command; let output = Command::new("sh") .arg("-c") .arg("echo hello") .output() .unwrap_or_else(|e| { panic!("failed to execute process: {}", e) }); let hello = output.stdout;