about summary refs log tree commit diff
path: root/src/libstd/process.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-04-24 05:43:32 +0000
committerbors <bors@rust-lang.org>2018-04-24 05:43:32 +0000
commit52ed3d8761dc42e51429eb3bbf56a94d14fdd5c6 (patch)
treefe2dca988e2194b65e4103ff6012bdce4ab3433e /src/libstd/process.rs
parentf305b025cf907d0bbdd2135ec59d89cd32e5cbe9 (diff)
parent893774e119b3197e12c1891b39d0e1e2830a362d (diff)
downloadrust-52ed3d8761dc42e51429eb3bbf56a94d14fdd5c6.tar.gz
rust-52ed3d8761dc42e51429eb3bbf56a94d14fdd5c6.zip
Auto merge of #50191 - kennytm:rollup, r=kennytm
Rollup of 11 pull requests

Successful merges:

 - #49461 (std: Child::kill() returns error if process has already exited)
 - #49727 (Add Cell::update)
 - #49812 (Fix revision support for UI tests.)
 - #49829 (Add doc links to `std::os` extension traits)
 - #49906 (Stabilize `std::hint::unreachable_unchecked`.)
 - #49970 (Deprecate Read::chars and char::decode_utf8)
 - #49985 (don't see issue #0)
 - #50118 (fix search bar bug)
 - #50139 (encourage descriptive issue titles)
 - #50174 (Use FxHashMap in syntax_pos::symbol::Interner::intern.)
 - #50185 (core: Fix overflow in `int::mod_euc` when `self < 0 && rhs == MIN`)

Failed merges:
Diffstat (limited to 'src/libstd/process.rs')
-rw-r--r--src/libstd/process.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/libstd/process.rs b/src/libstd/process.rs
index 92f0406c09b..00051d4487a 100644
--- a/src/libstd/process.rs
+++ b/src/libstd/process.rs
@@ -1121,8 +1121,13 @@ impl ExitCode {
 }
 
 impl Child {
-    /// Forces the child to exit. This is equivalent to sending a
-    /// SIGKILL on unix platforms.
+    /// Forces the child process to exit. If the child has already exited, an [`InvalidInput`]
+    /// error is returned.
+    ///
+    /// The mapping to [`ErrorKind`]s is not part of the compatibility contract of the function,
+    /// especially the [`Other`] kind might change to more specific kinds in the future.
+    ///
+    /// This is equivalent to sending a SIGKILL on Unix platforms.
     ///
     /// # Examples
     ///
@@ -1138,6 +1143,10 @@ impl Child {
     ///     println!("yes command didn't start");
     /// }
     /// ```
+    ///
+    /// [`ErrorKind`]: ../io/enum.ErrorKind.html
+    /// [`InvalidInput`]: ../io/enum.ErrorKind.html#variant.InvalidInput
+    /// [`Other`]: ../io/enum.ErrorKind.html#variant.Other
     #[stable(feature = "process", since = "1.0.0")]
     pub fn kill(&mut self) -> io::Result<()> {
         self.handle.kill()