示例#1
0
文件: session.c 项目: Nubisa/JXPanel
void pr_session_end(int flags) {
  int exitcode = 0;

  sess_cleanup(flags);

  if (flags & PR_SESS_END_FL_NOEXIT) {
    return;
  }

#ifdef PR_USE_DEVEL
  destroy_pool(session.pool);

  if (is_master) {
    main_server = NULL;
    free_pools();
    pr_proctitle_free();
  }
#endif /* PR_USE_DEVEL */

#ifdef PR_DEVEL_PROFILE
  /* Populating the gmon.out gprof file requires that the process exit
   * via exit(3) or by returning from main().  Using _exit(2) doesn't allow
   * the process the time to write its profile data out.
   */
  exit(exitcode);
#else
  _exit(exitcode);
#endif /* PR_DEVEL_PROFILE */
}
示例#2
0
static void sess_cb_logged_out(sp_session *sess)
{
  (void)sess;

  g_session.state = SESS_OFFLINE;
  log_append("Logged out");
  ui_dirty(UI_FOOTER);
  ui_update_post(0);

  if (g_session.exiting)
    sess_cleanup();
}