mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #14165 from eval-exec/expected-process-stopsignal
pkg/expect: send SIGTERM to target expect process instead of SIGKILL for `Stop()`
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user