summaryrefslogtreecommitdiff
path: root/ConfigureChecks.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 /ConfigureChecks.cmake
parent5d4229c8381fbbc09dd733ac9448a5d79fb98840 (diff)
downloadcmocka-fd4b80d4504563f8b4d4f518b3122d17a669d1ed.tar.gz
cmocka-fd4b80d4504563f8b4d4f518b3122d17a669d1ed.tar.bz2
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 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index c0dd13d..c82f099 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -76,6 +76,7 @@ check_function_exists(exit HAVE_EXIT)
check_function_exists(fprintf HAVE_FPRINTF)
check_function_exists(free HAVE_FREE)
check_function_exists(longjmp HAVE_LONGJMP)
+check_function_exists(siglongjmp HAVE_SIGLONGJMP)
check_function_exists(malloc HAVE_MALLOC)
check_function_exists(memcpy HAVE_MEMCPY)
check_function_exists(memset HAVE_MEMSET)