def METHOD_NAME(args):
  """Run the bot."""
  appengine_path = appengine.find_sdk_path()
  _setup_bot_directory(args)
  _setup_environment_and_configs(args, appengine_path)
  exit_code = 0
  try:
    os.chdir(os.path.join(args.directory, 'clusterfuzz'))
    proc = common.execute_async('python src/python/bot/startup/run_bot.py')
    def _stop_handler(*_):
      print('Bot has been stopped. Exit.')
      proc.kill()
    signal.signal(signal.SIGTERM, _stop_handler)
    common.process_proc_output(proc)
    exit_code = proc.wait()
  except KeyboardInterrupt:
    _stop_handler()
    # exit_code should be 0 when Ctrl-Ced.
  return exit_code