mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-17 22:34:25 +01:00
runtime-rs: force shutdown shim process in it can't exit
In some case the call of cleanup from shim to service manager will fail, and the shim process will continue to running, that will make process leak. This commit will force shutdown the shim process in case of any errors in service crate. Fixes: #5087 Signed-off-by: Bin Liu <bin@hyper.sh>
This commit is contained in:
@@ -155,7 +155,7 @@ impl ServiceManager {
|
||||
let handler = RuntimeHandlerManager::new(sid, sender)
|
||||
.await
|
||||
.context("new runtime handler")?;
|
||||
handler.cleanup().await?;
|
||||
handler.cleanup().await.context("runtime handler cleanup")?;
|
||||
let temp_dir = [KATA_PATH, sid].join("/");
|
||||
if std::fs::metadata(temp_dir.as_str()).is_ok() {
|
||||
// try to remove dir and skip the result
|
||||
|
||||
Reference in New Issue
Block a user