Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve process module doc a bit #36841

Merged
merged 1 commit into from
Sep 30, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/libstd/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]

Expand Down