mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 13:13:36 +00:00
24 lines
339 B
C
24 lines
339 B
C
|
#include <setjmp.h>
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
sigjmp_buf env;
|
||
|
int val;
|
||
|
volatile int count = 0;
|
||
|
val = sigsetjmp(env, 0);
|
||
|
++count;
|
||
|
if (count == 1 && val != 0)
|
||
|
{
|
||
|
return 1;
|
||
|
}
|
||
|
if (count == 2 && val == 42)
|
||
|
{
|
||
|
return 0;
|
||
|
}
|
||
|
if (count == 1)
|
||
|
{
|
||
|
siglongjmp(env, 42);
|
||
|
}
|
||
|
return 1;
|
||
|
}
|