1
0
mirror of https://github.com/containers/youki synced 2025-04-30 13:20:17 +02:00

fix: wait on the create_process

ref #3085

Signed-off-by: Yashodhan Joshi <yjdoc2@gmail.com>
This commit is contained in:
Yashodhan Joshi 2025-04-01 17:37:33 +05:30
parent 45a116e8b1
commit 5df2b70c0b

@ -222,7 +222,12 @@ pub fn test_inside_container(
.wait_with_output()
{
Ok(c) => c,
Err(e) => return TestResult::Failed(anyhow!("container start failed : {:?}", e)),
Err(e) => {
// given that start has failed, we can be pretty sure that create has either failed
// or completed already, so we wait on it so it does not become a zombie process
let _ = create_process.wait_with_output();
return TestResult::Failed(anyhow!("container start failed : {:?}", e));
}
};
let create_output = create_process