summaryrefslogtreecommitdiffstats
path: root/src/testlib
diff options
context:
space:
mode:
authorRolland Dudemaine <rolland@ghs.com>2011-02-22 16:28:17 +0100
committerHarald Fernengel <harald.fernengel@nokia.com>2011-02-22 16:28:17 +0100
commit09ad356cbc578c420b5392cd4ccc2393dc7b9050 (patch)
treeeb70ff284b82441463d841f25b3f7d9b8e115eed /src/testlib
parent5ba5a02e0d905e582a44a313ba0d0e09c6f64067 (diff)
Run on INTEGRITY
Fix a runtime error on INTEGRITY Merge-request: 1101 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/testlib')
-rw-r--r--src/testlib/qtestcase.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 55f5fbe688..03cfbbcd5e 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -1625,6 +1625,14 @@ private:
void FatalSignalHandler::signal(int signum)
{
qFatal("Received signal %d", signum);
+#if defined(Q_OS_INTEGRITY)
+ {
+ struct sigaction act;
+ memset(&act, 0, sizeof(struct sigaction));
+ act.sa_handler = SIG_DFL;
+ sigaction(signum, &act, NULL);
+ }
+#endif
}
FatalSignalHandler::FatalSignalHandler()
@@ -1639,8 +1647,9 @@ FatalSignalHandler::FatalSignalHandler()
act.sa_handler = FatalSignalHandler::signal;
// Remove the handler after it is invoked.
+#if !defined(Q_OS_INTEGRITY)
act.sa_flags = SA_RESETHAND;
-
+#endif
// Block all fatal signals in our signal handler so we don't try to close
// the testlog twice.
sigemptyset(&act.sa_mask);