示例#1
0
func (brk *Barak) StopProcess(label string, kill bool) error {
	brk.mtx.Lock()
	proc := brk.processes[label]
	brk.mtx.Unlock()

	if proc == nil {
		return fmt.Errorf("Process does not exist: %v", label)
	}

	err := pcm.Stop(proc, kill)
	return err
}
示例#2
0
文件: main.go 项目: jaekwon/GuppyCamp
func StopProcess(label string, kill bool) (*ResponseStopProcess, error) {
	barak.mtx.Lock()
	proc := barak.processes[label]
	barak.mtx.Unlock()

	if proc == nil {
		return nil, fmt.Errorf("Process does not exist: %v", label)
	}

	err := pcm.Stop(proc, kill)
	return &ResponseStopProcess{}, err
}