mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Merge pull request #200 from julidau/develop
harness: interrupt process on windows as well
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"runtime"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@@ -133,11 +132,8 @@ func (cmd AppCmd) Kill() {
|
|||||||
|
|
||||||
// Send an interrupt signal to allow for a graceful shutdown
|
// Send an interrupt signal to allow for a graceful shutdown
|
||||||
utils.Logger.Info("Killing revel server pid", "pid", cmd.Process.Pid)
|
utils.Logger.Info("Killing revel server pid", "pid", cmd.Process.Pid)
|
||||||
var err error
|
|
||||||
if runtime.GOOS != "windows" {
|
err := cmd.Process.Signal(os.Interrupt)
|
||||||
// os.Interrupt is not available on windows
|
|
||||||
err = cmd.Process.Signal(os.Interrupt)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
utils.Logger.Info(
|
utils.Logger.Info(
|
||||||
|
|||||||
Reference in New Issue
Block a user