From ccfa9e4be3b7591dafc8d25ece626f014f00fafb Mon Sep 17 00:00:00 2001 From: mountain Date: Tue, 5 Dec 2023 18:54:42 +0900 Subject: [PATCH] =?UTF-8?q?houston=20=EC=A2=85=EB=A3=8C=EC=8B=9C=20kill=20?= =?UTF-8?q?signal=20=EB=B3=B4=EB=83=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client.go | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/client/client.go b/client/client.go index 57783bf..af2feb7 100644 --- a/client/client.go +++ b/client/client.go @@ -447,7 +447,18 @@ func NewClient(standalone bool) (HoustonClient, error) { } }() - hc.shutdownFunc = cancel + hc.shutdownFunc = func() { + // child process 강제 종료 + for _, procmeta := range hc.childProcs { + if procmeta.cmd != nil && procmeta.cmd.Process != nil { + procmeta.cmd.Process.Signal(os.Kill) + procmeta.cmd.Process.Wait() + procmeta.cmd.Process.Release() + } + } + cancel() + } + hc.exitChan = exitChan hc.ctx = ctx hc.operationChan = operationChan