zhangmeng
2019-12-23 ea5e8e0577d5c86c624e0f43bfc7f5874e8b719b
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()