diff options
author | Rolland Dudemaine <rolland@ghs.com> | 2011-02-22 15:28:17 (GMT) |
---|---|---|
committer | Harald Fernengel <harald.fernengel@nokia.com> | 2011-02-22 15:28:17 (GMT) |
commit | 09ad356cbc578c420b5392cd4ccc2393dc7b9050 (patch) | |
tree | eb70ff284b82441463d841f25b3f7d9b8e115eed /src/testlib/qtestcase.cpp | |
parent | 5ba5a02e0d905e582a44a313ba0d0e09c6f64067 (diff) | |
download | Qt-09ad356cbc578c420b5392cd4ccc2393dc7b9050.zip Qt-09ad356cbc578c420b5392cd4ccc2393dc7b9050.tar.gz Qt-09ad356cbc578c420b5392cd4ccc2393dc7b9050.tar.bz2 |
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/qtestcase.cpp')
-rw-r--r-- | src/testlib/qtestcase.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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); |