process: calling start_kill on exited child should not fail (#7160)

This commit is contained in:
Stepan Koltsov
2025-02-15 13:48:22 +03:30
committed by GitHub
parent 605ef578df
commit 8e134172dd
+1 -4
View File
@@ -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(()),
}
}