about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2016-12-03 15:46:28 -0800
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2016-12-03 15:46:28 -0800
commitf90986e3a8d21d979e871c1af304ccfbe2c81093 (patch)
treebdac92bee4af8ef712a4937381ab109af1af71f3
parent2cdbd5eb4255974db204819f9aa49c00b15a6d23 (diff)
downloadrust-f90986e3a8d21d979e871c1af304ccfbe2c81093.tar.gz
rust-f90986e3a8d21d979e871c1af304ccfbe2c81093.zip
Add examples for exit function
-rw-r--r--src/libstd/process.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index 9e1b57c7412..70453a74d2c 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -827,6 +827,14 @@ impl Child {
 /// will be run. If a clean shutdown is needed it is recommended to only call
 /// this function at a known point where there are no more destructors left
 /// to run.
+///
+/// # Examples
+///
+/// ```
+/// use std::process;
+///
+/// process::exit(0);
+/// ```
 #[stable(feature = "rust1", since = "1.0.0")]
 pub fn exit(code: i32) -> ! {
     ::sys_common::cleanup();