Skip to content

Commit

Permalink
process: calling start_kill on exited child should not fail (#7160)
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancheg authored Feb 15, 2025
1 parent 605ef57 commit 8e13417
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tokio/src/process/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1158,10 +1158,7 @@ impl Child {
pub fn start_kill(&mut self) -> io::Result<()> {
match &mut self.child {
FusedChild::Child(child) => child.kill(),
FusedChild::Done(_) => Err(io::Error::new(
io::ErrorKind::InvalidInput,
"invalid argument: can't kill an exited process",
)),
FusedChild::Done(_) => Ok(()),
}
}

Expand Down

0 comments on commit 8e13417

Please sign in to comment.