diff --git a/refresh/runner.go b/refresh/runner.go index 29d35d5..eca7a44 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,10 @@ func (m *Manager) runner() { // kill the previous command pid := cmd.Process.Pid m.Logger.Success("Stopping: PID %d", pid) - cmd.Process.Kill() + if err := cmd.Process.Signal(syscall.SIGINT); err != nil { + // If SIGINT fails, default to force Kill + cmd.Process.Kill() + } } if m.Debug { bp := m.FullBuildPath()