Beispiel #1
0
/**
 * The end of all things
 */
void
main_fini(void)
{
  prop_destroy_by_name(prop_get_global(), "popups");
  fini_group(INIT_GROUP_API);
  TRACE(TRACE_DEBUG, "core", "API group finished");
  fini_group(INIT_GROUP_IPC);
  TRACE(TRACE_DEBUG, "core", "IPC group finished");
#if ENABLE_PLAYQUEUE
  playqueue_fini();
  TRACE(TRACE_DEBUG, "core", "Playqueue finished");
#endif
  audio_fini();
  TRACE(TRACE_DEBUG, "core", "Audio finished");
  nav_fini();
  TRACE(TRACE_DEBUG, "core", "Navigator finished");
  backend_fini();
  TRACE(TRACE_DEBUG, "core", "Backend finished");
  shutdown_hook_run(0);
  TRACE(TRACE_DEBUG, "core", "Slow shutdown hooks finished");
  blobcache_fini();
  TRACE(TRACE_DEBUG, "core", "Blobcache finished");
#if ENABLE_METADATA
  metadb_fini();
  TRACE(TRACE_DEBUG, "core", "Metadb finished");
#endif
  kvstore_fini();
  notifications_fini();
  htsmsg_store_flush();
  TRACE(TRACE_DEBUG, "core", APPNAMEUSER" terminated normally");
  trace_fini();
}
Beispiel #2
0
void
showtime_shutdown(int retcode)
{
  TRACE(TRACE_DEBUG, "core", "Shutdown requested, returncode = %d", retcode);

  if(gconf.exit_code != 1) {
    // Force exit
    gconf.exit_code = retcode;
    arch_exit();
  }

  gconf.exit_code = retcode;

  // run early shutdown hooks (those must be fast)
  shutdown_hook_run(1);

  htsmsg_store_flush();

  event_to_ui(event_create_type(EVENT_STOP_UI));
}
Beispiel #3
0
void
showtime_shutdown(int retcode)
{
    TRACE(TRACE_DEBUG, "core", "Shutdown requested, returncode = %d", retcode);

    if(showtime_retcode != 1) {
        // Force exit
        arch_exit(retcode);
    }

    showtime_retcode = retcode;

    // run early shutdown hooks (those must be fast)
    shutdown_hook_run(1);

    htsmsg_store_flush();

    if(ui_shutdown() == -1) {
        // Primary UI has no shutdown method, launch a new thread to stop
        hts_thread_create_detached("shutdown", showtime_shutdown0, NULL,
                                   THREAD_PRIO_NORMAL);
    }
}
Beispiel #4
0
void
app_flush_caches(void)
{
  kvstore_deferred_flush();
  htsmsg_store_flush();
}