This commit is contained in:
Alex Dadgar
2015-11-06 10:42:49 -08:00
parent 325de0ec35
commit e49f3383b6
3 changed files with 35 additions and 102 deletions

View File

@@ -7,6 +7,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
"github.com/hashicorp/nomad/client/allocdir"
@@ -131,6 +132,10 @@ func (e *BasicExecutor) Shutdown() error {
return fmt.Errorf("Failed to find user processes %v: %v", e.spawn.UserPid, err)
}
if runtime.GOOS == "windows" {
return proc.Kill()
}
return proc.Signal(os.Interrupt)
}