def stop
      if @pid
        begin
          debug "Asking Foreman to terminate... (#{@pid})"
          ::Process.kill("TERM", @pid)
          debug "Waiting for Foreman to stop..."
          ::Process.waitpid(@pid)
          @pid = nil          # Unset @pid
        rescue Errno::ESRCH
          # Don't do anything, the process does not exist
          debug "Could not find Foreman process"
        end
        info "Foreman stopped."
      end
    end
def stop
      if @pid
        begin
          debug "Asking Foreman to terminate... (#{@pid})"
          ::Process.kill("TERM", @pid)
          debug "Waiting for Foreman to stop..."
          ::Process.waitpid(@pid)
          @pid = nil          # Unset @pid
        rescue Errno::ESRCH
          # Don't do anything, the process does not exist
          debug "Could not find Foreman process"
        end
        info "Foreman stopped."
      end
    end
Called when `stop|quit|exit|s|q|e + enter` is pressed (when Guard quits).
 @raise [:task_has_failed] when stop has failed