main_windows: Catch more exit events
This commit is contained in:
parent
ea59177f1c
commit
52aa00f3ba
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue