We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 289f3a4 commit 3176ba4Copy full SHA for 3176ba4
src/libstd/process.rs
@@ -8,7 +8,25 @@
8
// option. This file may not be copied, modified, or distributed
9
// except according to those terms.
10
11
-//! Working with processes.
+//! A module for working with processes.
12
+//!
13
+//! # Examples
14
15
+//! Basic usage where we try to execute the `cat` shell command:
16
17
+//! ```should_panic
18
+//! use std::process::Command;
19
20
+//! let mut child = Command::new("/bin/cat")
21
+//! .arg("file.txt")
22
+//! .spawn()
23
+//! .expect("failed to execute child");
24
25
+//! let ecode = child.wait()
26
+//! .expect("failed to wait on child");
27
28
+//! assert!(ecode.success());
29
+//! ```
30
31
#![stable(feature = "process", since = "1.0.0")]
32
0 commit comments