#include <stdio.h>
#include <signal.h>
#include <stdlib.h>
#include <unistd.h>
#include <setjmp.h>
static void sig_alarm (int signo);
void err_sys (const char* message);
static jmp_buf alarm_jmp;
int main (int argc, char* argv[])
{
int time_left = 10;
if (signal (SIGALRM, sig_alarm) == SIG_ERR)
err_sys ("alarm signal error");
alarm (1);
if (sigsetjmp (alarm_jmp, 1) != 0)
{
time_left--;
if (time_left == 0)
{
printf ("BOOM\n");
exit(0);
}
else
{
printf ("%d\n", time_left);
alarm (1);
}
}
while (1);
exit(0);
}
static void sig_alarm (int signo)
{
siglongjmp (alarm_jmp, 1);
}
void err_sys (const char* message)
{
printf ("%s\n", message);
exit (0);
}
Where to stay in a casino - Dr. MD
ReplyDeleteThe Best 10 Casino Sites with Free Spins · 1. Red Dog – 인천광역 출장마사지 Best Overall Casino Online · 군산 출장안마 2. SlotoCash – 안성 출장마사지 Best 포천 출장샵 Payout Casino 광주 출장샵 for Desktop & Mobile · 3. PlayOJO – Top Pick