Unify signal registration in a single syscall.

This commit is contained in:
Daker Fernandes Pinheiro 2016-06-02 01:34:37 -03:00
parent 8db00073b4
commit 48e4de823a

View File

@ -118,9 +118,7 @@ func listenToSystemSignels() {
signalChan := make(chan os.Signal, 1)
code := 0
signal.Notify(signalChan, os.Interrupt)
signal.Notify(signalChan, os.Kill)
signal.Notify(signalChan, syscall.SIGTERM)
signal.Notify(signalChan, os.Interrupt, os.Kill, syscall.SIGTERM)
select {
case sig := <-signalChan: