// Stop sends the Interrupt signal to the running process.
Stop sends the Interrupt signal to the running process.
// Stop sends the Interrupt signal to the running process .
func (h *shellHandler) Stop() {
	h.m.Lock()
	defer h.m.Unlock()
	h.log("Setting as stopped")
	h.stop = true
	if h.p != nil && h.ps != nil && !h.ps.Exited() {
		h.log("Process has not started.")
		return
	}
	if err := h.p.Signal(os.Interrupt); err != nil {
		h.log("Error stopping process %d: %v", h.p.Pid, err)
	}
}
func ( h * shellHandler ) Stop ( ) { h . m . Lock ( ) defer h . m . Unlock ( ) h . log ( " " ) h . stop = true if h . p != nil && h . ps != nil && ! h . ps . Exited ( ) { h . log ( " " ) return } if err := h . p . Signal ( os . Interrupt ) ; err != nil { h . log ( " " , h . p . Pid , err ) } }
Stop sends the Interrupt signal to the running process.
Stop sends the Interrupt signal to the running process .