diff -up kactivities-4.10.2/src/service/Application.cpp.drop_signal_handler kactivities-4.10.2/src/service/Application.cpp --- kactivities-4.10.2/src/service/Application.cpp.drop_signal_handler 2013-03-01 00:26:31.971556302 -0600 +++ kactivities-4.10.2/src/service/Application.cpp 2013-04-26 10:04:14.458323124 -0500 @@ -223,8 +223,6 @@ void Application::quit() // Leaving object oriented world :) -static void initSignalCatching(); - int main(int argc, char ** argv) { @@ -236,50 +234,6 @@ int main(int argc, char ** argv) KCmdLineArgs::init(argc, argv, &about); - if (!KCmdLineArgs::allArguments().contains("--nofork")) - initSignalCatching(); - return Application::self()->exec(); } -// Signal handling -static void signalHandler(int sig) -{ - Jobs::Encryption::Common::unmountAll(); - - Application::quit(); - - // something (probably ksmserver) has asked us to terminate. - // If it is really ksmserver then the user is probably logging out, so we - // had better gently stop now than be killed. - if (sig == SIGTERM) { - //qDebug() << "signalHandler(SIGTERM): stopping ActivityManager\n"; - - // ActivityManager::self()->Stop(); - } - - // If we have crashed, then restart - if (sig == SIGSEGV) { - qDebug() << "Calling the crash handler..."; - KCrash::defaultCrashHandler(SIGSEGV); - } - - ::exit(EXIT_SUCCESS); -} - -static void initSignalCatching() { -#ifndef Q_OS_WIN32 // krazy:skip - struct sigaction action; - - ::sigemptyset(&action.sa_mask); - action.sa_flags = 0; - - /* Use the sa_sigaction field because the handles has two additional parameters */ - action.sa_handler = signalHandler; - - ::sigaction(SIGINT, &action, nullptr); - ::sigaction(SIGHUP, &action, nullptr); - ::sigaction(SIGTERM, &action, nullptr); - ::sigaction(SIGSEGV, &action, nullptr); -#endif -}