zhangmeng
2020-01-21 93d62ff96dafca109b426e397396ad3a46cf295d
app/master/daemon.go
@@ -237,11 +237,11 @@
                  removes := difference(w.info.Channels, proc.Channels)
                  if len(removes) > 0 {
                     // 通知子进程关闭通道
                     notice = Notice{
                     n := Notice{
                        Op:      opRemove,
                        Content: removes,
                     }
                     if d, err := json.Marshal(notice); err == nil {
                     if d, err := json.Marshal(n); err == nil {
                        w.trans.chNotify <- d
                     }
                  }
@@ -250,11 +250,11 @@
                  adds := difference(proc.Channels, w.info.Channels)
                  if len(adds) > 0 {
                     // 通知子进程打开通道
                     notice = Notice{
                     n := Notice{
                        Op:      opAdd,
                        Content: adds,
                     }
                     if d, err := json.Marshal(notice); err == nil {
                     if d, err := json.Marshal(n); err == nil {
                        w.trans.chNotify <- d
                     }
                  }
@@ -373,8 +373,10 @@
   if cmd == nil {
      logo.Errorf("ANALYSIS START SLAVE PROC %s IPC: %s Failed\n", typ, ipcID)
      return
   }
   logo.Infof("START SDK %s ID %s PID %d Env: %s\n", typ, ipcID, cmd.Process.Pid, info.Env)
   logo.Infoln(cmd.Args)
   ch := make(chan []byte, 3)
   cancel := fnNotify(ctx, ipcID, ch, logo.Infoln)
@@ -407,9 +409,9 @@
      os.Setenv(runtime, old)
   }
   // //debug
   // cmd.Stdout = os.Stdout
   // cmd.Stderr = os.Stderr
   //debug
   cmd.Stdout = os.Stdout
   cmd.Stderr = os.Stderr
   cmd.SysProcAttr = &syscall.SysProcAttr{Pdeathsig: syscall.SIGTERM}
   if err := cmd.Start(); err == nil {