A module for working with processes.
Basic usage where we try to execute the cat
shell command:
use std::process::Command; let mut child = Command::new("/bin/cat") .arg("file.txt") .spawn() .expect("failed to execute child"); let ecode = child.wait() .expect("failed to wait on child"); assert!(ecode.success());
Child | Representation of a running or exited child process. |
ChildStderr | A handle to a child process's stderr. This struct is used in the |
ChildStdin | A handle to a child process's stdin. This struct is used in the |
ChildStdout | A handle to a child process's stdout. This struct is used in the |
Command | A process builder, providing fine-grained control over how a new process should be spawned. |
ExitStatus | Describes the result of a process after it has terminated. |
Output | The output of a finished process. |
Stdio | Describes what to do with a standard I/O stream for a child process. |
exit | Terminates the current process with the specified exit code. |
abort | [ Experimental ] Terminates the process in an abnormal fashion. |
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/process/index.html