Skip to content

Commit

Permalink
Merge pull request #29 from hashicorp/b-sigterm
Browse files Browse the repository at this point in the history
Change SIGINT to SIGTERM
  • Loading branch information
cbednarski committed Sep 10, 2015
2 parents 6fed1ba + ea988a0 commit 9b763ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client/driver/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import (
"strings"
"time"

"golang.org/x/sys/unix"

"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/nomad/structs"
)
Expand Down Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion client/driver/java.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
"strings"
"time"

"golang.org/x/sys/unix"

"github.com/hashicorp/nomad/client/config"
"github.com/hashicorp/nomad/nomad/structs"
)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9b763ed

Please sign in to comment.