Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void func(int signum)
- {
- printf("1");
- alarm(1);
- }
- int main(int argc, char *argv[])
- {
- struct sigaction sa;
- sa.sa_handler = func;
- sigaction(SIGALRM, &sa, NULL);
- alarm(1);
- while (1);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement