summaryrefslogtreecommitdiffstats
path: root/kdesktop/lock/lockprocess.cc
diff options
context:
space:
mode:
authorAlexander Golubev <[email protected]>2013-08-25 21:52:23 +0400
committerSlávek Banko <[email protected]>2013-08-29 18:33:02 +0200
commit6a0dda8fff15eb7fc8e60c6d26d7e59139dcb050 (patch)
tree42a339b9e02ecfe70ca970ef38dc37089d9c1d1e /kdesktop/lock/lockprocess.cc
parent9c6d50d21fad42f6cd83bebbd22c574696e1dc01 (diff)
downloadtdebase-6a0dda8fff15eb7fc8e60c6d26d7e59139dcb050.tar.gz
tdebase-6a0dda8fff15eb7fc8e60c6d26d7e59139dcb050.zip
kdesktop/lock: use kdBacktrace() in case of fail
Diffstat (limited to 'kdesktop/lock/lockprocess.cc')
-rw-r--r--kdesktop/lock/lockprocess.cc28
1 files changed, 3 insertions, 25 deletions
diff --git a/kdesktop/lock/lockprocess.cc b/kdesktop/lock/lockprocess.cc
index f44363c90..b818b2636 100644
--- a/kdesktop/lock/lockprocess.cc
+++ b/kdesktop/lock/lockprocess.cc
@@ -22,8 +22,6 @@
#include <config.h>
-#include <execinfo.h>
-
#include "lockprocess.h"
#include "lockdlg.h"
#include "infodlg.h"
@@ -147,31 +145,11 @@ Atom kde_wm_system_modal_notification = 0;
Atom kde_wm_transparent_to_desktop = 0;
Atom kde_wm_transparent_to_black = 0;
-void print_trace()
-{
-#ifdef WITH_KDESKTOP_LOCK_BACKTRACE
- void *array[10];
- size_t size;
- char **strings;
- size_t i;
-
- size = backtrace (array, 10);
- strings = backtrace_symbols (array, size);
-
- printf ("[kdesktop_lock] Obtained %zd stack frames.\n", size);
-
- for (i = 0; i < size; i++) {
- printf ("[kdesktop_lock] %s\n", strings[i]);
- }
-
- free (strings);
-#endif
-}
-
static void segv_handler(int)
{
- printf("[kdesktop_lock] WARNING: A fatal exception was encountered. Trapping and ignoring it so as not to compromise desktop security...\n");
- print_trace();
+ kdError(1204) << "A fatal exception was encountered."
+ << " Trapping and ignoring it so as not to compromise desktop security..."
+ << kdBacktrace() << endl;
sleep(1);
}