diff options
| author | bors <bors@rust-lang.org> | 2016-12-19 12:17:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2016-12-19 12:17:24 +0000 |
| commit | 10271ea24fbd7b28a42df8eb02a8dcf6d6132d71 (patch) | |
| tree | 4e6317a08c4c8cf2b0cbef21dd235222ccce77c1 /src/libstd/process.rs | |
| parent | e70415bd716cdbfaa7d7e849cb1d3b09254a7dcb (diff) | |
| parent | 05be48b18b896c16b36cf3f68c14c87b79081f94 (diff) | |
| download | rust-10271ea24fbd7b28a42df8eb02a8dcf6d6132d71.tar.gz rust-10271ea24fbd7b28a42df8eb02a8dcf6d6132d71.zip | |
Auto merge of #38466 - sanxiyn:rollup, r=sanxiyn
Rollup of 9 pull requests - Successful merges: #38334, #38397, #38413, #38421, #38422, #38433, #38438, #38445, #38459 - Failed merges:
Diffstat (limited to 'src/libstd/process.rs')
| -rw-r--r-- | src/libstd/process.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 858537dd2de..2dcb8c2f152 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -828,6 +828,12 @@ impl Child { /// this function at a known point where there are no more destructors left /// to run. /// +/// ## Platform-specific behavior +/// +/// **Unix**: On Unix-like platforms, it is unlikely that all 32 bits of `exit` +/// will be visible to a parent process inspecting the exit code. On most +/// Unix-like platforms, only the eight least-significant bits are considered. +/// /// # Examples /// /// ``` @@ -835,6 +841,17 @@ impl Child { /// /// process::exit(0); /// ``` +/// +/// Due to [platform-specific behavior], the exit code for this example will be +/// `0` on Linux, but `256` on Windows: +/// +/// ```no_run +/// use std::process; +/// +/// process::exit(0x0f00); +/// ``` +/// +/// [platform-specific behavior]: #platform-specific-behavior #[stable(feature = "rust1", since = "1.0.0")] pub fn exit(code: i32) -> ! { ::sys_common::cleanup(); |
