1
0
mirror of https://github.com/DNSCrypt/dnscrypt-proxy.git synced 2024-12-27 00:12:31 +01:00

don't use syscall directly

This commit is contained in:
Vladimir Bauer 2019-10-31 16:07:22 +05:00 committed by Frank Denis
parent 6fa420a8e0
commit 65de188423

View File

@ -8,7 +8,6 @@ import (
"math/rand"
"os"
"os/signal"
"syscall"
"github.com/facebookgo/pidfile"
"github.com/jedisct1/dlog"
@ -141,7 +140,7 @@ func (app *App) appMain() {
func (app *App) signalWatch() {
quit := make(chan os.Signal, 1)
signal.Notify(quit, syscall.SIGINT, syscall.SIGTERM)
signal.Notify(quit, os.Interrupt, os.Kill)
go func() {
<-quit
signal.Stop(quit)