Skip to content

Commit

Permalink
[3.5]backport: pkg/expect: send SIGTERM to target expect process inst…
Browse files Browse the repository at this point in the history
…ead of SIGKILL

Signed-off-by: Eval EXEC <[email protected]>
Signed-off-by: ArkaSaha30 <[email protected]>
  • Loading branch information
eval-exec authored and ArkaSaha30 committed May 23, 2024
1 parent 3afe949 commit 4f33d5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/expect/expect.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
Expand Down

0 comments on commit 4f33d5b

Please sign in to comment.