From 7bf6c6754de0b288649f5fbb58af915b81c83aff Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Thu, 23 May 2019 12:29:55 +0800 Subject: [PATCH] cache: Call vm.Disconnect() when close vm After previous commit, found that kata-proxy is not quit when vmcache server is stopped by ctrl-c. The cause is current kata-proxy is setsid when it exec. It will not get the signal ctrl-c. Call vm.Disconnect() when close vm in cache factory to handle this issue. Fixes: #1726 Signed-off-by: Hui Zhu --- virtcontainers/factory/cache/cache.go | 1 + 1 file changed, 1 insertion(+) diff --git a/virtcontainers/factory/cache/cache.go b/virtcontainers/factory/cache/cache.go index 3f672eb8f8..a4f40402ad 100644 --- a/virtcontainers/factory/cache/cache.go +++ b/virtcontainers/factory/cache/cache.go @@ -63,6 +63,7 @@ func New(ctx context.Context, count uint, b base.FactoryBase) base.FactoryBase { case <-closed: c.removeFromVmm(vm) vm.Stop() + vm.Disconnect() c.wg.Done() return }