From 25a5b92e9462e20f2948b0972a1a9f2890160e55 Mon Sep 17 00:00:00 2001 From: caiyixiang Date: Thu, 13 Apr 2017 16:38:07 +0800 Subject: [PATCH] add a judgment --- core/pkg/ingress/controller/launch.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/pkg/ingress/controller/launch.go b/core/pkg/ingress/controller/launch.go index f76366b83..6c5f0776d 100644 --- a/core/pkg/ingress/controller/launch.go +++ b/core/pkg/ingress/controller/launch.go @@ -183,7 +183,10 @@ func registerHandlers(enableProfiling bool, port int, ic *GenericController) { }) mux.HandleFunc("/stop", func(w http.ResponseWriter, r *http.Request) { - syscall.Kill(syscall.Getpid(), syscall.SIGTERM) + err := syscall.Kill(syscall.Getpid(), syscall.SIGTERM) + if err != nil { + glog.Errorf("unexpected error: %v", err) + } }) if enableProfiling {