summaryrefslogtreecommitdiff
path: root/src/tools/qtcreatorcrashhandler
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2013-03-07 09:05:37 +0100
committerNikolai Kosjar <nikolai.kosjar@digia.com>2013-03-08 15:03:50 +0100
commitb682adaee9fa9e360e428db2d71328c2d8d7fbed (patch)
tree62a198c6f9d82fe3d00c6b245db1e01db15e018c /src/tools/qtcreatorcrashhandler
parentb36a53cd1939a4050a2e90f17f2185b9c1591560 (diff)
downloadqt-creator-b682adaee9fa9e360e428db2d71328c2d8d7fbed.tar.gz
CrashHandler: Handle signal SIGABRT
This signal is generated if abort() is called. This happens e.g. 1. if there is an attempt to call a pure virtual method 2. if Qt detects an uncaught exception or printing a message fails (qlogging.cpp, qt_message()) Change-Id: I6a1d8f094a884ebc6bfc6a1fc168aea8afe825b5 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src/tools/qtcreatorcrashhandler')
-rw-r--r--src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp b/src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp
index 00841eee09..06748e4332 100644
--- a/src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp
+++ b/src/tools/qtcreatorcrashhandler/crashhandlersetup.cpp
@@ -115,7 +115,9 @@ void setupCrashHandler()
// restarted Qt Creator.
// SA_ONSTACK - Use alternative stack.
sa.sa_flags = SA_RESETHAND | SA_NODEFER | SA_ONSTACK;
- const int signalsToHandle[] = { SIGILL, SIGFPE, SIGSEGV, SIGBUS, 0 };
+ // See "man 7 signal" for an overview of signals.
+ // Do not add SIGPIPE here, QProcess and QTcpSocket use it.
+ const int signalsToHandle[] = { SIGILL, SIGABRT, SIGFPE, SIGSEGV, SIGBUS, 0 };
for (int i = 0; signalsToHandle[i]; ++i) {
if (sigaction(signalsToHandle[i], &sa, 0) == -1 ) {
qWarning("Warning: Failed to install signal handler for signal \"%s\" (%s).",