void KSMServer::cleanUp() { if (clean) return; clean = true; IceFreeListenObjs (numTransports, listenObjs); QByteArray fName = QFile::encodeName(KStandardDirs::locateLocal("socket", "KSMserver")); QString display = QString::fromLocal8Bit(::getenv("DISPLAY")); // strip the screen number from the display display.replace(QRegExp("\\.[0-9]+$"), ""); int i; while( (i = display.indexOf(':')) >= 0) display[i] = '_'; while( (i = display.indexOf('/')) >= 0) display[i] = '_'; fName += '_'+display.toLocal8Bit(); ::unlink(fName.data()); FreeAuthenticationData(numTransports, authDataEntries); signal(SIGTERM, SIG_DFL); signal(SIGINT, SIG_DFL); KDisplayManager().shutdown( shutdownType, shutdownMode, bootOption ); }
void EndSession(int status) { if (verbose) printf ("\nSESSION MANAGER GOING AWAY!\n"); FreeAuthenticationData (numTransports, authDataEntries); if (session_name) { UnlockSession (session_name); XtFree (session_name); } if (display_env) XtFree (display_env); if (session_env) XtFree (session_env); if (cmd_line_display) XtFree (cmd_line_display); if (non_local_display_env) XtFree (non_local_display_env); if (non_local_session_env) XtFree (non_local_session_env); if (audio_env) XtFree (audio_env); if (networkIds) free (networkIds); exit (status); }
void fsm_close(void) { if (!SessionSupport || !fsm_init_succeed) { return; } FreeAuthenticationData(numTransports, authDataEntries); }