From 2fd367a08f158c3485cb6639be3a0769fb7a650c Mon Sep 17 00:00:00 2001
From: "Kali Kaneko (leap communications)" <kali@leap.se>
Date: Wed, 4 Sep 2019 23:30:20 +0200
Subject: [PATCH] [feat] handle error during kill

---
 pkg/helper/darwin.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pkg/helper/darwin.go b/pkg/helper/darwin.go
index a1e1f00c..f2913224 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 {
-- 
GitLab