]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
main_windows: Catch more exit events
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 7 Feb 2019 03:42:35 +0000 (04:42 +0100)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 7 Feb 2019 03:42:35 +0000 (04:42 +0100)
main_windows.go

index d3cd82bd8c0d298a8ca12381464da0eaf2bc5080..88e6264ca5c38325edfdd5fcb1aa1211787090d6 100644 (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: