Improve process module doc a bit

This commit is contained in:
Guillaume Gomez 2016-09-30 00:10:42 +02:00
parent 289f3a4ca7
commit 3176ba42e2

View File

@ -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")]