コード例 #1
0
ファイル: server.cpp プロジェクト: aarontc/kde-workspace
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 );
}
コード例 #2
0
ファイル: xsm.c プロジェクト: aosm/X11
static void
CloseListeners(void)

{
    IceFreeListenObjs (numTransports, listenObjs);
}