main_windows: Catch more exit events

This commit is contained in:
Jason A. Donenfeld 2019-02-07 04:42:35 +01:00
parent ea59177f1c
commit 52aa00f3ba

View File

@ -9,6 +9,7 @@ import (
"fmt"
"os"
"os/signal"
"syscall"
"git.zx2c4.com/wireguard-go/tun"
)
@ -71,6 +72,8 @@ func main() {
// wait for program to terminate
signal.Notify(term, os.Interrupt)
signal.Notify(term, os.Kill)
signal.Notify(term, syscall.SIGTERM)
select {
case <-term: