Skip to content

Commit d541282

Browse files
committed
fixup! std: Child::kill() returns error if process has already exited
1 parent 7eb9a09 commit d541282

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libstd/process.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1121,7 +1121,8 @@ impl ExitCode {
11211121
}
11221122

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

0 commit comments

Comments
 (0)