Merge pull request #29 from hashicorp/b-sigterm
Change SIGINT to SIGTERM
This commit is contained in:
commit
00d8de4ecf
|
@ -9,6 +9,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/hashicorp/nomad/client/config"
|
||||
"github.com/hashicorp/nomad/nomad/structs"
|
||||
)
|
||||
|
@ -113,7 +115,7 @@ func (h *execHandle) Update(task *structs.Task) error {
|
|||
// Kill is used to terminate the task. We send an Interrupt
|
||||
// and then provide a 5 second grace period before doing a Kill.
|
||||
func (h *execHandle) Kill() error {
|
||||
h.proc.Signal(os.Interrupt)
|
||||
h.proc.Signal(unix.SIGTERM)
|
||||
select {
|
||||
case <-h.doneCh:
|
||||
return nil
|
||||
|
|
|
@ -14,6 +14,8 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
|
||||
"github.com/hashicorp/nomad/client/config"
|
||||
"github.com/hashicorp/nomad/nomad/structs"
|
||||
)
|
||||
|
@ -188,7 +190,7 @@ func (h *javaHandle) Update(task *structs.Task) error {
|
|||
// Kill is used to terminate the task. We send an Interrupt
|
||||
// and then provide a 5 second grace period before doing a Kill.
|
||||
func (h *javaHandle) Kill() error {
|
||||
h.proc.Signal(os.Interrupt)
|
||||
h.proc.Signal(unix.SIGTERM)
|
||||
select {
|
||||
case <-h.doneCh:
|
||||
return nil
|
||||
|
|
Loading…
Reference in a new issue