firecracker_sdk/vm/firercracker_process/
mod.rs

1use anyhow::Result;
2use tokio::process::Child;
3
4pub mod firecracker_startup;
5
6pub struct FirecrackerProcess {
7    process: Child,
8}
9
10impl FirecrackerProcess {
11    pub(crate) fn new(child: Child) -> Self {
12        Self { process: child }
13    }
14
15    pub async fn stop(&mut self) -> Result<()> {
16        self.process.kill().await?;
17        Ok(())
18    }
19}