Use sigsetjmp()/siglongjmp() when available
authorJonathon Reinhart <Jonathon.Reinhart@gmail.com>
Tue, 8 Sep 2015 03:26:20 +0000 (23:26 -0400)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 14 Sep 2015 16:17:10 +0000 (18:17 +0200)
commitfd4b80d4504563f8b4d4f518b3122d17a669d1ed
treeb332fabd1f8010d3c737444e6ba84dbf41d375c7
parent5d4229c8381fbbc09dd733ac9448a5d79fb98840
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>
ConfigureChecks.cmake
config.h.cmake
src/cmocka.c