From 7a91d0ca0bfc4706e700596262a5bf4b7002659d Mon Sep 17 00:00:00 2001 From: Julian Daube Date: Sun, 7 Feb 2021 00:17:28 +0100 Subject: [PATCH] interrupt process on windows as well On Windows, the killing of running services relies on the 60 second kill timeout, making it faster to restart the harness to force rebuilding. Since os.Interrupt works for me, remove the runtime os check in harness/app.go completely. --- harness/app.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/harness/app.go b/harness/app.go index 3536dc9..ac6520c 100644 --- a/harness/app.go +++ b/harness/app.go @@ -11,7 +11,6 @@ import ( "io" "os" "os/exec" - "runtime" "sync" "time" @@ -133,11 +132,8 @@ func (cmd AppCmd) Kill() { // Send an interrupt signal to allow for a graceful shutdown utils.Logger.Info("Killing revel server pid", "pid", cmd.Process.Pid) - var err error - if runtime.GOOS != "windows" { - // os.Interrupt is not available on windows - err = cmd.Process.Signal(os.Interrupt) - } + + err := cmd.Process.Signal(os.Interrupt) if err != nil { utils.Logger.Info(