From d7c96da2739b504a814b37eb225e43c930b44d08 Mon Sep 17 00:00:00 2001
From: zhangmeng <775834166@qq.com>
Date: 星期一, 23 十二月 2019 13:48:28 +0800
Subject: [PATCH] udpate

---
 main.go |   17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/main.go b/main.go
index e62501b..947179d 100644
--- a/main.go
+++ b/main.go
@@ -3,7 +3,9 @@
 import (
 	"analysis/logo"
 	"analysis/util"
+	"os/signal"
 	"strconv"
+	"syscall"
 
 	"analysis/app/master"
 	"analysis/app/slave"
@@ -28,8 +30,6 @@
 	ruleIPC string
 
 	configPath string
-
-	showConsole bool
 )
 
 const (
@@ -48,8 +48,6 @@
 	flag.BoolVar(&shm, util.SHM, false, "use shm for performance")
 
 	flag.IntVar(&gpu, util.GPU, -1, "gpu index")
-
-	flag.BoolVar(&showConsole, "log-console", false, "log show console, only for debug")
 
 	// 鎸囧畾鑾峰彇閰嶇疆淇℃伅浠巗qlite,鏈夋渶楂樹紭鍏堢骇, master浣跨敤
 	flag.StringVar(&util.FSI.IP, util.FetchSrvIP, util.FSI.IP, "fetch server ip, like camera info")
@@ -70,9 +68,7 @@
 		logo.Config(file, 500, 3, 30)
 		logo.Infoln("START LOGGER FILE: ", file)
 	}
-	if showConsole {
-		logo.ShowConsole()
-	}
+	logo.ShowConsole()
 }
 
 func setParamters() {
@@ -127,10 +123,9 @@
 	}
 
 	if ret {
-		// c := make(chan os.Signal, 1)
-		// signal.Notify(c, os.Interrupt, os.Kill, unix.SIGTERM)
-		// <-c
-		select {}
+		c := make(chan os.Signal, 1)
+		signal.Notify(c, os.Interrupt, os.Kill, syscall.SIGTERM)
+		<-c
 	}
 
 	cancel()

--
Gitblit v1.8.0