aboutsummaryrefslogtreecommitdiff
path: root/config.h.cmake
diff options
context:
space:
mode:
authorJonathon Reinhart <Jonathon.Reinhart@gmail.com>2015-09-07 23:26:20 -0400
committerAndreas Schneider <asn@cryptomilk.org>2015-09-14 18:17:10 +0200
commitfd4b80d4504563f8b4d4f518b3122d17a669d1ed (patch)
treeb332fabd1f8010d3c737444e6ba84dbf41d375c7 /config.h.cmake
parent5d4229c8381fbbc09dd733ac9448a5d79fb98840 (diff)
downloadcmocka-fd4b80d4504563f8b4d4f518b3122d17a669d1ed.tar.gz
cmocka-fd4b80d4504563f8b4d4f518b3122d17a669d1ed.tar.xz
cmocka-fd4b80d4504563f8b4d4f518b3122d17a669d1ed.zip
Use sigsetjmp()/siglongjmp() when available
Without using siglongjmp, the signal mask is not restored when longjmp-ing from the signal handler, and whichever signal was being handled remains blocked for the remainder of the tests. As a result, the same signal cannot be caught twice, and will cause process termination when being raised the second time. This does not change 'jmp_buf global_expect_assert_env', because it is part of the public API, and isn't used from a signal handler. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'config.h.cmake')
-rw-r--r--config.h.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/config.h.cmake b/config.h.cmake
index 78cce7a..920bb10 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -110,6 +110,9 @@
/* Define to 1 if you have the `longjmp' function. */
#cmakedefine HAVE_LONGJMP 1
+/* Define to 1 if you have the `siglongjmp' function. */
+#cmakedefine HAVE_SIGLONGJMP 1
+
/* Define to 1 if you have the `malloc' function. */
#cmakedefine HAVE_MALLOC 1