diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-09-30 00:10:42 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2016-09-30 00:10:42 +0200 |
| commit | 3176ba42e206bb9f17d292e1c9225479e8ea5d98 (patch) | |
| tree | 32d859761a094291846d1809e0b33393a783949c /src/libstd | |
| parent | 289f3a4ca79916d6445b452fc19a18a1e42a879a (diff) | |
| download | rust-3176ba42e206bb9f17d292e1c9225479e8ea5d98.tar.gz rust-3176ba42e206bb9f17d292e1c9225479e8ea5d98.zip | |
Improve process module doc a bit
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/process.rs | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index f0c44430700..674b0009537 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -8,7 +8,25 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! Working with processes. +//! A module for working with processes. +//! +//! # Examples +//! +//! Basic usage where we try to execute the `cat` shell command: +//! +//! ```should_panic +//! 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()); +//! ``` #![stable(feature = "process", since = "1.0.0")] |
