From bb2edd1befc5489106e4efb97e093fc1eb03fe6b Mon Sep 17 00:00:00 2001 From: Elen Eisendle Date: Sat, 9 May 2020 12:38:23 +0200 Subject: [PATCH] Send SIGTERM to give the process a chance to clean up --- refresh/runner.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/refresh/runner.go b/refresh/runner.go index 2b6a0d8..1ab2ea8 100644 --- a/refresh/runner.go +++ b/refresh/runner.go @@ -7,6 +7,7 @@ import ( "os" "os/exec" "strings" + "syscall" ) func (m *Manager) runner() { @@ -17,7 +18,7 @@ func (m *Manager) runner() { // kill the previous command pid := cmd.Process.Pid m.Logger.Success("Stopping: PID %d", pid) - cmd.Process.Kill() + cmd.Process.Signal(syscall.SIGTERM) } if m.Debug { bp := m.FullBuildPath()