1
Fork 0

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

This commit is contained in:
Andreas Tolfsen 2018-03-28 23:05:51 +01:00
parent 7eb9a091f3
commit d541282d6c

View file

@ -1121,7 +1121,8 @@ impl ExitCode {
}
impl Child {
/// Forces the child process to exit. If the child has already exited, an error is returned.
/// Forces the child process to exit. If the child has already exited, an [`InvalidInput`]
/// error might be returned.
///
/// This is equivalent to sending a SIGKILL on Unix platforms.
///
@ -1139,6 +1140,8 @@ impl Child {
/// println!("yes command didn't start");
/// }
/// ```
///
/// [`InvalidInput`]: ../io/enum.ErrorKind.html#variant.InvalidInput
#[stable(feature = "process", since = "1.0.0")]
pub fn kill(&mut self) -> io::Result<()> {
self.handle.kill()