flagStderrSilent *bool
TracedAll bool
+
+ RunningProcs = map[int]*os.Process{}
+ RunningProcsM sync.Mutex
)
func init() {
errs <- runErr
return
}
+ RunningProcsM.Lock()
+ RunningProcs[cmd.Process.Pid] = cmd.Process
+ RunningProcsM.Unlock()
pid := fmt.Sprintf("[%d]", cmd.Process.Pid)
trace(CDebug, "%s runs %s", tgtOrig, pid)
// Wait for job completion
<-stderrTerm
err = cmd.Wait()
+ RunningProcsM.Lock()
+ delete(RunningProcs, cmd.Process.Pid)
+ RunningProcsM.Unlock()
finished = time.Now()
runErr.Finished = &finished
if err != nil {