OLD | NEW |
1 /* | 1 /* |
2 * Compile with: | 2 * Compile with: |
3 * cc -I/usr/local/include -o time-test time-test.c -L/usr/local/lib -levent | 3 * cc -I/usr/local/include -o signal-test \ |
| 4 * signal-test.c -L/usr/local/lib -levent |
4 */ | 5 */ |
5 | 6 |
6 #include <sys/types.h> | 7 #include <sys/types.h> |
7 | 8 |
8 #ifdef HAVE_CONFIG_H | 9 #ifdef HAVE_CONFIG_H |
9 #include "config.h" | 10 #include "config.h" |
10 #endif | 11 #endif |
11 | 12 |
12 #include <sys/stat.h> | 13 #include <sys/stat.h> |
13 #ifndef WIN32 | 14 #ifndef WIN32 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 event_set(&signal_int, SIGINT, EV_SIGNAL|EV_PERSIST, signal_cb, | 54 event_set(&signal_int, SIGINT, EV_SIGNAL|EV_PERSIST, signal_cb, |
54 &signal_int); | 55 &signal_int); |
55 | 56 |
56 event_add(&signal_int, NULL); | 57 event_add(&signal_int, NULL); |
57 | 58 |
58 event_dispatch(); | 59 event_dispatch(); |
59 | 60 |
60 return (0); | 61 return (0); |
61 } | 62 } |
62 | 63 |
OLD | NEW |