mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
[3.5]backport: pkg/expect: send SIGTERM to target expect process instead of SIGKILL
Signed-off-by: Eval EXEC <execvy@gmail.com> Signed-off-by: ArkaSaha30 <arkasaha30@gmail.com>
This commit is contained in:
parent
3afe949552
commit
4f33d5bcaf
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user