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

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

diff --git a/main.go b/main.go
index 8702d5e..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"
@@ -114,17 +116,16 @@
 	ret := false
 	if role == roleMaster {
 		setParamters()
-		ret = master.Run(ctx, configPath)
+		ret = master.Run(ctx, configPath, "./libcomm.so")
 
 	} else if role == roleSlave {
 		ret = slave.Run(ctx, configPath, runType, id, gpu, shm)
 	}
 
 	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