def stop
      return self if @pid.nil?
      _log "stopping (##{@pid})"
      Process.kill('INT', @pid)

      Timeout::timeout(10) do
        sleep(10e-3) until Process.wait(@pid, Process::WNOHANG)
        @status = $?
      end

      @pid = nil
      self
    end
def stop
      return self if @pid.nil?
      _log "stopping (##{@pid})"
      Process.kill('INT', @pid)

      Timeout::timeout(10) do
        sleep(10e-3) until Process.wait(@pid, Process::WNOHANG)
        @status = $?
      end

      @pid = nil
      self
    end
politely ask the process to stop, and wait for it to exit