From d465a5661533121ed7dababbe34457f32653f8aa Mon Sep 17 00:00:00 2001 From: Rafi Shamim Date: Fri, 10 Mar 2023 10:53:45 -0500 Subject: [PATCH] testserver: use SIGTERM instead of SIGKILL during upgrade This makes it shutdown gracefully instead of abruptly. --- testserver/testservernode.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testserver/testservernode.go b/testserver/testservernode.go index fa80234..ba6fdeb 100644 --- a/testserver/testservernode.go +++ b/testserver/testservernode.go @@ -19,6 +19,7 @@ import ( "log" "os/exec" "strings" + "syscall" ) func (ts *testServerImpl) StopNode(nodeNum int) error { @@ -29,7 +30,7 @@ func (ts *testServerImpl) StopNode(nodeNum int) error { // Kill the process. if cmd.Process != nil { - if err := cmd.Process.Kill(); err != nil { + if err := cmd.Process.Signal(syscall.SIGTERM); err != nil { return err } if _, err := cmd.Process.Wait(); err != nil {