From 87a287cac22969c6f6dc5519438961b8842d4fd5 Mon Sep 17 00:00:00 2001 From: sanghee Date: Fri, 4 Jan 2019 23:28:36 +0900 Subject: [PATCH] Remove comments and add error handling --- cmd/commands/run/watch.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/commands/run/watch.go b/cmd/commands/run/watch.go index 5e9783a..e852233 100644 --- a/cmd/commands/run/watch.go +++ b/cmd/commands/run/watch.go @@ -183,7 +183,6 @@ func Kill() { } }() if cmd != nil && cmd.Process != nil { - //err := cmd.Process.Kill() cmd.Process.Signal(os.Interrupt) ch := make(chan struct{}, 1) go func() { @@ -195,7 +194,10 @@ func Kill() { return case <-time.After(10 * time.Second): beeLogger.Log.Info("Timeout; Force kill cmd process") - cmd.Process.Kill() + err := cmd.Process.Kill() + if err != nil { + beeLogger.Log.Errorf("Error while killing cmd process: %s", err) + } return } }