diff options
author | Kali Kaneko (leap communications) <kali@leap.se> | 2019-09-04 23:30:20 +0200 |
---|---|---|
committer | Kali Kaneko (leap communications) <kali@leap.se> | 2019-09-04 23:30:20 +0200 |
commit | 2fd367a08f158c3485cb6639be3a0769fb7a650c (patch) | |
tree | 94eda3ac383cb312389886a86119db94d3cbed97 | |
parent | 999cea13c1fce89350914592263a2c941c340953 (diff) |
[feat] handle error during kill
-rw-r--r-- | pkg/helper/darwin.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/helper/darwin.go b/pkg/helper/darwin.go index a1e1f00..f291322 100644 --- a/pkg/helper/darwin.go +++ b/pkg/helper/darwin.go @@ -88,7 +88,12 @@ func getOpenvpnPath() string { } func kill(cmd *exec.Cmd) error { - return cmd.Process.Signal(os.Interrupt) + log.Printf("Sending kill signal to pid: %v", cmd.Process.Pid) + err := cmd.Process.Signal(os.Interrupt) + if err != nil { + return err + } + return nil } func firewallStart(gateways []string) error { |