From 51dc6304e71b95ad26f697db56c0bc2e6df5dd47 Mon Sep 17 00:00:00 2001 From: Andreas Tolfsen Date: Thu, 29 Mar 2018 18:10:40 +0100 Subject: [PATCH] fixup! std: Child::kill() returns error if process has already exited --- src/libstd/process.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libstd/process.rs b/src/libstd/process.rs index 4d4a48bd2da8..c3d681a89626 100644 --- a/src/libstd/process.rs +++ b/src/libstd/process.rs @@ -1122,7 +1122,10 @@ impl ExitCode { impl Child { /// Forces the child process to exit. If the child has already exited, an [`InvalidInput`] - /// error might be returned. + /// 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. /// @@ -1141,7 +1144,9 @@ impl Child { /// } /// ``` /// + /// [`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()