# File lib/riddle/controller.rb, line 47
    def stop
      return true unless running?
      
      stop_flag = 'stopwait'
      stop_flag = 'stop' if Riddle.loaded_version.split('.').first == '0'
      cmd = %(#{searchd} --pidfile --config "#{@path}" --#{stop_flag})
      
      if RUBY_PLATFORM =~ /mswin/
        system("start /B #{cmd} 1> NUL 2>&1")
      else
        `#{cmd}`
      end
    ensure
      return !running?
    end