[−][src]Function run_script::spawn
pub fn spawn(
script: &str,
args: &Vec<String>,
options: &ScriptOptions
) -> Result<Child, ScriptError>
Invokes the provided script content and returns a process handle.
Arguments
script
- The script contentargs
- The script command line argumentsoptions
- Options provided to the script runner
Example
extern crate run_script; use run_script::ScriptOptions; fn main() { let options = ScriptOptions::new(); let args = vec![]; let child = run_script::spawn( r#" echo "Directory Info:" dir "#, &args, &options ).unwrap(); }