Skip to content

Commit 7eb9a09

Browse files
committed
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.
1 parent d87c19d commit 7eb9a09

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libstd/process.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,9 @@ impl ExitCode {
11211121
}
11221122

11231123
impl Child {
1124-
/// Forces the child to exit. This is equivalent to sending a
1125-
/// SIGKILL on unix platforms.
1124+
/// Forces the child process to exit. If the child has already exited, an error is returned.
1125+
///
1126+
/// This is equivalent to sending a SIGKILL on Unix platforms.
11261127
///
11271128
/// # Examples
11281129
///

0 commit comments

Comments
 (0)