Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <signal.h>
- #include "tlpi_hdr.h"
- static void
- sigHandler(int sig)
- {
- printf("ouch!\n");
- }
- int
- main(int argc, char *argv[])
- {
- int j;
- if (signal(SIGINT, sigHandler) == SIG_ERR)
- errExit("signal");
- for (j = 0; ; j++) {
- printf("%d\n", j);
- sleep(3);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement