Skip to content

Commit

Permalink
nsqd/nsqlookupd: explicitly set exit signals
Browse files Browse the repository at this point in the history
  • Loading branch information
judwhite committed May 9, 2016
1 parent 45126e1 commit e97fb70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Godeps
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ github.com/mreiferson/go-snappystream 028eae7ab5c4c9e2d1cb4c4ca1e53259bbe7e504
github.com/bitly/timer_metrics afad1794bb13e2a094720aeb27c088aa64564895
github.com/blang/semver 9bf7bff48b0388cb75991e58c6df7d13e982f1f2
github.com/julienschmidt/httprouter 6aacfd5ab513e34f7e64ea9627ab9670371b34e7
github.com/judwhite/go-svc/svc e9adf7361d86e2c97fbfea0c7ca0a66b96671ec8
github.com/judwhite/go-svc/svc 63c12402f579f0bdf022653c821a1aa5d7544f01
3 changes: 2 additions & 1 deletion apps/nsqd/nsqd.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"path/filepath"
"strconv"
"strings"
"syscall"
"time"

"github.com/BurntSushi/toml"
Expand Down Expand Up @@ -177,7 +178,7 @@ type program struct {

func main() {
prg := &program{}
if err := svc.Run(prg); err != nil {
if err := svc.Run(prg, syscall.SIGINT, syscall.SIGTERM); err != nil {
log.Fatal(err)
}
}
Expand Down
3 changes: 2 additions & 1 deletion apps/nsqlookupd/nsqlookupd.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"log"
"os"
"path/filepath"
"syscall"
"time"

"github.com/BurntSushi/toml"
Expand Down Expand Up @@ -36,7 +37,7 @@ type program struct {

func main() {
prg := &program{}
if err := svc.Run(prg); err != nil {
if err := svc.Run(prg, syscall.SIGINT, syscall.SIGTERM); err != nil {
log.Fatal(err)
}
}
Expand Down

0 comments on commit e97fb70

Please sign in to comment.