don't use syscall directly
This commit is contained in:
parent
6fa420a8e0
commit
65de188423
|
@ -8,7 +8,6 @@ import (
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
"syscall"
|
|
||||||
|
|
||||||
"github.com/facebookgo/pidfile"
|
"github.com/facebookgo/pidfile"
|
||||||
"github.com/jedisct1/dlog"
|
"github.com/jedisct1/dlog"
|
||||||
|
@ -141,7 +140,7 @@ func (app *App) appMain() {
|
||||||
|
|
||||||
func (app *App) signalWatch() {
|
func (app *App) signalWatch() {
|
||||||
quit := make(chan os.Signal, 1)
|
quit := make(chan os.Signal, 1)
|
||||||
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
|
signal.Notify(quit, os.Interrupt, os.Kill)
|
||||||
go func() {
|
go func() {
|
||||||
<-quit
|
<-quit
|
||||||
signal.Stop(quit)
|
signal.Stop(quit)
|
||||||
|
|
Loading…
Reference in New Issue