From 09ad356cbc578c420b5392cd4ccc2393dc7b9050 Mon Sep 17 00:00:00 2001 From: Rolland Dudemaine Date: Tue, 22 Feb 2011 16:28:17 +0100 Subject: Run on INTEGRITY Fix a runtime error on INTEGRITY Merge-request: 1101 Reviewed-by: Harald Fernengel --- src/testlib/qtestcase.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index 55f5fbe..03cfbbc 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); -- cgit v0.12