1
Fork 0

std: Child::kill() returns error if process has already exited

This patch makes it clear in std::process::Child::kill()'s API
documentation that an error is returned if the child process has
already cleanly exited.  This is implied by the example, but not
called out explicitly.
This commit is contained in:
Andreas Tolfsen 2018-03-28 18:54:34 +01:00
parent d87c19db6d
commit 7eb9a091f3

View file

@ -1121,8 +1121,9 @@ 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 error is returned.
///
/// This is equivalent to sending a SIGKILL on Unix platforms.
///
/// # Examples
///