From 4f33d5bcaf6f6d9d05357b0988aed3d0c8c46604 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Sun, 26 Jun 2022 16:20:17 +0800 Subject: [PATCH] [3.5]backport: pkg/expect: send SIGTERM to target expect process instead of SIGKILL Signed-off-by: Eval EXEC Signed-off-by: ArkaSaha30 --- pkg/expect/expect.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/expect/expect.go b/pkg/expect/expect.go index 95bc30823f2..dd4683d3958 100644 --- a/pkg/expect/expect.go +++ b/pkg/expect/expect.go @@ -42,7 +42,7 @@ type ExpectProcess struct { count int // increment whenever new line gets added err error - // StopSignal is the signal Stop sends to the process; defaults to SIGKILL. + // StopSignal is the signal Stop sends to the process; defaults to SIGTERM. StopSignal os.Signal } @@ -58,7 +58,7 @@ func NewExpectWithEnv(name string, args []string, env []string) (ep *ExpectProce cmd.Env = env ep = &ExpectProcess{ cmd: cmd, - StopSignal: syscall.SIGKILL, + StopSignal: syscall.SIGTERM, } ep.cmd.Stderr = ep.cmd.Stdout ep.cmd.Stdin = nil