Skip to content

Commit

Permalink
fixup! std: Child::kill() returns error if process has already exited
Browse files Browse the repository at this point in the history
  • Loading branch information
andreastt committed Mar 28, 2018
1 parent 7eb9a09 commit d541282
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libstd/process.rs
Expand Up @@ -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.
///
Expand All @@ -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()
Expand Down

0 comments on commit d541282

Please sign in to comment.