Skip to content

Commit 8e13417

Browse files
authored
process: calling start_kill on exited child should not fail (tokio-rs#7160)
1 parent 605ef57 commit 8e13417

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tokio/src/process/mod.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1158,10 +1158,7 @@ impl Child {
11581158
pub fn start_kill(&mut self) -> io::Result<()> {
11591159
match &mut self.child {
11601160
FusedChild::Child(child) => child.kill(),
1161-
FusedChild::Done(_) => Err(io::Error::new(
1162-
io::ErrorKind::InvalidInput,
1163-
"invalid argument: can't kill an exited process",
1164-
)),
1161+
FusedChild::Done(_) => Ok(()),
11651162
}
11661163
}
11671164

0 commit comments

Comments
 (0)